http://stackoverflow.com/a/26316824
type: Answer
has body: It wraps for me in Firefox too. Changing the horizontal padding from 25px to 23px fixes it in all three browsers. .navbar .nav &gt; li &gt; a { ... padding: 15px 23px; ... }
has comment: http://stackoverflow.com/comment/41299607
score: 0
answers question: http://stackoverflow.com/q/26316768
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26316768

http://stackoverflow.com/a/26333855
score: 3
has comment: http://stackoverflow.com/comment/41439460
accepted answer of: http://stackoverflow.com/q/26333091
answers question: http://stackoverflow.com/q/26333091
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41332905
upvote count: 3
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41364527
has body: You need to do it in two steps, first fill the shape then stroke just an arc. To do so you need to use a beginPath() for the outer border after filling it so to not stroke the complete shape. ... ctx.closePath(); ctx.fill(); // original code stops // insert this code ctx.beginPath(); ctx.strokeStyle = '#079'; ctx.lineWidth = 9; ctx.arc(0, 0, myRadius[i], -(thisAngle / 2), thisAngle / 2); ctx.stroke(); // original code continues... // ctx.stroke(); ctx.fillStyle = '#fff'; ... Updated fiddle

http://stackoverflow.com/a/70687414
answers question: http://stackoverflow.com/q/26280445
upvote count: 1
type: Answer
downvote count: 0
has body: After cloning give unique ids to your input fields. Then add datepicker to that input. And hope that this will solve your problem. $("id").datepicker(); on click event or after cloning.
score: 1

http://stackoverflow.com/comment/41332913
score: 0
type: Comment
has text: you have been nothing but helpful, thank you so much
type: AnswerComment
comment on: http://stackoverflow.com/a/26323294

http://stackoverflow.com/comment/41128112
score: 0
type: Comment
type: QuestionComment
has text: It's not really relevant to the question lol. iContext is a way of getting cached values and _IWID_ is the unique ID of the widget
comment on: http://stackoverflow.com/q/26221023

http://stackoverflow.com/q/26263079
score: 0
tagged with: rest
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has title: Angular routing for front end app
has body: I know this is a very basic question, but can't seem to get everything hooked up right - I'm trying to get a handle on front end routing, using an Angular/Sinatra app. My app isn't hitting the right page, and I'm at a loss to why, as I'm having some trouble wrapping my head around the way routes work if you're not using a database. In my main page, "display.html", I have some text, then a set of D3 graphs with hrefs: &lt;a href="/app/{{appname}}"&gt; &lt;div ng-cloak class="nvd3-bullet-chart2" id="chart" data="subsetVals" showXAxis="true" showYAxis="true"&gt; &lt;/div&gt; &lt;/a&gt; The charts are populated by looping through an NVD3 function for each, rather than using ng-repeat (not sure how to do that given issues with asynchronicity). In my displayCtrl, I define $scope.appname like this: $scope.appname = '' var getGraphs = function(dataset){ var stats = { app: dataset[0].App } $scope.appname = stats.app; $scope.appname = $routeParams.appname; } I have my angular routes set up like this: app.config(function($routeProvider) { $routeProvider // route for the display page .when('/', { templateUrl: '/views/display.html', }) .when('/app/:appname', { templateUrl: 'views/details.html', }); }); When I click on the href for the charts, I'm getting an error that the page wasn't found at '/app/', which to me indicates that the :appname is never being picked up. So where should this be defined? I'm happy to add more detail and code if needed. Thanks!
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26263144

http://stackoverflow.com/comment/41238314
score: 0
has text: why base64 instead of inlining the svg? You could then change the "stroke" property with CSS on hover
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26283275

http://stackoverflow.com/a/26250757
has comment: http://stackoverflow.com/comment/41179158
has comment: http://stackoverflow.com/comment/41183081
has body: Change your code to: if(!(preg_match("/([0-9]{10})|([0-9]{3}\\s+[0-9]{3}\\s+[0-9]{4})/", $_POST['phone']))) die(msg(0,"You haven't provided a valid phone number")); Mainly, there were two problems with your regex. First: You had forgot to put your regular expression inside quotes. Second: After the opening quote, and before the closing quote, you should have / This building the pregmatch like: preg_match("/regex/", $string); And finally, the regular expression itself contained some errors. I recommend using this tool if you are new to regex: http://regex101.com/ Second part: The reason you are having issues with your form showing loading is because the PHP-script which it is posting data to, is throwing an error. This error needs to be fetched by the ajax script and returned to the browser. Simply using die('a message'); will kill the script and return "a message" to the query. You need to add a function to handle any error responses. Use a browser developer tool like FireBug or any buil in tool in your browser to have a look at the output of your ajax query: A good way to do a ajax call would be like: var formData = $('#yourform').serialize(); $.ajax({ url : "/link_to_script.php", type : "POST", data: formData, dataType: "json", success : function(d){ if( d.success) { // An array key called success is located with the value of true alert( 'Successfully submitted form' ); } if( d.error ){ // An array key called error is located with the value of true alert( d.errormsg ); // Alerts the visitor with the content of the return array key "errormsg" } }, error: function(){ alert( 'Something went wrong' ); // This error function will be returned if the data returned by script is not json, or if the script cannot be reached / returns any kind of 404/500 error or such. } }); This will handle a json output from your PHP script and interperate its data. If the call is successfull, it should contain some data from your PHP script, like for example a success message or an error …
score: 0
has comment: http://stackoverflow.com/comment/41182548
has comment: http://stackoverflow.com/comment/41183724
has comment: http://stackoverflow.com/comment/41179398
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26250609
type: Answer
has comment: http://stackoverflow.com/comment/41183879
answers question: http://stackoverflow.com/q/26250609
has comment: http://stackoverflow.com/comment/41182505
has comment: http://stackoverflow.com/comment/41180087
has comment: http://stackoverflow.com/comment/41184058

http://stackoverflow.com/a/26227789
has body: With .addTo(map) should works. However, you can use addLayer and removeLayer for add/remove markers: var marker = new L.Marker(e.latlng,{icon: Icon1}); marker.bindPopup(' Hello World '); //add the marker to the map map.addLayer(marker); //remove the marker from the map map.removeLayer(marker); I assume that you have created the map
has comment: http://stackoverflow.com/comment/41153717
answers question: http://stackoverflow.com/q/26224109
has comment: http://stackoverflow.com/comment/41143643
has comment: http://stackoverflow.com/comment/41142581
score: 0
type: Answer

http://stackoverflow.com/q/26230482
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26231478
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: jqxgrid
favorite count: 0
accepted answer: http://stackoverflow.com/a/26231478
has title: Setting the Editable property of a column in JQXgrid
tagged with: http://stackoverflow.com/tag/html
has body: JS: http://jsfiddle.net/tzHXR/ var data = generatedata(500); var source = { localdata: data, datafields: [{ name: 'firstname', type: 'string' }, { name: 'lastname', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'date', type: 'date' }, { name: 'quantity', type: 'number' }, { name: 'price', type: 'number' }], datatype: "array" }; var adapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid({ width: 500, theme: 'energyblue', editable: true, source: adapter, sortable: true, columns: [{ text: 'First Name', datafield: 'firstname', width: 90, }, { text: 'Last Name', datafield: 'lastname', width: 90 }, { text: 'Product', datafield: 'productname', width: 170 }, { text: 'Order Date', datafield: 'date', width: 160, cellsformat: 'dd-MMMM-yyyy' }, { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' }, { text: 'Unit Price', datafield: 'price', cellsalign: 'right', cellsformat: 'c2' }] }); I am trying to learn JQXgrid and this is my JS file. in this whole grid is set to editable: true flag but i want a particular field to be non-editable. In reference to the forum-post by jqwidget team member http://www.jqwidgets.com/community/topic/making-a-column-non-editable/#post-11055 i tried this: JS: http://jsfiddle.net/tzHXR/89/ var data = generatedata(500); var source = { localdata: data, datafields: [{ name: 'firstname', type: 'string' }, { name: 'lastname', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'date', type: 'date' }, { name: 'quantity', type: 'number' }, { name: 'price', type: 'number' }], datatype: "array" }; var adapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid({ width: 500, theme: 'energyblue', editable: true, source: adapter, sortable: true, columns: [{ text: 'First Name', datafield: 'firstname', width: 90, editable:false; // Editable Property Set to false }, { text: 'Last Name', datafield: 'lastname', width: 90 }, { text: 'Product', datafield: 'productname', width: 170 }, { text: 'Order Date…
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/26248918
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41175754
has answer: http://stackoverflow.com/a/26248962
type: Question
has comment: http://stackoverflow.com/comment/41175774
accepted answer: http://stackoverflow.com/a/26248962
has title: Putting PHP echo into a button's innerHTML doesn't work
has body: I have a jQuery code like this: $("#erase").click(function(){ $("#erase").attr("disabled", "disabled"); // Prevent double-clicking $(this).html("Erasing..."); $.post("erase.php", {target: $("#target").val(), criteria: $("#criteria").val()}, function(data){ $(this).html(data); // Change the button's caption to whatever erase.php echoes. setTimeout(function(){ window.location.href = "index.php"; }, 3000); }); The target and criteria are both HTML input tags and the button is declared with the button tag. I was expecting these would happen when user clicks the button: Button will be greyed out and its text will say 'Erasing...' erase.php will be called via AJAX. erase.php will delete a row from a database, and takes several seconds to complete. When the AJAX call is completed, the button text will be the output of erase.php. It will be either "Success" or "Failure" After 3 seconds, user will be brought back to home page. But in my case, step 3 fails. The button gets stuck in 'Erasing....' (The request does complete, however.) Side note: I can't really think of a better title for this question. If you can come up with one for me. Please let me know in the comments. I'd appreciate it.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41175892
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41175802
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/41277280
has text: Folks, we have a contend-ah! @jcreamer898 yr result is correct... but is it the best way? +1 for your speedy answer. On your way to a checkmark...
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26303895

http://stackoverflow.com/comment/41190665
type: QuestionComment
has text: It should work, check my [jsfiddle](http://jsfiddle.net/pajusmar/mgz27e6d/).
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26257150

http://stackoverflow.com/comment/41227960
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26277886
has text: Maybe this document.getElementById("button" + a).innerHTML = "";

http://stackoverflow.com/comment/41260498
has text: Which `promise` library are you using?
score: 0
comment on: http://stackoverflow.com/q/26295514
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41313119
type: Comment
score: 0
type: AnswerComment
has text: I juste edited my answer. I replaced your `$(function())()` by a `$().ready();` and it's now working for me when I launch it in the console on your website.
comment on: http://stackoverflow.com/a/26324008

http://stackoverflow.com/q/26347088
tagged with: jquery-select2
has title: How to remove an option from a select element with Select2 applied?
has answer: http://stackoverflow.com/a/26347288
has body: So, I have this HTML code: -- SELECCIONAR -- MRW - COBRO EN DESTINO DOMESA - COBRO EN DESTINO GRUPO ZOOM - COBRO EN DESTINO I need to remove the option MRW when checkbox .lives_in_ccs is checked so I made this code: $(function () { $('.toSelect2').select2(); var detachedMember; $('.lives_in_ccs').click(function () { if (this.checked) { detachedMember = $('.shipping_from option[value="MRW"]').detach(); } else { $('.shipping_from option[value=""]').after(detachedMember); } $(".secure_shipping").toggle(this.checked); }); }); This code works but I'm having a problem and didn't found the way to fixit. Having this jsFiddle do this tests: Leave the SELECT with the default value which is --SELECCIONAR-- and mark the check in the left side, that will works and will remove the option MRW from the main SELECT, if you unmark the check the value will appear again on the SELECT Choose MRW (the first choice) on the SELECT and mark the check in the left side, that will remove the option MRW from the main SELECT, but will leave the option as SELECTED which is wrong since the server side isn't expecting it. So, how do I remove the option even if it's selected on the SELECT element? Any help?
upvote count: 7
type: Question
accepted answer: http://stackoverflow.com/a/26347288
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41355480
score: 7
possible better answer: http://stackoverflow.com/a/26347260
has answer: http://stackoverflow.com/a/26347260
answer count: 3
has answer: http://stackoverflow.com/a/64460667
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26315664
has title: Facebook Login through PHP
has comment: http://stackoverflow.com/comment/41297308
score: 0
answer count: 1
has body: While I am running the html code using below code, the login is happening successfully. but, when I am copying the same thing in a .php page and running the php, its not happening. Prompt: "For your security, never enter your Facebook password on sites not located on Facebook.com" Why it's working in .html and not in .php?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/26315902
type: Question
tagged with: javascript

http://stackoverflow.com/a/71831357
answers question: http://stackoverflow.com/q/26297544
has body: Yet another update: The interface for attribute has changed somewhat: For r139 const dotGeometry = new THREE.BufferGeometry(); dotGeometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array([0,0,0]), 3)); const dotMaterial = new THREE.PointsMaterial({ size: 0.1, color: 0xff0000 }); const dot = new THREE.Points(dotGeometry, dotMaterial); scene.add(dot);
score: 6
type: Answer
downvote count: 0
upvote count: 6

http://stackoverflow.com/comment/41114414
type: Comment
score: 2
has text: have you tried `onchange` ?
comment on: http://stackoverflow.com/q/26216382
type: QuestionComment

http://stackoverflow.com/a/26266655
has comment: http://stackoverflow.com/comment/41208206
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26266435
type: Answer
accepted answer of: http://stackoverflow.com/q/26266435
score: 2
upvote count: 2
has body: From the docs - In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the “@” symbol from your selectors in order to make them work again. Since you're using jQuery 1.10.n you need to remove the @ from the code here: if (!$("input[@name=q1]:checked").val()

http://stackoverflow.com/q/26344939
score: 1
tagged with: jqgrid
has body: I'm using an web method to get an json response, but the Refresh button in the grid doesn't work. This is the code Behind: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static string getData() { string data = GetJson(); return data; } public static string GetJson() { List&lt;NameData&gt; dataList = new List&lt;NameData&gt;(); NameData data1 = new NameData(); data1.pkNameID = 1; data1.Name = "Name_One"; dataList.Add(data1); NameData data2 = new NameData(); data2.pkNameID = 2; data2.Name = "Name_two"; dataList.Add(data2); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); return js.Serialize(dataList); } public class NameData { public int pkNameID { get; set; } public string Name { get; set; } } And this is the ajax script: $(document).ready(function () { GetData(); }); function GetData() { $.ajax({ type: "POST", url: "ListTest.aspx/getData", contentType: "application/json; charset=utf-8", dataType: "json", //async: false, success: function (response) { var item = $.parseJSON(response.d); if (item != null &amp;&amp; item != "" &amp;&amp; typeof (item) != 'undefined') { $("#list").jqGrid({ url: 'ListTest.aspx/getData', data: item, datatype: 'local', colNames: ['pkNameID', 'Name'], colModel: [ { name: 'pkNameID', index: 'pkNameID', width: 30, align: 'left', stype: 'text', editable: false }, { name: 'Name', index: 'Name', width: 80, align: 'left', stype: 'text', editable: true }], rowNum: 5, rowList: [10, 20, 30], pager: '#pager', sortname: 'pkNameID', sortorder: 'desc', caption: "Test Grid", viewrecords: true, async: false, loadonce: false, gridview: true, width: 500, edit: true, loadComplete: function (result) { //alert(jQuery("#list").jqGrid('getGridParam', 'records')); }, loadError: function (xhr) { alert("The Status code:" + xhr.status + " Message:" + xhr.statusText);//Getting reponse 200 ok } }).navGrid('#pager', { edit: true, add: false, del: false, search: false, refresh:…
has title: Ajax Jqgrid Reload Grid not Working c# .net
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26380510
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26380510
downvote count: 0

http://stackoverflow.com/comment/41369583
score: 0
comment on: http://stackoverflow.com/q/26353749
type: Comment
type: QuestionComment
has text: However, you are using custom button, not using fb login. If you provide entire code, I can help

send
type: Tag
tags question: http://stackoverflow.com/q/26345111
tag name: send

http://stackoverflow.com/q/26255758
tagged with: jquery
type: UnansweredQuestion
has title: JQuery option remove on select from multiple select box
has body: I am new to JQuery. I have searched for a solution but couldn't find any solution. I have 3 select box and the option selected in the first select box needs to removed from the next two select box. I have the code which actually hides the selected option in FF and chrome. But in IE it is not getting hidden. Also i need to bring back the selected option, if the user changes his mind and re-select the option he has already selected in first select box. Can someone help me out. Any help is much appreciated. var array= []; $(document).ready(function(){ $('select').on('change', function(event ) { $('select').not(this).find('option').show(); var value = $(this).val(); //alert(value); array.push(value); for (var i = 0; i &lt; array.length; i++) { // Here i am disabling the option as well as hiding. Because in IE hide does not work. $('select').not(this).find('option[value="'+array[i]+'"]').attr('disabled','disabled').hide(); } }); });
type: Question
has comment: http://stackoverflow.com/comment/41187326
tagged with: javascript
linked to: http://stackoverflow.com/q/8373735
score: 0
has answer: http://stackoverflow.com/a/26256289
answer count: 1

http://stackoverflow.com/comment/41337446
type: Comment
type: QuestionComment
has text: You configure property with descriptor `writable: false`.
comment on: http://stackoverflow.com/q/26337196
score: 0

http://stackoverflow.com/q/26217509
tagged with: video
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/24300176
has answer: http://stackoverflow.com/a/26235609
accepted answer: http://stackoverflow.com/a/26235609
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: android
tagged with: cordova-plugins
has title: Cordova 3.6.3 File plugin - get local video file on android
tagged with: cordova
upvote count: 3
has body: What I'd like to do is get the URI of a video file on the device via cordovas javascript API set the URI as value of a HTML5 video tag's src attribute. The second part shouldn’t be a problem. Concerning the first task, there are a lot of good structured tutorials like Raymond Camden's demonstrating how to get local files through javascript in an cordova environment. However, with the newest version of cordova, I could not get it to work. The video file The video is located either in assets/www/videos/testvid.webm or res/raw/testvid.webm in the built apk file. Both variations did not work. The javascript myPath = cordova.file.applicationDirectory; // -&gt; file:///android_asset/ //myPath += "www/videos/testvid.webm"; respectively myPath = cordova.file.applicationStorageDirectory; // -&gt; file:///data/data/com.example.MyPackage/ //myPath += "raw/testvid.webm"; Then: window.resolveLocalFileSystemURL(myPath, gotFile, fail); function gotFile(entry){ if(entry.isDirectory) alert JSON.stringify(entry.getFile("testvid.webm")); } The permissions In res/xml/config.xml access permissions are added &lt;preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,root" /&gt; The error is {code:1} -> NOT_FOUND_ERR What am I doing wrong? How to navigate to the file, or where can one put it to be found?
type: Question

http://stackoverflow.com/a/26244007
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26241264
type: Answer
accepted answer of: http://stackoverflow.com/q/26241264
has body: I think there are two or three tricks you can do to avoid the non desired behavior. One of them could be for e.g: Intro Home About Contact As you can see, you can add a hidden link to the first paragraph. Check here demo to see a working example. Hope it's useful!

http://stackoverflow.com/a/26294588
answers question: http://stackoverflow.com/q/26294181
type: Answer
score: 0
has body: Try with this &lt;body oncontextmenu="return false"&gt; //This should disable the context menu (right click) &lt;/body&gt; Or with JS &lt;script language="javascript"&gt; document.onmousedown=disableclick; Function disableclick(event) { if(event.button==2) //Right Button { return false; } } &lt;/script&gt; Please note that this can be bypassed since some browsers allow the user to use the right click button even if it's disabled by JS..

http://stackoverflow.com/q/26305556
type: Question
has title: ng-change doesn't trigger on number input type
has body: I am using angularJS, and I'm trying to get an error to pop up if the input value is not a number. Number Value: &lt;input type="number" ng-model="mydata.number" ng-change="checkNumber()" /&gt; &lt;p style="color:red" ng-show="numberError"&gt; {{ numberError }} &lt;/p&gt; And then inside $scope.checkNumber I check to see if it's NaN: if(!$scope.mydata.number || isNaN($scope.mydata.number)) { $scope.numberError = "This must be a number"; } It appears that when I initially enter a string such as "fff" no error popups up, and we don't enter the checkNumber function, but if I enter "1fff" then it does enter the function and the error shows like it should. If the input type is number and the initial character is not a number, does the ng-model not change?
tagged with: javascript
upvote count: 2
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26305748
accepted answer: http://stackoverflow.com/a/26305748
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41279216
downvote count: 0

http://stackoverflow.com/comment/41337208
type: AnswerComment
score: 0
has text: Thanks almightBoognish! How does the anchor links work in jsfiddle.net/72Lk1tfm/1 ? Say that I would like the second tab to be toggled on when landing on the page from an external link, how can I do that?
type: Comment
comment on: http://stackoverflow.com/a/26303135

http://stackoverflow.com/comment/41351608
score: 0
has text: I have two questions. 1) A jQuery plugin must be set somewhere to the jQuery.prototype like `$.fn.ajaxTip = function() {/* ... */}`. How did you do that? 2) Object.display is a function with an argument `d` that's nowhere used. What is it for ?
comment on: http://stackoverflow.com/q/26344705
type: Comment
type: QuestionComment

javascript
tags question: http://stackoverflow.com/q/26208506
tags question: http://stackoverflow.com/q/26258223
tags question: http://stackoverflow.com/q/26221616
tags question: http://stackoverflow.com/q/26344555
tags question: http://stackoverflow.com/q/26233009
tags question: http://stackoverflow.com/q/26278864
tags question: http://stackoverflow.com/q/26264244
tags question: http://stackoverflow.com/q/26272888
tags question: http://stackoverflow.com/q/26222521
tags question: http://stackoverflow.com/q/26263489
tags question: http://stackoverflow.com/q/26253461
tags question: http://stackoverflow.com/q/26258583
tags question: http://stackoverflow.com/q/26217180
tags question: http://stackoverflow.com/q/26264644
tags question: http://stackoverflow.com/q/26320039
tags question: http://stackoverflow.com/q/26327864
tags question: http://stackoverflow.com/q/26196092
tags question: http://stackoverflow.com/q/26293946
tags question: http://stackoverflow.com/q/26256689
tags question: http://stackoverflow.com/q/26323135
tags question: http://stackoverflow.com/q/26258635
tags question: http://stackoverflow.com/q/26218935
tags question: http://stackoverflow.com/q/26274547
tags question: http://stackoverflow.com/q/26319250
tags question: http://stackoverflow.com/q/26282759
tags question: http://stackoverflow.com/q/26325088
tags question: http://stackoverflow.com/q/26242010
tags question: http://stackoverflow.com/q/26212065
tags question: http://stackoverflow.com/q/26218035
tags question: http://stackoverflow.com/q/26232912
tags question: http://stackoverflow.com/q/26288376
tags question: http://stackoverflow.com/q/26347256
tags question: http://stackoverflow.com/q/26283267
tags question: http://stackoverflow.com/q/26299703
tags question: http://stackoverflow.com/q/26260284
tags question: http://stackoverflow.com/q/26332366
tags question: http://stackoverflow.com/q/26273269
tags question: http://stackoverflow.com/q/26330378
tags question: http://stackoverflow.com/q/26206999
tags question: http://stackoverflow.com/q/26353422
tags question: http://stackoverflow.com/q/26290467
tags question: http://stackoverflow.com/q/26352402
tags question: http://stackoverflow.com/q/26234848
tags question: http://stackoverflow.com/q/26224597
tags question: http://stackoverflow.com/q/26278265
tags question: http://stackoverflow.com/q/26284187
tags question: http://stackoverflow.com/q/26281042
tags question: http://stackoverflow.com/q/26337101
tags question: http://stackoverflow.com/q/26219689
tags question: http://stackoverflow.com/q/26218619
tags question: http://stackoverflow.com/q/26332409
tags question: http://stackoverflow.com/q/26300316
tags question: http://stackoverflow.com/q/26208996
tags question: http://stackoverflow.com/q/26239782
tags question: http://stackoverflow.com/q/26194616
tags question: http://stackoverflow.com/q/26285098
tags question: http://stackoverflow.com/q/26283588
tags question: http://stackoverflow.com/q/26246773
tags question: http://stackoverflow.com/q/26275394
tags question: http://stackoverflow.com/q/26301300
tags question: http://stackoverflow.com/q/26221086
tags question: http://stackoverflow.com/q/26225764
tags question: http://stackoverflow.com/q/26241010
tags question: http://stackoverflow.com/q/26218972
tags question: http://stackoverflow.com/q/26207690
tags question: http://stackoverflow.com/q/26273769
tags question: http://stackoverflow.com/q/26331504
tags question: http://stackoverflow.com/q/26292178
tags question: http://stackoverflow.com/q/26352873
tags question: http://stackoverflow.com/q/26279663
tags question: http://stackoverflow.com/q/26238217
tags question: http://stackoverflow.com/q/26215881
tags question: http://stackoverflow.com/q/26321805
tags question: http://stackoverflow.com/q/26269201
tags question: http://stackoverflow.com/q/26343683
tags question: http://stackoverflow.com/q/26290660
tags question: http://stackoverflow.com/q/26242788
tags question: http://stackoverflow.com/q/26343159
tags question: http://stackoverflow.com/q/26336147
tags question: http://stackoverflow.com/q/26329897

http://stackoverflow.com/comment/41224206
type: AnswerComment
type: Comment
has text: @NishanSenevirathna but as stated in my question `Form1SubmitOverloaded(); Form2SubmitOverloaded(); Form3SubmitOverloaded();` are doing posts inside of them. So what to write istead of `url: test1.php, data: $( "#form1" ).serialize(),` because I dont want to do this second time?
comment on: http://stackoverflow.com/a/26274773
score: 0

css
tags question: http://stackoverflow.com/q/26288119
tags question: http://stackoverflow.com/q/26306942
tags question: http://stackoverflow.com/q/26267925
tags question: http://stackoverflow.com/q/26242123
tags question: http://stackoverflow.com/q/26235187
tags question: http://stackoverflow.com/q/26331913
tags question: http://stackoverflow.com/q/26268492
tags question: http://stackoverflow.com/q/26233355
tags question: http://stackoverflow.com/q/26198650
tags question: http://stackoverflow.com/q/26251374
tags question: http://stackoverflow.com/q/26218609
tags question: http://stackoverflow.com/q/26283925
tags question: http://stackoverflow.com/q/26296120
tags question: http://stackoverflow.com/q/26223386
tags question: http://stackoverflow.com/q/26314528
tags question: http://stackoverflow.com/q/26200601
tags question: http://stackoverflow.com/q/26343315
tags question: http://stackoverflow.com/q/26294996
tags question: http://stackoverflow.com/q/26280456
tags question: http://stackoverflow.com/q/26204694
tags question: http://stackoverflow.com/q/26281182
tags question: http://stackoverflow.com/q/26289782
tags question: http://stackoverflow.com/q/26268959
tags question: http://stackoverflow.com/q/26247981
tags question: http://stackoverflow.com/q/26228283
tags question: http://stackoverflow.com/q/26198839
tags question: http://stackoverflow.com/q/26221050
tags question: http://stackoverflow.com/q/26278962
tags question: http://stackoverflow.com/q/26279789
tags question: http://stackoverflow.com/q/26289389
tags question: http://stackoverflow.com/q/26212627
tags question: http://stackoverflow.com/q/26314226
tags question: http://stackoverflow.com/q/26249488
tags question: http://stackoverflow.com/q/26237261
tags question: http://stackoverflow.com/q/26224761
tags question: http://stackoverflow.com/q/26280055
tags question: http://stackoverflow.com/q/26233827
tags question: http://stackoverflow.com/q/26263706
tags question: http://stackoverflow.com/q/26326657
tags question: http://stackoverflow.com/q/26291810
tags question: http://stackoverflow.com/q/26220425
tags question: http://stackoverflow.com/q/26239497
tags question: http://stackoverflow.com/q/26231747
tags question: http://stackoverflow.com/q/26239911
tags question: http://stackoverflow.com/q/26201725
tags question: http://stackoverflow.com/q/26316787
tags question: http://stackoverflow.com/q/26341922
tags question: http://stackoverflow.com/q/26327905
tags question: http://stackoverflow.com/q/26330761
tags question: http://stackoverflow.com/q/26348197
tags question: http://stackoverflow.com/q/26217701
tags question: http://stackoverflow.com/q/26194929
tags question: http://stackoverflow.com/q/26203892
tags question: http://stackoverflow.com/q/26276945
tags question: http://stackoverflow.com/q/26246229
tags question: http://stackoverflow.com/q/26340515
tags question: http://stackoverflow.com/q/26200750
tags question: http://stackoverflow.com/q/26290134
tags question: http://stackoverflow.com/q/26326778
tags question: http://stackoverflow.com/q/26214739
tags question: http://stackoverflow.com/q/26339341
tags question: http://stackoverflow.com/q/26221323
tags question: http://stackoverflow.com/q/26205731
tags question: http://stackoverflow.com/q/26203969
tags question: http://stackoverflow.com/q/26212732
tags question: http://stackoverflow.com/q/26195958
tags question: http://stackoverflow.com/q/26214142
tags question: http://stackoverflow.com/q/26263585
tags question: http://stackoverflow.com/q/26288949
tags question: http://stackoverflow.com/q/26232198
tags question: http://stackoverflow.com/q/26343832
tags question: http://stackoverflow.com/q/26259538
tags question: http://stackoverflow.com/q/26275186
tags question: http://stackoverflow.com/q/26296402
tags question: http://stackoverflow.com/q/26342058
tags question: http://stackoverflow.com/q/26260949
tags question: http://stackoverflow.com/q/26323667
tags question: http://stackoverflow.com/q/26349883
tags question: http://stackoverflow.com/q/26293798
tags question: http://stackoverflow.com/q/26202870

http://stackoverflow.com/a/26208122
type: Answer
has comment: http://stackoverflow.com/comment/41099339
answers question: http://stackoverflow.com/q/26207683
score: 0
has comment: http://stackoverflow.com/comment/41110189
has comment: http://stackoverflow.com/comment/41105472
has body: You need to know that a nodeList will update when the dom is updated, that means that if you are removing the first child node, the element 0 in the list will not refer to null but the node that was initial child 1. This means that if you want to remove node 0, 2, 4, 6, ... you will actually have to remove 0,1,2,3,4... (because the nodeList always will update): var body = document.body; // Consider that you might want to use `body.children` instead of // `body.childNodes` because it excludes all text nodes var nodes = body.childNodes; var len = nodes.length / 2; for ( var i = 0; i &lt; len; i++ ) { body.removeChild(nodes[i]); } I know it can seams kind of odd, but this will actually remove all the nodes: 0, 2, 4, 6, ... See more at MDN

http://stackoverflow.com/comment/41267705
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26299359
has text: Is element_id supposed to be the ID of the item you just clicked on? In that case, maybe this will help: var element_id = $(this).attr('id'); jQuery tends to get upset if you mix up this and $(this) in my own experience.
score: 1

http://stackoverflow.com/a/26205226
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: Use $$ in the replacement part to print a literal $ symbol and you don't need to have a character class in the replacement part if your pattern was enclosed within forward slashes. &gt; var my_string = "dkfj-dkfj-sflj"; undefined &gt; my_string.replace(/(\w+)-\w+-(\w+)/, "$1-woop$$$1-$2") 'dkfj-woop$dkfj-sflj'
answers question: http://stackoverflow.com/q/26205178

http://stackoverflow.com/a/26320906
answers question: http://stackoverflow.com/q/26320086
has comment: http://stackoverflow.com/comment/41307474
has body: You can use requestAnimationFrame(display) to set a callback (in this case, display) to be called at the next repaint. It's up to you to only call it once when waiting for a repaint (at the repaint, it will do the callback for each call you made to requestAnimationFrame). It's also up to you to request another animation frame if you want to animate continuously.
has comment: http://stackoverflow.com/comment/41307848
has comment: http://stackoverflow.com/comment/41316737
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41308227
accepted answer of: http://stackoverflow.com/q/26320086
has comment: http://stackoverflow.com/comment/41327134
has comment: http://stackoverflow.com/comment/41308574
upvote count: 2

http://stackoverflow.com/q/26311548
has answer: http://stackoverflow.com/a/26311709
tagged with: jquery
tagged with: meteor
has title: Meteor 'submit' event not working, other events are working
type: Question
has comment: http://stackoverflow.com/comment/41298603
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: I have following form HTML code : Admin Login-20 Enter username and/or password. Username Password Remember me Login Forgot Password Following is event code : Template.adminLogin.events({ "click form.login-form button[type='submit']": function (event, template) { event.preventDefault(); console.log('Click button Login Form -01'); }, "keyup form.login-form": function(event, template){ if(event.keyCode === 13) { event.preventDefault(); console.log('Keyup Login Form - 01'); } }, "submit form.login-form": function (event, template) { event.preventDefault(); event.stopPropagation(); return false; console.log('Submit Login Form -01'); } }); My problem is 'click' , 'keyup' is working but 'submit' is not working. Can some one guide me what is wrong and how it can be rectified.

http://stackoverflow.com/comment/41284068
score: 2
comment on: http://stackoverflow.com/q/26308020
has text: @Mike Exactly, no need of one more watcher binding.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41137455
type: Comment
has text: Also note that in javascript, an object defined as having multiple identical keys are technically invalid. But most implementations take the last definition. For example, the object: `{a:1,a:2,a:3}` is exactly the same as `{a:3}`. So if you don't use an array then there is only one time object even if it appears twice in the JSON string.
score: 0
comment on: http://stackoverflow.com/a/26204073
type: AnswerComment

http://stackoverflow.com/a/26351489
score: 0
has comment: http://stackoverflow.com/comment/41363578
has comment: http://stackoverflow.com/comment/41388878
type: Answer
has body: The only thing that can be different in your 2 pages are the URI you are calling: $("#Part_Number").autocomplete("autocomplete/parts.php", { try to put an absolute path like this: $("#Part_Number").autocomplete("http://www.example.com/autocomplete/parts.php", {
answers question: http://stackoverflow.com/q/26351432
has comment: http://stackoverflow.com/comment/41363153
has comment: http://stackoverflow.com/comment/41363301

http://stackoverflow.com/a/26310959
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26310946
has body: Use serialize() with the $(".editForm") selector $(document).ready(function() { $(document).on('submit', ".editForm", function(e) { $.post($(this).attr("action"), $(this).serialize(), function() { successMsg("Sorted.") }); e.preventDefault(); }); $("#click").on("click", function() { alert($(".editForm").serialize()); }); }); If you want to get it as an array then use serializeArray() $(document).ready(function() { $(document).on('submit', ".editForm", function(e) { $.post($(this).attr("action"), $(this).serialize(), function() { successMsg("Sorted.") }); e.preventDefault(); }); $("#click").on("click", function() { alert(JSON.stringify($(".editForm").serializeArray())); }); });
accepted answer of: http://stackoverflow.com/q/26310946
has comment: http://stackoverflow.com/comment/41289185
has comment: http://stackoverflow.com/comment/41289124
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41289157
has comment: http://stackoverflow.com/comment/41289135

http://stackoverflow.com/a/26323742
upvote count: 1
has comment: http://stackoverflow.com/comment/41312653
has comment: http://stackoverflow.com/comment/41312086
type: Answer
has comment: http://stackoverflow.com/comment/41312638
has body: why not use a simple css selector: Ok as @trueaussie suggested this will remove any div that doesn't have a "fff" in the string so it will also leave class="testclassnamefff" class="ffftestclassname" class="ghjgfffjfkfjkf" $('#view div:first div div:not([class*=fff])').remove(); [class*=fff] { border: 5px solid yellow; } Keep Keep Keep Keep Remove http://jsfiddle.net/79qu7k4e/1/
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41312586
has comment: http://stackoverflow.com/comment/41312675
answers question: http://stackoverflow.com/q/26323667

http://stackoverflow.com/comment/41335633
score: 0
type: QuestionComment
has text: what about css you applied ?
type: Comment
comment on: http://stackoverflow.com/q/26335677

http://stackoverflow.com/a/26256117
score: 0
has body: I think this will be useful please look at this $id=$row['id']; If you want to pass id you can use $id or else just call function without params echo "Delete";
has comment: http://stackoverflow.com/comment/41214675
type: Answer
answers question: http://stackoverflow.com/q/26254910
has comment: http://stackoverflow.com/comment/41217081
has comment: http://stackoverflow.com/comment/41216920

http://stackoverflow.com/a/26311423
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: I would consider just creating your module as you normally would for Node and then using Browserify to use it on the client as well. Basically you just write a script file and use 'require' to pull in your module and make use of your module functions right there. Then you use Browserify to create a single file that you just include in the src attribute of a script tag in your html file. http://browserify.org
answers question: http://stackoverflow.com/q/26311271

http://stackoverflow.com/q/26331217
has comment: http://stackoverflow.com/comment/41326586
has comment: http://stackoverflow.com/comment/41326455
accepted answer: http://stackoverflow.com/a/26331381
score: 0
has comment: http://stackoverflow.com/comment/41326444
has comment: http://stackoverflow.com/comment/41326577
linked to: http://stackoverflow.com/q/4551008
type: Question
has comment: http://stackoverflow.com/comment/41327680
has comment: http://stackoverflow.com/comment/41326551
has comment: http://stackoverflow.com/comment/41333919
has comment: http://stackoverflow.com/comment/41326408
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41326614
has comment: http://stackoverflow.com/comment/41326877
possible better answer: http://stackoverflow.com/a/26331869
has comment: http://stackoverflow.com/comment/41326562
has comment: http://stackoverflow.com/comment/41328284
answer count: 3
has comment: http://stackoverflow.com/comment/41327028
has answer: http://stackoverflow.com/a/26331869
has comment: http://stackoverflow.com/comment/41328289
has answer: http://stackoverflow.com/a/26331381
has body: Basically I have a grid of spans resembling a chess/checker board with players &amp; ai taking turns moving. During a players turn, they can "shoot" other players, however I'm having a hard time getting my head around how to tell if there is someone in the crossfire. I consider a "chess piece" occupying a square as taking up the entire square, so really just need a way to find out if the "bullet" passes through a square as it travels from point a to point b. Here is a brief example: http://jsfiddle.net/hnxs4cvq/9/ javascript/jquery: $(window).load(function(){ $(function () { $('.skillRangeSquare').click(function () {alert('hit!');}) }) }); html: &lt;span id="1" class="battlefieldSquare_Base battlefieldSquare_B " name="r1c1"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="2" class="battlefieldSquare_Base battlefieldSquare_A skillRangeSquare" name="r1c2"&gt;monster&lt;/span&gt; &lt;span id="3" class="battlefieldSquare_Base battlefieldSquare_B " name="r1c3"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="4" class="battlefieldSquare_Base battlefieldSquare_A " name="r1c4"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="5" class="battlefieldSquare_Base battlefieldSquare_B " name="r1c5"&gt; &amp;nbsp;&lt;/span&gt; &lt;br&gt; &lt;span id="11" class="battlefieldSquare_Base battlefieldSquare_A " name="r2c1"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="12" class="battlefieldSquare_Base battlefieldSquare_B " name="r2c2"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="13" class="battlefieldSquare_Base battlefieldSquare_A " name="r2c3"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="14" class="battlefieldSquare_Base battlefieldSquare_B " name="r2c4"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="15" class="battlefieldSquare_Base battlefieldSquare_A " name="r2c5"&gt; &amp;nbsp;&lt;/span&gt; &lt;br&gt; &lt;span id="21" class="battlefieldSquare_Base battlefieldSquare_B " name="r3c1"&gt; &amp;nbsp;&lt;/span&gt; &lt;span id="22" class="battlefieldSquare_Base battlefieldSquare_A skillRangeSquare" name="r3c2"&gt; monster&lt;/span&…
has comment: http://stackoverflow.com/comment/41333559
has answer: http://stackoverflow.com/a/26331370
has comment: http://stackoverflow.com/comment/41326608
has comment: http://stackoverflow.com/comment/41326285
has comment: http://stackoverflow.com/comment/41327266
has title: On a chessboard, one piece shoots another with a gun, how can I tell if any other pieces are in the crossfire?
has comment: http://stackoverflow.com/comment/41326625
has comment: http://stackoverflow.com/comment/41349471
has comment: http://stackoverflow.com/comment/41347046
has comment: http://stackoverflow.com/comment/41326321
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41333857

http://stackoverflow.com/comment/41192386
type: Comment
comment on: http://stackoverflow.com/q/26246971
type: QuestionComment
has text: a console.log() should never effect a page, which makes me think theres a bigger problem at hand, remove the log and check for errors, if you dont know how, just hit inspect element in chrome of FF and go to the console tab, it will display any errors that the JS is giving you, and could pinpoint the problem.
score: 0

http://stackoverflow.com/q/26217172
type: Question
score: 0
answer count: 1
has title: My JS selector for is not working
tagged with: javascript
linked to: http://stackoverflow.com/q/10920355
accepted answer: http://stackoverflow.com/a/26217227
has answer: http://stackoverflow.com/a/26217227
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41116022
type: AnsweredQuestion
has body: I'm using multiple Bootstrap dropdown controls and need to set a value to an input field when a list item of a specific dropdown is selected. For example, say I have 3 dropdowns: ulSaukContact ulMoselContact ulShipContact All three are running on the server, and I need to get the value of each so I can save them somewhere. So I figured I should probably save the value of each to a hidden input field that I can reference later. Here is my attempted JS code for doing this: $("#ulSaukContact li a").on("click", function () { alert('sauk'); // <--- Alert is not shown var elem = document.getElementById("inpSaukValue"); elem.Value = $(this).text(); }); and the accompanying markup Select a Saukville contact When I run the app and select a value in the Saukville dropdown, no alert is displayed. Note that the li's and a's within the ul is created on Form_Load so they can be populated with data. I think my selector is wrong. I cleared out my cached files in Chrome (which caused issues before) and I still do not see the alert. Any advice appreciated (thanks for all the recent JS/BS/JQ advice)...
duplicate of: http://stackoverflow.com/q/10920355

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/26241876
tags question: http://stackoverflow.com/q/26332646
tags question: http://stackoverflow.com/q/26293316
type: Tag
tags question: http://stackoverflow.com/q/26215002

http://stackoverflow.com/q/26213210
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41108712
has answer: http://stackoverflow.com/a/26213999
has body: I am an absolutely newby in node.js and I try to create a new project via this technology. I use express framework but on the start I have a little trouble. I have solved this trouble with workaround but I have a question for next behavior: My app.js var express = require('express') , routes = require('./routes/index') , routes = require('./routes/login'); var app = module.exports = express.createServer(); console.log(app.env); // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'ejs'); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(__dirname + '/public')); }); app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); }); app.configure('production', function(){ app.use(express.errorHandler()); }); // Routes app.use( function(req, res, next) { if (req.url == '/') { res.render('index', { title: 'Express!' }) } else { next(); } }); //app.get('/', routes.index); app.get('/login', routes.login); app.listen(3000, function(){ console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); }); In a block // Routes you can see app.use and app.get. If I try to use app.get instead of app.use I get error "cannot get /". I tried to put index.html file to my public folder. But fot "/" route I everytime got this file, not render of index.js. app.get('/login', routes.login); - is work fine, but something wrong with "/" route. I dont want to leave my code in this state, please, help me understand this behavior. Thank in advance.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41109025
tagged with: express
score: 0
accepted answer: http://stackoverflow.com/a/26213999
answer count: 1
has title: app.get is not working for base route
has comment: http://stackoverflow.com/comment/41108766

http://stackoverflow.com/comment/41279699
score: 0
type: AnswerComment
has text: Are you using the latest hammer.js? I didn't include jQuery hammer.
comment on: http://stackoverflow.com/a/26305595
type: Comment

http://stackoverflow.com/comment/41324875
type: QuestionComment
comment on: http://stackoverflow.com/q/26330441
has text: Do you want to collapse the currently visible section or remove the accordion from the page? Is it jQuery UI Accordion that you use?
score: 0
type: Comment

http://stackoverflow.com/comment/41231895
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26279876
has text: @Ian in some browsers that works, but it's not standard.

http://stackoverflow.com/a/26321341
type: Answer
has comment: http://stackoverflow.com/comment/41307962
has comment: http://stackoverflow.com/comment/41308008
has comment: http://stackoverflow.com/comment/41308303
has body: Change your selector $("submit") to $("form") and give name attribute to input tag . Also add event.preventDefault() to prevent default form action $(function() { $("form").submit(function(e) { e.preventDefault(); var data = $("form").serialize(); console.log(data); }); });
has comment: http://stackoverflow.com/comment/41307989
answers question: http://stackoverflow.com/q/26321311
has comment: http://stackoverflow.com/comment/41307981
has comment: http://stackoverflow.com/comment/41308766
has comment: http://stackoverflow.com/comment/41307926
score: 0
has comment: http://stackoverflow.com/comment/41308057

http://stackoverflow.com/q/26320985
type: Question
has title: Destroy bootstrap-popover after mousedown event is completed
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26321019
upvote count: 1
answer count: 1
has body: I want to destroy a specific popover when the mousedown event is completed. As long as the user presses on the mouse, the popover is visible. When the user isn't anymore, there should be a delay of let's say 3.5 seconds, then it should be destroyed. My current implementation displays the popover correctly as long as the mousedown is true, but when I release the mouse, the popover is destroyed immediately, without a delay. What shoud I do? jQuery: function destroyPopover(selector) { setTimeout(function () { $(selector).popover('destroy'); }, 3500); } ... $('#otp_table').on('mousedown', 'td', function() { $(this).popover({ container: 'body', content: 'Lorem ipsum', placement: 'top', }).popover('show'); }, hidePopover(this));
tagged with: javascript
tagged with: popover
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26321019
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41338965
type: Comment
type: QuestionComment
score: 0
has text: Can you show us how you tried to do it?
comment on: http://stackoverflow.com/q/26338162

http://stackoverflow.com/a/26294323
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26294188
has body: No, JavaScript is single threaded and runs only one function at a time. Although, if you have a callback function waiting for, say, a network request that happens to return at funcIsRunning = 1, that callback function will be put on the queue that is handled by the event loop JavaScript event loop explained
accepted answer of: http://stackoverflow.com/q/26294188
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26253958
type: Question
upvote count: 3
has answer: http://stackoverflow.com/a/26254810
answer count: 1
tagged with: google-closure-compiler
has title: Understanding relationship between Clojurescript and Google Closure Compiler
has body: Many tutorials have the goog/base.js file included in a script tag and then use goog.require('your_script') to start the app running. For example, here is the header of an HTML file from the linked tutorial: I understand that Google Closure Library is used to compile Clojurescript into Javascript. Why is it being required in the HTML page as well? Can't it compile itself (or its necessary components using advanced compilation) into the hello.js in the example above? What I really want is to only require a single javascript file and not the dozens of files in /goog/. Isn't that what a compiler is for? I just don't understand why it needs to be included in the page.
accepted answer: http://stackoverflow.com/a/26254810
tagged with: javascript
type: AnsweredQuestion
score: 3
downvote count: 0
favorite count: 0
tagged with: clojurescript

http://stackoverflow.com/comment/41143224
comment on: http://stackoverflow.com/q/26230833
type: Comment
type: QuestionComment
score: 0
has text: What do you mean by "original" image? Can u give an example or website address where it is done?

http://stackoverflow.com/q/26225672
favorite count: 0
has comment: http://stackoverflow.com/comment/41157705
has title: Highcharts: saving canvas image as local file in IE
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26241072
has comment: http://stackoverflow.com/comment/41160208
upvote count: 1
has comment: http://stackoverflow.com/comment/41159026
type: Question
tagged with: highcharts
tagged with: javascript
has body: I'm trying to code a javascript function that takes a Highcharts image, converts it to canvas, and downloads the file image locally (without going to the server). My problem is specifically with IE. I tried using msSaveBlob with Blob and MSBlobBuilder; in the first case the file downloads however the content is incorrect (the image is damaged when opened). Fist code uses Blob/msSaveBlob (see jsfiddle, run with IE): var image = canvas.toDataURL("image/jpeg"); if (navigator.msSaveBlob) { return navigator.msSaveBlob(new Blob([image],{type:"image/jpeg"}),"file23.jpeg"); } Second code uses MSBlobBuilder/msSaveBlob but doesn't generate a file (see jsfiddle, run with IE): var image = canvas.toDataURL("image/jpeg"); if (window.MSBlobBuilder) { var bb = new MSBlobBuilder(); bb.append(image); return navigator.msSaveBlob(bb, "file24.jpeg"); } Any ideas how to make any of these work? Is there a preferred method? I understand this will work for IE10+ only.
linked to: http://stackoverflow.com/q/16245767
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26241072

http://stackoverflow.com/comment/41347029
has text: The OPs code is using an anon function so Im not sure this will work if he can't refactor code to avoid that.
type: AnswerComment
comment on: http://stackoverflow.com/a/26342549
score: 0
type: Comment

http://stackoverflow.com/q/26321497
linked to: http://stackoverflow.com/q/5062499
tagged with: canvas
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26329476
has title: href anchor tag /css selector issue with canvas class instead of id
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 0
has comment: http://stackoverflow.com/comment/41316508
has body: I am using sketch.js html canvas library to paint on multiple pages in my e-book.In my application e-book pages are loaded dynamically upon loading book. So i injected multiple canvas sheets in some pages where i am supposed to draw like this : ......//page content $(pageContent).append(' '); and then calling the sketch function using each loop $('.simple_sketch').each(function() { $(this).sketch(); }); So far this works well, i can draw the painting on each page, but when i am trying to add tools (Marker size, colors, reset button), My href anchor tags does not work. My html mark up looks like this : style="background: #46a843;"> and here i am replacing id's '#' with class's '.' as $('.paint_tools a').attr('href').replace('#','.'); But seems it does not work, Can any one please point where i am missing to pick size and colors, Btw, i like to have only this as the only tool set for all canvases in book. Any kind of help much appreciated, Many many thanks in advance.
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/q/26196265
has body: I want to save an unlimited number of files to the users hard drive, without making the user click through a dialog box. The only documentation I have seen on using unlimited storage is here: https://developers.google.com/chrome/whitepapers/storage, which says that it is only available to Chrome apps. All of the examples I have seen of the Chrome fileSystem API suggest that in order to create a new file and write to it, the user needs to obtain an entry object from the chrome.fileSystem.chooseEntry function, which means the user needs to go through a dialog box. The regular fileSystem API looks like it can save a file to the user's extension sandbox without making the user go through a dialog box, but I'm wondering, does it have the "unlimitedStorage" permission that is only given to apps? It wouldn't shock me if only the Chrome API has that permission. If I use the regular fileSystem API, I need to request the filesystem using window.webkitRequestFileSystem (I'm a little surprised window.requestFileSystem isn't working for me in Chrome), but the method takes type ("persistent" or "temporary"), and size (the bytes the app will require for storage) arguments. You obviously don't do that in the Chrome API. However, the normal fileSystem API lets you request more storage when you need it using the Quota Management API, which is also documented on the page I linked above And on https://developers.google.com/chrome/apps/docs/developers_guide#manifest, it says: The "permissions" field lets you specify HTML5 permissions that the app requires. By specifying "unlimitedStorage" and "notifications", this app is able to use those HTML5 features without having to repeatedly ask the user for permission. During app installation, the user is told which permissions the app needs; installing the app implicitly grants those permissions for all pages whose URLs match those in the "apps" field of the manifest. So I'm hoping that the "unlimitedStorage" permission simply means that I can …
has comment: http://stackoverflow.com/comment/41091078
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/26259578
downvote count: 1
upvote count: 6
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/24284144
has comment: http://stackoverflow.com/comment/41194634
type: Question
has answer: http://stackoverflow.com/a/26204130
answer count: 2
has title: unlimited file storage in chrome app
score: 5
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26204130
tagged with: google-chrome-app
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/41085573
has comment: http://stackoverflow.com/comment/41188364
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26259578

http://stackoverflow.com/a/26347824
score: 0
answers question: http://stackoverflow.com/q/26347659
has comment: http://stackoverflow.com/comment/41375949
type: Answer
has body: No, that's not possible. JavaScript is (unless you use node.JS) running in you WebBrowser. php get's started by your apache webserver when the webserver gets an http request for example to http://localhost/test.php. So these two scripts run in two completely different scopes. If you want to start a php file (called REST-Service) you need to perform an ajax-request: JQuery style: (I don't like it but anyway...) $.ajax({url:"myTestFile.php",success:function(result){ $("#id").html(result); }}); Best regards Dustin
has comment: http://stackoverflow.com/comment/41359060
has comment: http://stackoverflow.com/comment/41356772

http://stackoverflow.com/comment/41223102
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26275074
has text: The question itself is not too bad – although you definitely should provide more information, e.g. a code example of what you've tried yourself so far. But why JavaScript? Ok, maybe to provide instant feedback. But you should definitely implement your password policies on the backend, too.

http://stackoverflow.com/comment/41313011
score: 0
type: Comment
type: QuestionComment
has text: There are two IIFE defining `myVar` and `myMethod` inside and returning`reuasableFunction` which then gets executed. When the IIFE's return the vars get cleared because they are not passed to `reusableFunction`. Also the vars are not 'visible' at the 'place' where `reusableFunction` is defined.
comment on: http://stackoverflow.com/q/26324121

http://stackoverflow.com/a/26250600
score: 0
has body: How about using on? It is dynamic and better than click. $(selector).on("click",function () { //Your Code to Execute }); Documentation: http://api.jquery.com/on/
has comment: http://stackoverflow.com/comment/41178525
type: Answer
answers question: http://stackoverflow.com/q/26250536
has comment: http://stackoverflow.com/comment/41178588

http://stackoverflow.com/q/26287562
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26287647
has comment: http://stackoverflow.com/comment/41246766
answer count: 4
linked to: http://stackoverflow.com/q/1016043
tagged with: javascript
has answer: http://stackoverflow.com/a/26287609
has answer: http://stackoverflow.com/a/26287606
has comment: http://stackoverflow.com/comment/41246737
has answer: http://stackoverflow.com/a/26287593
duplicate of: http://stackoverflow.com/q/1016043
type: AnsweredQuestion
has body: Consider this line of code: var currentTime = new Date(); Did it look at my IP address? Did it talk to my local machine? How javascript determines what current time in my time zone is?
possible better answer: http://stackoverflow.com/a/26287593
favorite count: 0
type: Question
tagged with: time
accepted answer: http://stackoverflow.com/a/26287609
has title: How javascript determines what current date is?
score: 0

pointer-events
tags question: http://stackoverflow.com/q/26218146
tag name: pointer-events
type: Tag

http://stackoverflow.com/a/26232965
has body: You're looking at the src property, which is resolved relative to the document; a blank relative URL resolves to the same URL as the document it's in. If you want to know if the attribute is blank, look at the attribute with attr: var missingImg = !promoImg.attr('src'); // A blank string is falsey, so !"" is true console.log("attr: " + promoImg.attr('src')); Updated Fiddle
accepted answer of: http://stackoverflow.com/q/26232907
upvote count: 4
has comment: http://stackoverflow.com/comment/41145562
answers question: http://stackoverflow.com/q/26232907
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41150415
type: Answer

http://stackoverflow.com/comment/41222841
type: QuestionComment
comment on: http://stackoverflow.com/q/26274967
score: 0
has text: I put a code example in my question that uses `bind`.
type: Comment

http://stackoverflow.com/comment/41147847
type: Comment
has text: You can use hidden control and fetch the value from there
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26234235

http://stackoverflow.com/comment/41120583
type: AnswerComment
has text: That is as far as I can see only needed in PHP when not using ajax
type: Comment
comment on: http://stackoverflow.com/a/26219475
score: 0

http://stackoverflow.com/q/26275881
tagged with: python
has answer: http://stackoverflow.com/a/42536370
tagged with: node.js
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26956604
accepted answer: http://stackoverflow.com/a/26956604
type: Question
has body: I'm trying to install an atom package that uses node-gyp. But it crashes each time. Here's the apm output: Installing autocomplete-clang to /home/lars/.atom/packages ✗ &gt; runas@1.0.1 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/clang-flags/node_modules/pathwatcher/node_modules/runas &gt; node-gyp rebuild &gt; runas@0.5.4 install /tmp/apm-install-dir-11499-22706-1lgjxbx/node_modules/autocomplete-clang/node_modules/snippets/node_modules/pathwatcher/node_modules/runas &gt; node-gyp rebuild npm http GET https://registry.npmjs.org/underscore-plus npm http GET https://registry.npmjs.org/clang-flags npm http 304 https://registry.npmjs.org/underscore-plus npm http 304 https://registry.npmjs.org/clang-flags npm http GET https://registry.npmjs.org/underscore npm http GET https://registry.npmjs.org/pathwatcher npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/emissary npm http GET https://registry.npmjs.org/loophole npm http GET https://registry.npmjs.org/fs-plus npm http GET https://registry.npmjs.org/pathwatcher npm http GET https://registry.npmjs.org/pegjs npm http GET https://registry.npmjs.org/season npm http GET https://registry.npmjs.org/temp npm http 304 https://registry.npmjs.org/underscore npm http 304 https://registry.npmjs.org/fs-plus npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/pegjs npm http 304 https://registry.npmjs.org/season npm http 304 https://registry.npmjs.org/pathwatcher npm http 304 https://registry.npmjs.org/pathwatcher npm http GET https://registry.npmjs.org/emissary npm http GET https://registry.npmjs.org/event-kit npm http 304 https://registry.npmjs.org/temp npm http GET https://registry.npmjs.org/nan/1.2.0 npm http GET https://registry.npmjs.org/grim npm http GET https://registry.npmjs.org/q npm http GET https://registry.npmjs.org/runas npm http 304 https://registry.npmjs.org/emissary npm http 304 https://registry.npmjs.or…
has title: atom editor: node-gyp rebuild crashes
tagged with: javascript
possible better answer: http://stackoverflow.com/a/42536370
linked to: http://stackoverflow.com/q/21155922
tagged with: atom-editor
answer count: 2
downvote count: 0
tagged with: node-gyp
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/41148066
has text: In the fiddle you can see that the first slide of images is fading in one by one. In the second batch, they all appear simultaneously.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26233364

http://stackoverflow.com/a/26236755
upvote count: 8
type: AcceptedAnswer
has body: Use .wrapInner() over the parent element, $('.wrap1').wrapInner("&lt;div class='new' /&gt;"); DEMO
accepted answer of: http://stackoverflow.com/q/26236690
type: Answer
answers question: http://stackoverflow.com/q/26236690
score: 8
downvote count: 0

http://stackoverflow.com/comment/41324299
comment on: http://stackoverflow.com/q/26329402
has text: no, probably not (without refactoring plugin source) but why does button need to be in the datepicker itself?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41196200
has text: @Chandan Jha: Have you tried the F12 Network tool as suggested? What was the network response?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26253622
type: Comment

http://stackoverflow.com/comment/41219585
has text: I'll post an answer with a bit more detail in an hour or so.
type: QuestionComment
comment on: http://stackoverflow.com/q/26272244
type: Comment
score: 0

http://stackoverflow.com/q/26336029
has comment: http://stackoverflow.com/comment/41347609
has comment: http://stackoverflow.com/comment/41349534
possible better answer: http://stackoverflow.com/a/26352650
has answer: http://stackoverflow.com/a/26352650
has comment: http://stackoverflow.com/comment/41350502
has comment: http://stackoverflow.com/comment/41350603
has title: link jQuery file with Spring MVC
tagged with: spring
has body: I have an issue in linking jQuery file, have placed the .js file under WebContent --js -----toggle.js file structure is shown in... (https://i.sstatic.net/4lZpj.png) Web.xml file <?xml version="1.0" encoding="UTF-8"?> FirstSpringMVCProject spring-dispatcher org.springframework.web.servlet.DispatcherServlet spring-dispatcher / Spring-dispatcher-servlet.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <context:component-scan base-package="com.gontuseries.studentadmissioncontroller" /> <mvc:resources mapping="/css/**" location="/css/" /> <mvc:resources mapping="/js/**" location="/js/" /> <mvc:annotation-driven/> /WEB-INF/ .jsp but .js file is not linked up, please give me a directions, thanks in advance!!!
has answer: http://stackoverflow.com/a/26356258
tagged with: spring-mvc
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41350179
tagged with: java
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26356258
has comment: http://stackoverflow.com/comment/41350840
score: 0

http://stackoverflow.com/comment/41129327
score: 0
type: AnswerComment
type: Comment
has text: @DJDavid98 Yeah, 0 in this whole question.
comment on: http://stackoverflow.com/a/26223492

http://stackoverflow.com/comment/41077701
type: Comment
comment on: http://stackoverflow.com/a/26196191
score: 0
has text: My bad, I didn't notice that. The question is why use a library when native Jquery does what he wants ?
type: AnswerComment

http://stackoverflow.com/q/26255253
tagged with: javascript
has comment: http://stackoverflow.com/comment/41187687
tagged with: google-maps-api-3
downvote count: 0
tagged with: asp.net
favorite count: 0
has title: Google Maps API v3 load fail - is there is any size limit in return map data?
type: UnansweredQuestion
answer count: 0
score: 1
has body: I am using Google Maps API v3 in my ASP.Net application.Following information are displayed in the map Points with Image Icon Info windows to display Name, Address 1, Address 2, Address 3, City, State, Postal information Polylines Map loads perfect if the request has 590 Points with Image Icon, 590 Info windows and 420 Polylines, but the map fails to load if my request exceeds that and I did not get any error response from google as well. I have been through the following 2 KB and my google map request fall in the range, less than 25 000 map loads per day https://developers.google.com/kml/documentation/mapsSupport https://developers.google.com/maps/faq#usagelimits Could any one suggest or help me to fix this problem?
upvote count: 1
type: Question

http://stackoverflow.com/q/26323246
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26323294
tagged with: css
has body: I've been trying to make a 'slideshow' that has content and a button underneath, when clicked, reveals more content.I've only been able to do css fades which isn't really what i'm after. I shy away from javascript and JQuery because i haven't learnt that yet and am still trying to master css and html. I can't upload a picture because i lack the reputation, but could you perhaps show me a right path on how to code this? Thank you very much
type: Question
has title: how to code a slideshow with content but no pictures?

http://stackoverflow.com/a/26255485
answers question: http://stackoverflow.com/q/26255002
has comment: http://stackoverflow.com/comment/41186843
has comment: http://stackoverflow.com/comment/41187811
has body: Have you set geolocation in emulator? Specify the coordinates of position in emulator. Eclipse -> Open Perspective -> DDMS -> Emulator Control -> Location Controls Specify the coordinates of the position and press "Send" . referred from [Here]PhoneGap. Failed to start Geolocation service
score: 0
has comment: http://stackoverflow.com/comment/41188021
type: Answer
has comment: http://stackoverflow.com/comment/41187898

http://stackoverflow.com/a/26250582
answers question: http://stackoverflow.com/q/26250536
has comment: http://stackoverflow.com/comment/41178499
score: 0
type: Answer
has body: Here JSFIddle for this -- http://jsfiddle.net/Arindamnayak/r53t3f6d/ $("h2").click(function() { $(this).html("STOP"); }); GO
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/41222215
score: 0
has text: I don't see gaps here: http://jsfiddle.net/jg54Lb5y/5/ must be something else...
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26273982

http://stackoverflow.com/q/26291111
has comment: http://stackoverflow.com/comment/41253136
has answer: http://stackoverflow.com/a/26291392
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26291127
linked to: http://stackoverflow.com/q/13178028
possible better answer: http://stackoverflow.com/a/26291238
answer count: 4
has answer: http://stackoverflow.com/a/26291238
type: AnsweredQuestion
score: 1
upvote count: 1
has body: ok so I managed to print a whole ul doing this: console.log(document.querySelectorAll("ul#treatments-list")[0]); Now my problem is to reach the first li to give it a className.
type: Question
has title: finding the first li of an ul to set its class
accepted answer: http://stackoverflow.com/a/26291127
has answer: http://stackoverflow.com/a/26291145
tagged with: javascript

http://stackoverflow.com/q/26198156
has comment: http://stackoverflow.com/comment/57482320
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/41081158
has title: Prevent users from updating a value in a text box after it is selected from an autocompleting list
type: Question
score: 3
has comment: http://stackoverflow.com/comment/57482550
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/41081357
has comment: http://stackoverflow.com/comment/59905459
tagged with: jquery
has comment: http://stackoverflow.com/comment/41081116
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41081188
has body: I have a text box which is an autocomplete field allowing the user to enter values into it but user is able to change the value after selecting from the list of populated values. In order to avoid that, I tried using combobox, but combobox doesn't seem to work with input and it only works with select. In my case, I cannot use select as the values coming up are from a database table and not any predefined values. Is there any way to avoid users from selecting any values other than the ones in the autopopulating list into the text field? I beleive we can do this with jQuery, as I am not having enough knowledge on jQuery, I am unable to check any solution for it. Can anyone help me out with this?

http://stackoverflow.com/comment/41095489
type: Comment
comment on: http://stackoverflow.com/a/26204636
score: 0
type: AnswerComment
has text: I see. How would I do that exactly?

http://stackoverflow.com/a/26287841
answers question: http://stackoverflow.com/q/26287745
downvote count: 0
type: AcceptedAnswer
has body: The simplest way I can think of is to: use hsl (Hue, Saturation, Lightness) colors. The range is expressed like: hsl([0-360], [0-100]%, [0-100]%) HUE SATUR. LIGHT. Think of Hue as a 360° clockwise wheel, where 0 and 360 are Red, in between you have all the other ones: Now you can retrieve from that wheel 12 basic colors moving by steps of 30° : 0% : RED 30% : ORANGE 60% : YELLOW 90% : CHARTREUSE GREEN 120%: GREEN 150%: TURQUOISE 180%: CYAN 210%: AZURE 240%: BLUE 270%: VIOLET 300%: MAGENTA 330%: ROSE You can than generate some steps of lightness and saturation at random or by (i.e.) 20% steps. Saturation: Having lightness at 50% and setting Saturation at 0% you'll get the exact equivalent of Pure Gray (HEX: #808080 RGB: rgb(128,128,128) *Wiki: Middle Gray) so think of saturation as a gray-to-full-color unit. Lightness, range from 0% being black to 100% as white - applied to a selected color. (Logically from the above you can conclude that lightness affects Saturation also.) Let's put the above together! // DOM Utils const el = (sel, par = document) => par.querySelector(sel); const elNew = (tag, prop) => Object.assign(document.createElement(tag), prop); // Utils const rand = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min; // TASK: Random colors shades generator const numOfShades = 20; // Set here the Desired number of Shades const elSelect = el("#color"); const elResult = el("#result"); const elGenerate = el("#generate"); const createShadeElement = (hsl) => { const elShade = elNew("span"); elShade.style.backgroundColor = hsl; elResult.appendChild(elShade); }; const generateShades = () => { elResult.innerHTML = ""; // Empty current results const hue = elSelect.value; // The Select Value: 0->360 createShadeElement(`hsl(${hue}, 100%, 50%)`); // Create The main color for(var i=0; i<numOfShades; i++){ // and create all the other shades const hsl = `hsl(${hue}, ${rand(10,90)}%, ${rand(10, 90)}%)`; createShadeElement(hsl); } }; elGenerate.addEventListener("c…
type: Answer
accepted answer of: http://stackoverflow.com/q/26287745
score: 14
upvote count: 14

http://stackoverflow.com/comment/41269941
has text: You need tspans then. I've adjusted my answer.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26299779

http://stackoverflow.com/a/26289596
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26250461
downvote count: 0
has body: I finally figured out a way to do this using Mario's answer here, in case anyone in the future is interested: I popped this at the start of the head in my index.html file: &lt;script&gt; function detectIE() { var ua = window.navigator.userAgent; var msie = ua.indexOf('MSIE '); var trident = ua.indexOf('Trident/'); if (msie &gt; 0) { // IE 10 or older =&gt; return version number return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); } if (trident &gt; 0) { // IE 11 (or newer) =&gt; return version number var rv = ua.indexOf('rv:'); return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); } // other browser return false; } // making sure it's working.. console.log(detectIE()); // this is important: if you just say &lt;= 10 then it will also accept ZERO // and ZERO is = false, which makes good browsers like Chrome detect as IE if (detectIE() &gt;= 1 &amp;&amp; detectIE() &lt;= 10) { console.log('this is below ie10'); } else { // add my script for polymer var script = document.createElement("script"); script.type = "text/javascript"; script.src = "/bower_components/platform/platform.js"; //put it at the start of the head tag document.getElementsByTagName('head')[0].appendChild(script); } &lt;/script&gt; I have noticed a tiny bit of lag sometimes when the website first loads, but it's not too bad. This will have to do until I get better at using stuff like Modernizr.

http://stackoverflow.com/comment/41108102
comment on: http://stackoverflow.com/q/26212906
score: 0
type: Comment
type: QuestionComment
has text: What is the error message you are getting ? Try using `angular.toJson(data)` in the `console.log()` on the Error callback and post the error message here.

http://stackoverflow.com/comment/41220116
has text: What is the print() function?
type: QuestionComment
comment on: http://stackoverflow.com/q/26272994
type: Comment
score: 0

http://stackoverflow.com/q/26305779
has comment: http://stackoverflow.com/comment/41279724
accepted answer: http://stackoverflow.com/a/26312234
tagged with: unit-testing
has comment: http://stackoverflow.com/comment/41280484
type: AnsweredQuestion
tagged with: javascript
type: Question
tagged with: karma-jasmine
score: 0
has answer: http://stackoverflow.com/a/26312234
answer count: 1
has title: How do I unit test a service-dependent function in Jasmine?
tagged with: jasmine
has body: I would like to unit test a function in an Angular controller that relies on an asynchronous API call (a promise). I have a function in a controller that calls a service and sets a $scope variable in the controller based on the result of the service: $scope.display = 'loading'; $scope.loadData = function() { ApiService.getSummary().then( function (response) { $scope.displayData(response.data); $scope.display = 'boxes'; }, function (error) { $scope.display = 'error'; } ); }; I have the following Jasmine unit test var FunctionFixtures = { successFunc: function() { var deferred = $q.defer(); var response = { 'data': dataVar }; deferred.resolve(response); return deferred.promise; }, errorFunc: function() { var deferred = $q.defer(); deferred.reject(); return deferred.promise; } }; it('should show the boxes on data load success', function(){ spyOn(ApiService, 'getSummary').and.callFake(FunctionFixtures.successFunc); $scope.loadData(); expect($scope.display).toBe('boxes'); }); When I run the test, I get the following error: Error: Expected 'loading' to be 'boxes'. I essentially want to fake the api call and return either a success or a failure and ensure that $scope.display is set to the appropriate string i.e. 'boxes' for success and 'error' failure. Any thoughts on how to do this?
tagged with: angularjs

http://stackoverflow.com/comment/41208785
has text: The really short answer is that there's no equivalent to `with`. The only thing that comes close is `ngController`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26266593

http://stackoverflow.com/a/26341929
type: Answer
has comment: http://stackoverflow.com/comment/41346456
answers question: http://stackoverflow.com/q/26335435
has body: For your particular question, do not put your results in an if statement yet. Do this instead, just to see what you're working with: console.log( results.toString() ); console.log( JSON.stringify( results ) ); //sometimes this throws errors, if the object is complex That should let you see what you're working with. If reulsts isn't an array, it won't have a .length attribute, and you won't reach the console.log. However... I'm always pushing KnexJS when I see raw MySQL statements in Node code. Knex handles two common things for you, db connections and connection pools, plus makes writing dynamic queries a breeze. (as in, you don't have to manipulate SQL strings...) Install knex npm install knex --save In your app or environment setup var Knex = require('knex'); Knex.knex = Knex({...}); //set options for DB In other files, reference the instance like this: var knex = require('knex).knex; So your query could look like this: var query = knex('messages').select(); console.log('About to perform query: ' + query.toString() ); query.exec( function( err, results ){ if(error){ console.log("test"); } console.log(results); //do other things here, like callback(results); } ); Good luck!
score: 0
has comment: http://stackoverflow.com/comment/41348689
has comment: http://stackoverflow.com/comment/41346694

http://stackoverflow.com/comment/41131759
type: Comment
comment on: http://stackoverflow.com/a/26224313
score: 0
type: AnswerComment
has text: @JuniorMaia the script that outputs JSON should one print out JSON remove the and other tags. The file should start with <?php on the first line

http://stackoverflow.com/comment/41281602
type: QuestionComment
has text: Take a look at Josh R.'s answer; I updated it with JavaScript.
score: 0
comment on: http://stackoverflow.com/q/26303744
type: Comment

http://stackoverflow.com/comment/41129849
score: 0
type: QuestionComment
type: Comment
has text: Yes, I do have control over the iframe. Your suggestion seems viable, i'll give it a try. This function would be called onLoad for the right?
comment on: http://stackoverflow.com/q/26223874

http://stackoverflow.com/comment/41100857
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26208630
type: QuestionComment
has text: You also need to put quotes around strings like `denver` and `hawks`. You need to learn basic Javascript syntax before you can hope to write an application using it.

http://stackoverflow.com/q/26334972
has comment: http://stackoverflow.com/comment/41341298
tagged with: three.js
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Three.js imported model antialiasing
has comment: http://stackoverflow.com/comment/41333972
type: Question
has body: I import an OBJ model into a scene, but it is not antialiased and I can't figure out, how to make it smooth. And blender opens it smoothed. Also built-in geometry (e.g. new THREE.SphereGeometry(4, 20, 20);) is smooth. Renderer: var renderer = new THREE.WebGLRenderer({antialias: true, alpha: true}); Material: var modelMaterial = new THREE.MeshPhongMaterial({ color: 0xb9d5ff, ambient: 0xfff660, shininess: 100, wireframe: false, transparent: true, opacity: 0.8, side: THREE.DoubleSide, combine: THREE.MixOperation }); Import: var manager = new THREE.LoadingManager(); manager.onProgress = function(item, loaded, total) { console.log(item, loaded, total); }; var loader = new THREE.OBJLoader(manager); loader.load('BlondeElexis-nude.obj', function(object) { object.traverse(function(child) { if (child instanceof THREE.Mesh) { console.log(child); child.material = modelMaterial; } }); object.position.y = 0; object.scale.x = 6; object.scale.y = 6; object.scale.z = 6; human = object; scene.add(human); }); Result:
tagged with: javascript
has answer: http://stackoverflow.com/a/26336239
upvote count: 2
accepted answer: http://stackoverflow.com/a/26336239
has comment: http://stackoverflow.com/comment/41338085
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41333767
favorite count: 0

http://stackoverflow.com/q/26240765
has comment: http://stackoverflow.com/comment/41262676
has comment: http://stackoverflow.com/comment/41160747
type: AnsweredQuestion
has title: call angular function from plain javascript in head
possible better answer: http://stackoverflow.com/a/26240961
type: Question
has body: This is a poorly formed question, but I don't yet have the knowledge to articulate it. I have also inherited a messy project so I can't really give much example code. I have defined a function $scope.$back in a controller testCtrl which exists in the angular.module('messyApp'). This is on a separate js page main.js. I want to call this function from a plain javascript script in the header when I trigger an onkeydown event after the angular stuff has loaded. I have an idea I need to call angulars $apply function after, but I cannot figure out how to access any of these functions, as I get the error they are undefined. I am using $routeProvider to asign the testCtrl controller. Here's some code that may be of some use; ...loads of scripts and stuff... ...tons more scripts... The angular function $back() triggers on a hyperlink elsewhere in the page using so if it really comes to it, I could accept an even more hacky solution of the js triggering this hyperlink instead (which would trigger the angular, I assume).
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26241548
accepted answer: http://stackoverflow.com/a/26241548
score: 0
has answer: http://stackoverflow.com/a/26240961
has comment: http://stackoverflow.com/comment/41160460
has comment: http://stackoverflow.com/comment/41161010
tagged with: angularjs

http://stackoverflow.com/a/26199807
has body: Finally found it. After two days. I refered to jquery.js twice. And I don't know why, it really caused the error. After I dismiss one of them, my problem solved. Thanks for everyone who tried to help me :)
answers question: http://stackoverflow.com/q/26199557
score: 0
type: Answer

http://stackoverflow.com/q/26262048
answer count: 4
tagged with: cordova
tagged with: web-applications
has answer: http://stackoverflow.com/a/26262688
type: Question
tagged with: ios
has comment: http://stackoverflow.com/comment/41199819
tagged with: javascript
has answer: http://stackoverflow.com/a/27992421
score: 4
has comment: http://stackoverflow.com/comment/44294766
upvote count: 4
has comment: http://stackoverflow.com/comment/44344791
has title: Cordova / Phonegap lock the source app code to be not edited/hacked
has answer: http://stackoverflow.com/a/27931812
downvote count: 0
has body: Everyone knows cordova and phonegap uses a webview so the app contains html and js and css files, which means they can be edited. What i am wondering, is there any way to lock/ make these files not editable once the app is installed on the phone? hide the code in some way ? Could be great to know much about this, however this should be what app stores should do , hiding the code should be not done by developers i guess, but if you have any trick/idea/ clue please share it! thank you!
has comment: http://stackoverflow.com/comment/44294837
favorite count: 0
has comment: http://stackoverflow.com/comment/44355428
type: UnansweredQuestion
tagged with: android
has answer: http://stackoverflow.com/a/26262469

websocket
tags question: http://stackoverflow.com/q/26204654
tags question: http://stackoverflow.com/q/26213819
tags question: http://stackoverflow.com/q/26242405
tags question: http://stackoverflow.com/q/26297431
tags question: http://stackoverflow.com/q/26340978
tags question: http://stackoverflow.com/q/26276952
type: Tag
tags question: http://stackoverflow.com/q/26310691
tags question: http://stackoverflow.com/q/26347224
tags question: http://stackoverflow.com/q/26303597
tag name: websocket
tags question: http://stackoverflow.com/q/26222890
tags question: http://stackoverflow.com/q/26212032
tags question: http://stackoverflow.com/q/26216075
tags question: http://stackoverflow.com/q/26311600
tags question: http://stackoverflow.com/q/26314740
tags question: http://stackoverflow.com/q/26299403

http://stackoverflow.com/a/26311656
score: 1
answers question: http://stackoverflow.com/q/26311456
downvote count: 0
has comment: http://stackoverflow.com/comment/41290314
has body: There are multiple problems with your code: The regex is wrong. Passing an undefined argument to getAllWords() and somehow expecting the result to end up in that variable. $.get() is asynchronous so you can't use it's result in the next line of code. Here's one approach that would work. This fixes the regex and adds a callback argument that gets called when the data is available: $(document).ready(function(){ function getAllWords(fn) { $.get("wordlist.txt", function(data) { var words = data.split(/\s+/); fn(words); }); } getAllWords(function(words) { console.log(words); }); }); Or, using jQuery promises (which is my preferred way of handling async operations): $(document).ready(function(){ function getAllWords(fn) { return $.get("wordlist.txt").then(function(data) { return data.split(/\s+/); }); } getAllWords.then(function(words) { console.log(words); }); });
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41290222

http://stackoverflow.com/comment/41299122
has text: Uploading the image is only available on paid plans. `Image uploads are available on all paid plans.`. See this: http://feedback.uservoice.com/forums/1-general-feedback/suggestions/2764526-upload-and-host-embedded-images-within-uservoice
comment on: http://stackoverflow.com/q/26267393
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/126113302
has text: like this JS throws the error (Uncaught ReferenceError: _ is not defined), better is to check like in accepted answer also for "_" as a function with typeof.
comment on: http://stackoverflow.com/a/37594795
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41346182
has text: But you need to have stricture {y:4098} not custom field name
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26341963

http://stackoverflow.com/comment/41080161
score: 1
comment on: http://stackoverflow.com/a/26197717
has text: @MelanciaUK Could be, the question is not the clearest. But I think OP wants to access the original parent_id inside the callback.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26273090
upvote count: 1
has body: Make an array with all your messages, and increase a counter inside the setInterval function. You can take a look at the sample in this fiddle: http://jsfiddle.net/s6c4hs91/ var v = {}; v[0] = "Your Text&lt;br/&gt;Hello"; v[1] = "Your Text2&lt;br/&gt;Hello2"; v[2] = "Your Text3&lt;br/&gt;Hello3"; var i = 0; window.setInterval(function () { $("#dynamicMessage").html(v[i]); if (i == 2) { i = 0; } else { i = i + 1; } }, 500); You should control how you want the messages to appear after you get to the end of the array of messages: I have done a loop to start with the first message. For doing the fade in/out transition just add those functions arounfd the html "write" sentence: $("#dynamicMessage").fadeOut(800,'swing',$("#dynamicMessage").html(v[i]).fadeIn(100)); view sample in: http://jsfiddle.net/s6c4hs91/1/ For more info. on fade in take a look at: http://www.w3schools.com/jquery/eff_fadein.asp
score: 1
accepted answer of: http://stackoverflow.com/q/26272739
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41220247
answers question: http://stackoverflow.com/q/26272739
type: Answer

http://stackoverflow.com/a/26342872
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26342837
answers question: http://stackoverflow.com/q/26342837
has body: You need to assign a boolean value to the checked property, not a string. false or true not 'False' and not 'false'. 'false' and 'False' are both true values when coerced into a boolean.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3

http://stackoverflow.com/q/26337905
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26338034
score: 4
tagged with: underscore.js
accepted answer: http://stackoverflow.com/a/26338034
has title: Underscore debounce with arguments
answer count: 1
tagged with: javascript
upvote count: 4
type: AnsweredQuestion
has body: Suppose I have this event handler: var mousewheel = function (e) { /* blah */ }; But, I want to debounce it. So I do this, which works as expected: var mousewheelDebounced = _.debounce(mousewheel, 500); $(document).on("mousewheel", function (e) { e.preventDefault(); mousewheelDebounced(e); } But this doesn't work as expected: $(document).on("mousewheel", function (e) { e.preventDefault(); _.debounce(mousewheel, 500)(e); } I prefer the compactness of the second form. But no debouncing occurs. I assume no reference to the mousewheelDebounced remains, so the underlying handler is called every time. Is that the reason? How can I clean up this code, if possible? You can see a fiddle here.
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/41148031
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26232452
score: 0
has text: I recommend $.ajax().always() for 3rd function. `$.ajax() .done() .fail() .always()` always will trigger when the ajax finish everything.

http://stackoverflow.com/comment/42036747
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26315858
has text: @WayzoftheKomodo I have edited the missing html for the second slider into your html (with comments, easy to find). Now you must look how many images with filename `c` (c1, c2, ...) you have and set that number to `var slider2 = slide('c', speed, amount of images)`.
score: 0

http://stackoverflow.com/q/26280445
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/26281035
has comment: http://stackoverflow.com/comment/41233854
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41233580
has body: My datepicker only changes the date in the first row of the table. I create one row of the table and then when a person clicks add, this row is cloned and appended to the table. The datepicker works after cloning but only changes value in the first row. This only happens when I destroy and deploy datepicker every time the row is cloned, otherwise the datepicker only works in the first row of my table. Any help? Thanks HTML code Javascript $('#add-row').on('click', function (e) { e.preventDefault(); //datepicker does not work witout being created and destroyed on each row. //$('.datepicker').datepicker('destroy'); var tableBody = $('#periodsTable > tbody'); var lastRowClone = $('tr:last-child', tableBody).clone(); //setting periodId to -1 for any created periods $('td:first input[name=periodIds]', lastRowClone).val("-1"); tableBody.append(lastRowClone); //$(".datepicker").datepicker(); });
possible better answer: http://stackoverflow.com/a/70687414
has comment: http://stackoverflow.com/comment/41233519
has answer: http://stackoverflow.com/a/70687414
score: 0
has comment: http://stackoverflow.com/comment/41233185
has answer: http://stackoverflow.com/a/26281035
has comment: http://stackoverflow.com/comment/41233672
has comment: http://stackoverflow.com/comment/41233334
has comment: http://stackoverflow.com/comment/41233483
has comment: http://stackoverflow.com/comment/41233136
has comment: http://stackoverflow.com/comment/41233178
has title: Datepicker only changes date in first row of table
has comment: http://stackoverflow.com/comment/41232707
has comment: http://stackoverflow.com/comment/41233367

http://stackoverflow.com/comment/49113133
comment on: http://stackoverflow.com/q/26309021
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [Splitting string is better or json parse in javascript](http://stackoverflow.com/questions/15615748/splitting-string-is-better-or-json-parse-in-javascript)

http://stackoverflow.com/comment/41154343
score: 0
comment on: http://stackoverflow.com/q/26236136
type: Comment
type: QuestionComment
has text: Your html should work (with your updated $scope.fruit assignment). How many blank "li"/bullets do you get on the page? Does that number equal the number of objects in your array?

http://stackoverflow.com/comment/41292346
score: 0
type: QuestionComment
has text: Also script's don't have to be put in the head tag: http://stackoverflow.com/q/436411/3492895
type: Comment
comment on: http://stackoverflow.com/q/26312886

http://stackoverflow.com/q/26339605
has answer: http://stackoverflow.com/a/26342217
score: 0
answer count: 2
has title: How to get text generated by JS in Selenium?
possible better answer: http://stackoverflow.com/a/58884390
has comment: http://stackoverflow.com/comment/41346124
tagged with: python
has body: I am trying to get the text "Incorrect Credentials" which is placed on page (js) when the user enters an incorrect user name and password... login_button.click() self.driver.implicitly_wait(10) # seconds get_conformation_message = self.driver.find_element(By.XPATH, '//*[@id="toast-container"]/div/div[1]') noz.assert_equal(get_conformation_message.text, "Incorrect Credentials") I have set a wait time of 10 seconds to make sure the element is on the page, but my test still fails with.... noz.assert_equal(get_conformation_message.text, "Incorrect Credentials") nose.proxy.AssertionError: '' != 'Incorrect Credentials' + Incorrect Credentials This is the rendered html... × Incorrect Credentials Incorrect Email/Password How can I get this to work in Selenium?
accepted answer: http://stackoverflow.com/a/26342217
type: AnsweredQuestion
tagged with: selenium
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/58884390

http://stackoverflow.com/a/26236030
has body: Just store the bound listener on your instance: functin Carousel(…) { … this.callMyClassFunction = this.callMyClassFunction.bind(this); } Carousel.prototype.callMyClassFunction = function(){ console.log(this); }; Carousel.prototype.addEventListeners = function(){ this.button.on('click', this.callMyClassFunction); }; Carousel.prototype.removeEventListeners = function(…){ … this.button.removeListener('click', this.callMyClassFunction); };
accepted answer of: http://stackoverflow.com/q/26235922
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26235922

http://stackoverflow.com/comment/41202979
has text: Is the css file located on qa.hubble.in?
score: 0
comment on: http://stackoverflow.com/q/26264006
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41221162
type: AnswerComment
has text: Adding it twice to the find array also works and I think I am satisfied with that thanks a lot!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26273898

http://stackoverflow.com/comment/41096124
comment on: http://stackoverflow.com/a/26206434
type: AnswerComment
score: 0
type: Comment
has text: I usually develop for the worst case scenario, even if it means using a little more code.. But you're right, for small companies it doesn't really matter

http://stackoverflow.com/comment/41086801
has text: not sure. how make I make sure. I added $("svg").ready(function(){ , and inside it I change text from "sample text" to "hello" and it changes. so I guess, its loading.
comment on: http://stackoverflow.com/q/26201397
type: Comment
type: QuestionComment
score: 0

jquery
tags question: http://stackoverflow.com/q/26270723
tags question: http://stackoverflow.com/q/26217740
tags question: http://stackoverflow.com/q/26284548
tags question: http://stackoverflow.com/q/26302532
tags question: http://stackoverflow.com/q/26253814
tags question: http://stackoverflow.com/q/26287375
tags question: http://stackoverflow.com/q/26302177
tags question: http://stackoverflow.com/q/26282221
tags question: http://stackoverflow.com/q/26342314
tags question: http://stackoverflow.com/q/26328604
tags question: http://stackoverflow.com/q/26329695
tags question: http://stackoverflow.com/q/26202597
tags question: http://stackoverflow.com/q/26317733
tags question: http://stackoverflow.com/q/26242004
tags question: http://stackoverflow.com/q/26315497
tags question: http://stackoverflow.com/q/26287626
tags question: http://stackoverflow.com/q/26211249
tags question: http://stackoverflow.com/q/26284277
tags question: http://stackoverflow.com/q/26194893
tags question: http://stackoverflow.com/q/26276609
tags question: http://stackoverflow.com/q/26327082
tags question: http://stackoverflow.com/q/26266138
tags question: http://stackoverflow.com/q/26220063
tags question: http://stackoverflow.com/q/26341935
tags question: http://stackoverflow.com/q/26199388
tags question: http://stackoverflow.com/q/26283218
tags question: http://stackoverflow.com/q/26281217
tags question: http://stackoverflow.com/q/26315321
tags question: http://stackoverflow.com/q/26304814
tags question: http://stackoverflow.com/q/26284461
tags question: http://stackoverflow.com/q/26231564
tags question: http://stackoverflow.com/q/26241478
tags question: http://stackoverflow.com/q/26198583
tags question: http://stackoverflow.com/q/26234320
tags question: http://stackoverflow.com/q/26312532
tags question: http://stackoverflow.com/q/26200787
tags question: http://stackoverflow.com/q/26325365
tags question: http://stackoverflow.com/q/26279784
tags question: http://stackoverflow.com/q/26286490
tags question: http://stackoverflow.com/q/26202630
tags question: http://stackoverflow.com/q/26317718
tags question: http://stackoverflow.com/q/26342400
tags question: http://stackoverflow.com/q/26280055
tags question: http://stackoverflow.com/q/26252272
tags question: http://stackoverflow.com/q/26240001
tags question: http://stackoverflow.com/q/26291910
tags question: http://stackoverflow.com/q/26257444
tags question: http://stackoverflow.com/q/26278354
tags question: http://stackoverflow.com/q/26266279
tags question: http://stackoverflow.com/q/26296198
tags question: http://stackoverflow.com/q/26329220
tags question: http://stackoverflow.com/q/26263706
tags question: http://stackoverflow.com/q/26219606
tags question: http://stackoverflow.com/q/26285732
tags question: http://stackoverflow.com/q/26242921
tags question: http://stackoverflow.com/q/26271169
tags question: http://stackoverflow.com/q/26274282
tags question: http://stackoverflow.com/q/26203577
tags question: http://stackoverflow.com/q/26236057
tags question: http://stackoverflow.com/q/26349876
tags question: http://stackoverflow.com/q/26279067
tags question: http://stackoverflow.com/q/26234342
tags question: http://stackoverflow.com/q/26340326
tags question: http://stackoverflow.com/q/26316323
tags question: http://stackoverflow.com/q/26308557
tags question: http://stackoverflow.com/q/26321611
tags question: http://stackoverflow.com/q/26279644
tags question: http://stackoverflow.com/q/26314799
tags question: http://stackoverflow.com/q/26330548
tags question: http://stackoverflow.com/q/26308666
tags question: http://stackoverflow.com/q/26254044
tags question: http://stackoverflow.com/q/26278110
tags question: http://stackoverflow.com/q/26260015
tags question: http://stackoverflow.com/q/26255872
tags question: http://stackoverflow.com/q/26229847
tags question: http://stackoverflow.com/q/26199550
tags question: http://stackoverflow.com/q/26343052
tags question: http://stackoverflow.com/q/26254944
tags question: http://stackoverflow.com/q/26228644
tags question: http://stackoverflow.com/q/26238703

http://stackoverflow.com/comment/41300786
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26308709
has text: Are both peers told to restart? Or is only one restarted and the other peer left untouched?
score: 0

regex
tags question: http://stackoverflow.com/q/26231670
tags question: http://stackoverflow.com/q/26289815
tags question: http://stackoverflow.com/q/26347436
tags question: http://stackoverflow.com/q/26258783
tags question: http://stackoverflow.com/q/26258714
tags question: http://stackoverflow.com/q/26284090
tags question: http://stackoverflow.com/q/26310322
tags question: http://stackoverflow.com/q/26319530
tags question: http://stackoverflow.com/q/26320445
tags question: http://stackoverflow.com/q/26307055
tags question: http://stackoverflow.com/q/26247892
tags question: http://stackoverflow.com/q/26219219
tag name: regex
tags question: http://stackoverflow.com/q/26259348
tags question: http://stackoverflow.com/q/26253105
tags question: http://stackoverflow.com/q/26281928
tags question: http://stackoverflow.com/q/26238188
tags question: http://stackoverflow.com/q/26290566
tags question: http://stackoverflow.com/q/26316420
tags question: http://stackoverflow.com/q/26257817
tags question: http://stackoverflow.com/q/26335661
tags question: http://stackoverflow.com/q/26198658
tags question: http://stackoverflow.com/q/26337494
tags question: http://stackoverflow.com/q/26234586
tags question: http://stackoverflow.com/q/26203186
tags question: http://stackoverflow.com/q/26269054
tags question: http://stackoverflow.com/q/26310013
tags question: http://stackoverflow.com/q/26316928
tags question: http://stackoverflow.com/q/26296857
tags question: http://stackoverflow.com/q/26279778
tags question: http://stackoverflow.com/q/26242272
tags question: http://stackoverflow.com/q/26250402
tags question: http://stackoverflow.com/q/26347461
tags question: http://stackoverflow.com/q/26283026
tags question: http://stackoverflow.com/q/26259536
tags question: http://stackoverflow.com/q/26293386
tags question: http://stackoverflow.com/q/26311456
tags question: http://stackoverflow.com/q/26280456
tags question: http://stackoverflow.com/q/26293517
tags question: http://stackoverflow.com/q/26208960
tags question: http://stackoverflow.com/q/26301726
tags question: http://stackoverflow.com/q/26241526
tags question: http://stackoverflow.com/q/26218595
tags question: http://stackoverflow.com/q/26302101
tags question: http://stackoverflow.com/q/26258206
tags question: http://stackoverflow.com/q/26347164
tags question: http://stackoverflow.com/q/26280227
tags question: http://stackoverflow.com/q/26261634
tags question: http://stackoverflow.com/q/26265124
tags question: http://stackoverflow.com/q/26195975
tags question: http://stackoverflow.com/q/26331773
tags question: http://stackoverflow.com/q/26308669
tags question: http://stackoverflow.com/q/26287228
tags question: http://stackoverflow.com/q/26322909
tags question: http://stackoverflow.com/q/26304887
tags question: http://stackoverflow.com/q/26317059
tags question: http://stackoverflow.com/q/26243826
tags question: http://stackoverflow.com/q/26270587
tags question: http://stackoverflow.com/q/26323421
tags question: http://stackoverflow.com/q/26326672
tags question: http://stackoverflow.com/q/26320039
tags question: http://stackoverflow.com/q/26212065
tags question: http://stackoverflow.com/q/26215058
tags question: http://stackoverflow.com/q/26205178
tags question: http://stackoverflow.com/q/26235906
tags question: http://stackoverflow.com/q/26197378
tags question: http://stackoverflow.com/q/26245973
tags question: http://stackoverflow.com/q/26244568
tags question: http://stackoverflow.com/q/26340008
tags question: http://stackoverflow.com/q/26338367
tags question: http://stackoverflow.com/q/26336695
tags question: http://stackoverflow.com/q/26299317
tags question: http://stackoverflow.com/q/26201722
tags question: http://stackoverflow.com/q/26252147
tags question: http://stackoverflow.com/q/26212128
tags question: http://stackoverflow.com/q/26324995
tags question: http://stackoverflow.com/q/26257092
tags question: http://stackoverflow.com/q/26348327
tags question: http://stackoverflow.com/q/26279673
tags question: http://stackoverflow.com/q/26260949

http://stackoverflow.com/comment/41359871
type: QuestionComment
comment on: http://stackoverflow.com/q/26349338
has text: I'm a JavaScript Programmer that has never used `Leaflet`, but have used Google Maps. It looks pretty cool. I say customize everything, according to zoom and all that. Use clusters when necessary.
score: 0
type: Comment

http://stackoverflow.com/q/26245697
answer count: 2
has body: In angular's Q implementation, how could we make this kind of call looks better? In this case, d3 loading has nothing to do with data loading, it should be paralleled for sure. d3Q.init() .then(function(d3) { scope.loadHistoryData() .then(function(data) { scope.renderHistoryGram(target, data, d3); }); }); This kind smelly code is also hard to test because there are multiple promise need to mock. Any best practice for the code testing?
has title: Angular $q then hell
upvote count: 3
possible better answer: http://stackoverflow.com/a/26245768
has answer: http://stackoverflow.com/a/26245768
tagged with: javascript
has answer: http://stackoverflow.com/a/26245770
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/26245770
tagged with: angularjs
type: Question
tagged with: angular-promise

http://stackoverflow.com/q/26271179
has comment: http://stackoverflow.com/comment/41217682
has comment: http://stackoverflow.com/comment/41218052
downvote count: 1
has comment: http://stackoverflow.com/comment/41218076
type: Question
linked to: http://stackoverflow.com/q/26158428
has comment: http://stackoverflow.com/comment/41253695
has comment: http://stackoverflow.com/comment/41222437
has comment: http://stackoverflow.com/comment/41218232
has comment: http://stackoverflow.com/comment/41253566
tagged with: web-sql
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/26272358
favorite count: 0
tagged with: promise
has body: I am using jQuery promises to return the data set from a web SQL database table and using $.when, I can return the data set and use it inside $.when according to this link Return multiple rows as an array from a WebSQL databse using javaScript But how can I use that data set outside $.when? Here is the source for query: function getContacts(){ var defer = $.Deferred(); db.transaction(function(tx) { tx.executeSql('SELECT * FROM contacts', [], function(tx, results) { defer.resolve(results.rows); },function(tx, err){ alert("An internal error occurred. " + err.message); }); }); return defer.promise(); } Here is the source for returning and using that value inside $.when: var contact = getContacts(); $.when(contact).done(function(cont) { for(var i = 0; i &lt; cont.length; i++){ // can use the 'cont' variable to access data in the table // inside this '$.when', but can't use it outside this $.when block } }); How can I achieve this?
has comment: http://stackoverflow.com/comment/41218194
type: UnansweredQuestion
score: -1
has title: Get a value from database using jQuery promises and use it anywhere

http://stackoverflow.com/q/26324516
has title: Remove "wrapped" event handler for use in pub/sub messaging
accepted answer: http://stackoverflow.com/a/26324569
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26324944
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26324569
tagged with: jquery-events
type: Question
has answer: http://stackoverflow.com/a/26324590
has body: I've done some pub/sub using jQuery events. Basic functionality works: var publish = function(name) { // --- works var args = Array.prototype.slice.call(arguments); // convert to array args = args.slice(1); // remove arg1 (name) $("html").trigger(name, args); } var subscribe = function(name, callback) { // --- works $("html").on(name, callback); } var unsubscribe = function(name, callback) { // --- works $("html").off(name, callback); } // usage: // --- works var myhandler = function () { /* ... */ }; subscribe("foo", myhandler); publish("foo", 1, false, "bob", {a:1, b:"2"}); unsubscribe("foo", myhandler); But subscribing the way I want, does not: var subscribe = function(name, callback) { // --- can't unsub this $("html").on(name, function () { var args = Array.prototype.slice.call(arguments); args = args.slice(1); callback.apply(null, args); }); } I want the second subscribe function, as that anonymous callback strips the first argument (an Event object) which I don't want in the "clean" client code. All I want to receive in the callback is the event data, I don't want Event object itself. But this means that I cannot call unsubscribe successfully, as I am not passing into off() the same callback as passed into on() - which was not the actual callback, but a wrapped anonymous function. Is there a way around this?
possible better answer: http://stackoverflow.com/a/26324590
answer count: 3
upvote count: 1
tagged with: publish-subscribe

http://stackoverflow.com/q/26349436
has body: I'm developing a webapp where I want to enable the user to print directly to the label printer (Brother QL-570). The label will contain a barcode and some text, and to achieve this I'm currently examining jsprintsetup Firefox addon. I've been able to set the printer correctly, but I've failed setting the paper definition for Brother's Small Address Label (62x29 mm), and I cannot figure out how to find the proper way to set this up. My script is looking like this at the moment: jsPrintSetup.setPrinter('Brother QL-570 LE'); jsPrintSetup.setOption('orientation', jsPrintSetup.kPortraitOrientation); jsPrintSetup.definePaperSize(200, 200, 'XX', 'XX','Small Address Label', 62, 29, 1); jsPrintSetup.setPaperSizeData(200); But I'm stuck. Help would be appreciated.
has comment: http://stackoverflow.com/comment/41359854
type: UnansweredQuestion
score: 3
downvote count: 0
answer count: 0
type: Question
has title: Paper definition for Brother QL-570 labels
tagged with: javascript
tagged with: printers
upvote count: 3
tagged with: firefox-addon
tagged with: printer-control-language
favorite count: 0

http://stackoverflow.com/q/26340985
accepted answer: http://stackoverflow.com/a/26341151
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41344339
has comment: http://stackoverflow.com/comment/41344268
has comment: http://stackoverflow.com/comment/41344683
type: Question
score: 8
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26341151
has comment: http://stackoverflow.com/comment/41344304
upvote count: 8
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to do a simple file upload using jQuery. I have a file input in my HTML like so: &lt;form id="PhotoUploadForm" action="/some/correct/url" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" id="uploadPhoto" accept="image"&gt; &lt;/form&gt; I also have some JavaScript / jQuery bound to the change event of the input, like so: $('#uploadPhoto').on("change", function (event) { var fileData = this.files[0]; var data = new FormData(); data.append('image',fileData); data.append('content','What could go wrong'); console.log(data.image, data.content); // this outputs 'undefined undefined' in the console $.ajax ({ url: "/some/correct/url", type: 'POST', data: data, processData: false, beforeSend: function() { console.log('about to send'); }, success: function ( response ) { console.log( 'now do something!' ) }, error: function ( response ) { console.log("response failed"); } }); }); I noticed I was getting a 500 error! Most likely the data is incorrect, I know the URL is good. So I tried to output the data to the console and I noticed that my data appends return 'undefined' console.log(data.image, data.content); // this outputs 'undefined undefined' in the console when I console.log(data) I get the following: FormData {append: function}__proto__: FormData Am I doing something wrong here? Why are data.image &amp; data.content undefined? When I output the this.files[0] I get the following: File {webkitRelativePath: "", lastModified: 1412680079000, lastModifiedDate: Tue Oct 07 2014 13:07:59 GMT+0200 (CEST), name: "2575-Web.jpg", type: "image/jpeg"…}lastModified: 1412680079000lastModifiedDate: Tue Oct 07 2014 13:07:59 GMT+0200 (CEST)name: "2575-Web.jpg"size: 138178type: "image/jpeg"webkitRelativePath: ""__proto__: File So the issue isn't with the image. Am I correct?
has title: Javascript/jQuery Append to FormData() returns 'undefined'
has comment: http://stackoverflow.com/comment/41344158
has comment: http://stackoverflow.com/comment/41344312

http://stackoverflow.com/comment/41175970
has text: can you setup a plunker
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26248811
score: 0

http://stackoverflow.com/comment/41185236
has text: that was the idea. with the type=number, the isNaN and min/max check are already performed by the html. There is no way to check the result of this test in JS instead of doing all the tests a second time?
comment on: http://stackoverflow.com/a/26253740
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41141628
type: AnswerComment
type: Comment
has text: javascript array, stringified
comment on: http://stackoverflow.com/a/26230337
score: 0

http://stackoverflow.com/comment/41220326
score: 0
type: Comment
type: QuestionComment
has text: thanks alot onblur met my need... dont know reason for down rating.
comment on: http://stackoverflow.com/q/26271610

http://stackoverflow.com/q/26350870
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41362167
has answer: http://stackoverflow.com/a/26351461
tagged with: geometry
has title: I am working on an html 5 canvas and trying to draw circles on it, but as I trying to use a loop all disappears
type: Question
has answer: http://stackoverflow.com/a/26352586
accepted answer: http://stackoverflow.com/a/26351461
score: 0
has comment: http://stackoverflow.com/comment/41362133
answer count: 3
tagged with: for-loop
tagged with: canvas
possible better answer: http://stackoverflow.com/a/26350888
tagged with: javascript
has answer: http://stackoverflow.com/a/26350888
has body: All good until I trying to put the for loop in(no matter what I am meant to use the loop for).
has comment: http://stackoverflow.com/comment/41362294

http://stackoverflow.com/a/26309201
type: Answer
has comment: http://stackoverflow.com/comment/41286072
answers question: http://stackoverflow.com/q/26309127
score: 0
has body: try $(document).on('click','#activated',function(){ // do somthing here }); it might work. Tell me it doesnt.
has comment: http://stackoverflow.com/comment/41286169
has comment: http://stackoverflow.com/comment/41286117

jssor
tags question: http://stackoverflow.com/q/26327160
tags question: http://stackoverflow.com/q/26290848
tag name: jssor
tags question: http://stackoverflow.com/q/26343146
type: Tag

http://stackoverflow.com/comment/41339187
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26337562
has text: Thanks @nhahtdh, yes I think avoiding non-nested is the main reason why it is implemented this way in JS.

http://stackoverflow.com/a/26199172
answers question: http://stackoverflow.com/q/26198638
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/47099776
has comment: http://stackoverflow.com/comment/47099861
upvote count: 2
has comment: http://stackoverflow.com/comment/47106878
type: AcceptedAnswer
has body: You can use the = object notation for your scope in accepting an array of objects with properties that you can assign to your directive. DEMO Controller .controller('Ctrl', function($scope) { var action = function() { window.alert(this.label); }; $scope.items = [{ label: 'Item 1', action: action }, { label: 'Item 2', action: action }, { label: 'Item 3', action: action }, { label: 'Item 4', action: action }]; }) Directive .directive('dropdown', function() { return { restrict: 'E', scope: { items: '=' }, template: ' ' + '' + ' ' }; }); index.html
accepted answer of: http://stackoverflow.com/q/26198638
has comment: http://stackoverflow.com/comment/47099683
has comment: http://stackoverflow.com/comment/47100284

angularjs-scope
tags question: http://stackoverflow.com/q/26324766
tags question: http://stackoverflow.com/q/26224320
tags question: http://stackoverflow.com/q/26330407
tags question: http://stackoverflow.com/q/26340181
tags question: http://stackoverflow.com/q/26239982
tags question: http://stackoverflow.com/q/26239297
tags question: http://stackoverflow.com/q/26339228
tags question: http://stackoverflow.com/q/26205227
tags question: http://stackoverflow.com/q/26300765
tags question: http://stackoverflow.com/q/26237338
tags question: http://stackoverflow.com/q/26278030
tags question: http://stackoverflow.com/q/26215256
tags question: http://stackoverflow.com/q/26307270
tags question: http://stackoverflow.com/q/26331251
tags question: http://stackoverflow.com/q/26344022
tags question: http://stackoverflow.com/q/26273043
tags question: http://stackoverflow.com/q/26248245
tags question: http://stackoverflow.com/q/26348053
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/26335538
tags question: http://stackoverflow.com/q/26284168
tags question: http://stackoverflow.com/q/26239531
tags question: http://stackoverflow.com/q/26297037
tags question: http://stackoverflow.com/q/26214076
tags question: http://stackoverflow.com/q/26304694
tags question: http://stackoverflow.com/q/26323948
tags question: http://stackoverflow.com/q/26203146
tags question: http://stackoverflow.com/q/26274186
tags question: http://stackoverflow.com/q/26281326
tags question: http://stackoverflow.com/q/26351163
tags question: http://stackoverflow.com/q/26271289
tags question: http://stackoverflow.com/q/26316427
tags question: http://stackoverflow.com/q/26206204
tags question: http://stackoverflow.com/q/26334917
tags question: http://stackoverflow.com/q/26262699
tags question: http://stackoverflow.com/q/26260444
tags question: http://stackoverflow.com/q/26198638
type: Tag

http://stackoverflow.com/comment/41254594
type: AnswerComment
has text: That helps, but I still need to figure out why the while script isn't working.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26292182

fileapi
tags question: http://stackoverflow.com/q/26291303
tags question: http://stackoverflow.com/q/26340780
tag name: fileapi
type: Tag
tags question: http://stackoverflow.com/q/26280184
tags question: http://stackoverflow.com/q/26233012
tags question: http://stackoverflow.com/q/26288376

http://stackoverflow.com/comment/41323155
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26329589
has text: Welcome to Stack Overflow! I'm not familiar with python, but from my experience : check that the content-type header of your request is set to JSON, if it still doesn't work try stringifying your payload before sending it and parse it on the server. and for the save() function, please show us some code :)
type: Comment

http://stackoverflow.com/comment/41363596
comment on: http://stackoverflow.com/q/26351422
score: 0
type: Comment
type: QuestionComment
has text: @KyleEmmanuel, I've posted html of the index page from top to bottom.

http://stackoverflow.com/a/26294579
accepted answer of: http://stackoverflow.com/q/26265114
answers question: http://stackoverflow.com/q/26265114
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41267671
upvote count: 1
has body: there are two tricks: You cannot basically specify data-dojo-type/data-dojo-props in the root node of the template. To alleviate such limitation, dojox/mvc/WidgetList has data-mvc-child-type/data-mvc-child-props. dojox/mvc/Output is useful, but you can achieve a similar thing by dijit/_WidgetBase's "node mapping" feature. Here's an example of / thing. Hope this helps. Best, - Akira
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41352765

http://stackoverflow.com/a/26317876
score: 0
has body: Instead of using on you could use the one jQuery function and bind the button again in the callback. Se http://api.jquery.com/one/ $("#friendsDiv").one("click", "#aFriend", retrieveMessages }); var retrieveMessages = function(){ $.post("PHP/chat.php", { ... }).done(function(){ $("#friendsDiv").one("click", "#aFriend", retrieveMessages }); }); };
type: Answer
answers question: http://stackoverflow.com/q/26317733

ajax-upload
tag name: ajax-upload
tags question: http://stackoverflow.com/q/26289949
type: Tag

http://stackoverflow.com/comment/41093664
has text: I did and this is the result: http://jsfiddle.net/hfezypfj/5/ It's not working as I was hoping it would
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26205050
type: Comment

http://stackoverflow.com/q/26343315
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/41353135
answer count: 0
has title: Why function calculate distance between element are error when use with this function?
type: Question
tagged with: javascript
score: 0
has body: Why function calculate distance between class="box_black" and bottom page are error when use with this function ? First, load page index.php and scroll page to top, you will see red text eg: distance 0: 106.90625px And then scroll page down until see class="box_black", you will see red text eg: distance 0: 2.90625px (minimal number) And then press generate new element button for 10 This is my question , When user press generate new element button why distance between class="box_black" and bottom page (red text) not change real time ? index.php generate new element demo.php distance 0: 0px
has comment: http://stackoverflow.com/comment/41348490
tagged with: jquery

http://stackoverflow.com/q/26297640
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41268505
has comment: http://stackoverflow.com/comment/41268982
score: 0
has body: I am running the following script on the client-side and the script is failing to update, when there is change in the database. I debugged the script using DevTools and discovered my Jquery scripts are responding back as "304 not modified". Does this issue, indicate why the client-side content is failing to update. <script src='<%: ResolveClientUrl("~/signalr/hubs") %>'> New Notifications New = role. New = descrip. Hub Class: [HubName("NotificationHub")] public class notificationHub : Hub { string role = ""; string descrip = ""; [HubMethodName("sendNotifications")] public void SendNotifications() { using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["dummyConnectionString"].ConnectionString)) { string query = "SELECT top 1 [role],[description] FROM [dbo].[User] order by uploadDate desc"; connection.Open(); SqlDependency.Start(GetConnectionString()); using (SqlCommand command = new SqlCommand(query, connection)) { try { command.Notification = null; DataTable dt = new DataTable(); SqlDependency dependency = new SqlDependency(command); dependency.OnChange += new OnChangeEventHandler(dependency_OnChange); if (connection.State == ConnectionState.Closed) connection.Open(); var reader = command.ExecuteReader(); dt.Load(reader); if (dt.Rows.Count > 0) { role = dt.Rows[0]["role"].ToString(); descrip = dt.Rows[0]["description"].ToString(); } connection.Close(); } catch (Exception ex) { throw ex; } } } Clients.All.RecieveNotification(role, descrip); } [HubMethodName("onStatusChanged")] private void dependency_OnChange(object sender, SqlNotificationEventArgs e) { if (e.Info == SqlNotificationInfo.Insert) { notificationHub nHub = new notificationHub(); nHub.SendNotifications(); } } Please advice. Thank you.
has title: Understand 304 response - not modified?
has comment: http://stackoverflow.com/comment/41264983
has comment: http://stackoverflow.com/comment/41265154
tagged with: asp.net
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41264323
tagged with: signalr
type: Question
has comment: http://stackoverflow.com/comment/41264558
tagged with: c#

http://stackoverflow.com/comment/41274914
has text: I checked for syntax errors now: Uncaught SyntaxError: Unexpected token ; tablegenerate%20appendchild.html:11 2Uncaught ReferenceError: maaktable is not defined tablegenerate%20appendchild.html:29
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26302879
score: 0

http://stackoverflow.com/q/26305265
score: 0
has title: How to access elements from a javascript array for an email sent with PHP/HTML
has comment: http://stackoverflow.com/comment/41279520
has body: So I am working on a webpage that generates a javascript array from the date element in html. That array itself works fine, and I am able to print it to the webpage by using a command like this: document.getElementById("demo").innerHTML = week[0]; to access the "week" array generated within javascript and to paste it to an HTML span element on the webpage. However, this is a webpage that sends emails using the data that the user inputs to the page, and while I am able to get all of the rest of the data from the user, I am unsure as to how to grab the data from this javascript array for the email. The email is currently formatted using HTML with php variables. I thought about using a php array, but every solution I look up for that seems either to be for a different case or too complicated for me to dissect and repurpose. So what I need is a solution like one of the following: -The ability to copy this javascript array into a php array that I can then access for the email. -The ability to access this javascript array within the HTML for the email This is all contained within a php file on server (the HTML markup, the javascript functions and the php). Thank you, Michael EDIT: I found this thread: Pass Javascript Array -&gt; PHP and tried their solution with this code: Javascript: JSON.stringify(week); PHP: $datesOfWeek = json_decode($_POST['week']); But whenever I try to access the elements of the array and print them out in the email, nothing prints out for these elements.
answer count: 1
tagged with: email
linked to: http://stackoverflow.com/q/5035547
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26305403
has comment: http://stackoverflow.com/comment/41280037
has comment: http://stackoverflow.com/comment/41279793
has comment: http://stackoverflow.com/comment/41278986
type: Question
has comment: http://stackoverflow.com/comment/41279861
has comment: http://stackoverflow.com/comment/41280061
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26305403
has comment: http://stackoverflow.com/comment/41279405

http://stackoverflow.com/comment/41232573
has text: @Paullo This will change the question entirely and the answer.I suggest you post a new question with all requirements.Leave this accepted :)
type: AnswerComment
comment on: http://stackoverflow.com/a/26279897
score: 0
type: Comment

http://stackoverflow.com/a/26209056
answers question: http://stackoverflow.com/q/26208960
downvote count: 0
has comment: http://stackoverflow.com/comment/41100993
type: Answer
has body: Use regexr.com/39khr and hover the different parts of your expression to see what they do. As you do not say what doesn't work, ie: giving examples of a false number that should be true or the other way around, it's very hard to give you an answer.
upvote count: 1
score: 1

http://stackoverflow.com/q/26330978
tagged with: javascript
tagged with: jquery
tagged with: colors
tagged with: random
has title: Variable number of menu-items with all different colors
favorite count: 0
accepted answer: http://stackoverflow.com/a/26331033
has body: I have build an UI where the user can specify the number of floors there are in his building, afterwards every menu-item represents a floor. This system works, but now I want every menu-item to have a different background-color and border-color. I used Math.random to generate colors (which worked) but now everytime I reload a page, or go to another page all colors change, while I want random colors just once and from that first generation on the same colors every time. So I want a system in Javascript (or Jquery) that generates colors once, depending on the number of floors and then use those colors all the time. while(countEtages>=1) { var color ='#'+Math.random().toString(16).substr(2,6); menu_container.innerHTML += " Etage " + etageNummer +" "; etageNummer++; countEtages--; } This is the code now (including the random colors) I hope someone unerstands what I want and can help me.
tagged with: css
has comment: http://stackoverflow.com/comment/41325852
downvote count: 1
linked to: http://stackoverflow.com/q/521295
has answer: http://stackoverflow.com/a/26331033
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26331053
score: -1
type: Question
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41325935
has answer: http://stackoverflow.com/a/26331053

jsp
tags question: http://stackoverflow.com/q/26238672
tags question: http://stackoverflow.com/q/26348400
tags question: http://stackoverflow.com/q/26302903
tags question: http://stackoverflow.com/q/26229795
tags question: http://stackoverflow.com/q/26338106
tags question: http://stackoverflow.com/q/26250178
tags question: http://stackoverflow.com/q/26278604
tags question: http://stackoverflow.com/q/26221002
tags question: http://stackoverflow.com/q/26324558
type: Tag
tags question: http://stackoverflow.com/q/26258634
tags question: http://stackoverflow.com/q/26239955
tags question: http://stackoverflow.com/q/26341513
tags question: http://stackoverflow.com/q/26194729
tags question: http://stackoverflow.com/q/26210904
tag name: jsp
tags question: http://stackoverflow.com/q/26313496
tags question: http://stackoverflow.com/q/26235096
tags question: http://stackoverflow.com/q/26230694
tags question: http://stackoverflow.com/q/26328755
tags question: http://stackoverflow.com/q/26330823
tags question: http://stackoverflow.com/q/26230475
tags question: http://stackoverflow.com/q/26299261
tags question: http://stackoverflow.com/q/26340344
tags question: http://stackoverflow.com/q/26240561
tags question: http://stackoverflow.com/q/26231513
tags question: http://stackoverflow.com/q/26212169

http://stackoverflow.com/q/26282916
downvote count: 2
has comment: http://stackoverflow.com/comment/41237579
has comment: http://stackoverflow.com/comment/41238094
type: AnsweredQuestion
tagged with: jsfiddle
score: 1
has comment: http://stackoverflow.com/comment/41237642
tagged with: javascript
type: Question
has title: How to setup Angular example app in jsFiddle?
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26283322
accepted answer: http://stackoverflow.com/a/26283322
upvote count: 3
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41237941
has comment: http://stackoverflow.com/comment/41237607
has comment: http://stackoverflow.com/comment/41237666
has body: So I'm trying to setup my Angular app example in jsFiddle to get help on another bug, however I'm getting a new bug: http://jsfiddle.net/leongaban/scx479rw/ Added example in Plunker: http://plnkr.co/edit/yYQHbcatHOu5myL4MXZM?p=preview I wasn't able to add ng-app="portal" to the html tag because jsFiddle generates it's own html tag in the output, so I put ng-app in my first div, could that be the problem? "Uncaught Error: [$injector:nomod] Module 'portal' is not available! HTML &lt;div class="nav" ng-app="portal" ng-controller="NavController as nav"&gt; Angular var app = angular.module('portal'); // Controller for Nav app.controller('NavController', function() { .... If it can't find portal because of that issue, how would you setup an Angular app in jsFiddle?

http://stackoverflow.com/a/26318485
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41307713
has comment: http://stackoverflow.com/comment/41308157
has body: Use compositing to make new drawings "erase" existing pixels. The compositing mode that "erases" is destination-out Example code: // set compositing to use any new drawings // to "erase" existing drawings ctx.globalCompositeOperation='destination-out'; // draw something // the canvas will become transparent inside that drawing ctx.fillRect(100,100,100,100); // reset compositing to default ctx.globalCompositeOperation='source-over'; Example code and a Demo: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; var img=new Image(); img.onload=start; img.src="https://img0.etsystatic.com/038/0/6965312/il_340x270.545626074_sflg.jpg"; function start(){ canvas.width=img.width; canvas.height=img.height; ctx.drawImage(img,0,0); // set compositing to use any new drawings // to "erase" existing drawings ctx.globalCompositeOperation='destination-out'; // draw something // the canvas will become transparent inside that drawing ctx.fillRect(100,100,100,100); // reset compositing to default ctx.globalCompositeOperation='source-over'; } body{ background-color: purple; } canvas{border:1px solid red;} &lt;canvas id="canvas" width=300 height=300&gt;&lt;/canvas&gt;
accepted answer of: http://stackoverflow.com/q/26317210
upvote count: 1
answers question: http://stackoverflow.com/q/26317210
score: 1

http://stackoverflow.com/q/26265842
has comment: http://stackoverflow.com/comment/41206712
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41206878
has comment: http://stackoverflow.com/comment/41206641
has answer: http://stackoverflow.com/a/26265941
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26265941
has body: I have a code that works on 1.8.3 (successfully add SUFFIX after blur or focusout when something is typed), but won't work on 1.9.1 or higher. &lt;div id="mmm"&gt; &lt;input type=text class="gen"&gt;&lt;br&gt; &lt;input type=text class="gen"&gt;&lt;br&gt; &lt;input type=text class="gen"&gt; &lt;/div&gt; $("#mmm").on('focusout change blur','.gen', function() { var myvar=$(this); coreid=this.value; $.ajax ( { url: '/echo/html/', success: function (data,status) { myvar.empty().attr("value", coreid + "MYSUFFIX" ); } }) }) Check Fiddle on 1.8.3/ If you change to version 1.9.1 or higher the code stop works (Suffix not added at end when something is typed) http://jsfiddle.net/6nch5fp2/5/
has comment: http://stackoverflow.com/comment/41206650
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41206854
has comment: http://stackoverflow.com/comment/41206622
favorite count: 0
has title: Code works on jquery 1.8.3 but not work on 1.9.1 and up
has comment: http://stackoverflow.com/comment/41206750
type: AnsweredQuestion

http://stackoverflow.com/a/26300441
has comment: http://stackoverflow.com/comment/41272840
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41269614
has comment: http://stackoverflow.com/comment/41271492
has comment: http://stackoverflow.com/comment/41269705
type: Answer
has comment: http://stackoverflow.com/comment/41269843
answers question: http://stackoverflow.com/q/26300394
has comment: http://stackoverflow.com/comment/41269706
has comment: http://stackoverflow.com/comment/41269678
downvote count: 0
has comment: http://stackoverflow.com/comment/41269826
has body: If you want to replace the anonymous function with your function you simply omit the () - but your function must take the same params that the anonymous would (event, not sure what param1 and param2 are): $("#divToBeClicked").on('click', otherFunction); And otherFunction: function otherFunction(e) { console.log(e); //theres e } If you want the extra params, you need the anonymous function: $("#divToBeClicked").on('click', function(e){ otherFunction(e, param2, param3); }); Edit: Corrected, you can use .bind

http://stackoverflow.com/comment/41228222
score: 0
has text: then output has to come NaN. But its giving 10. Thats my problem? @MiChael
comment on: http://stackoverflow.com/q/26277979
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26248599
has comment: http://stackoverflow.com/comment/41177985
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41212148
favorite count: 0
tagged with: instanceof
has body: Trying determinate DOM Element by simple check isElement = SomeThing instanceof Element works in main document, but not on (all?) nodes in iframe. Example output (Google Chrome): (mdiv is DIV in main document, idiv is DIV in iframe) OMGWTF ok: mdiv instanceof Element ... true ... [object HTMLDivElement] ok: mdiv instanceof Object ... true ... [object HTMLDivElement] ko: idiv instanceof Element ... false ... [object HTMLDivElement] KO : idiv instanceof Object ... false ... [object HTMLDivElement] There are different javascript implementations for main document and for iframe documents ??? Please explain me what's wrong. Example: (http://www.sbmintegral.sk/GITHUB/OMGWTF/obalka.xhtml) Code: obalka.xhtml (main document) <?xml version="1.0" encoding="UTF-8" ?> Obalka MAIN div id="auto_filled_commands_container" mdiv = document.getElementById("auto_filled_commands_container"); ifram = document.getElementById("auto_filled_commands_iframe"); idiv = ifram.contentDocument.getElementById('auto_filled_commands'); OMGWTF = "OMGWTF \n" +"ok: mdiv instanceof Element ... "+(mdiv instanceof Element)+" ... "+mdiv+"\n" +"ok: mdiv instanceof Object ... "+(mdiv instanceof Object)+" ... "+mdiv+"\n" +"ko: idiv instanceof Element ... "+(idiv instanceof Element)+" ... "+idiv+"\n" +"KO : idiv instanceof Object ... "+(idiv instanceof Object)+" ... "+idiv+"\n" ; document.getElementById('result_txta').value = OMGWTF; (2.) Code: Dopis.xhtml (inner frame document) <?xml version="1.0" encoding="UTF-8" ?> Dopis IFRAME div id="auto_filled_commands" IFRAME div id="afc_formular" (1.) Results image (in IE, Chrome, Firefox, Opera) (source: sbmintegral.sk)
tagged with: element
has comment: http://stackoverflow.com/comment/41273825
has comment: http://stackoverflow.com/comment/114461480
has comment: http://stackoverflow.com/comment/41275830
has comment: http://stackoverflow.com/comment/41278605
has answer: http://stackoverflow.com/a/26251098
has comment: http://stackoverflow.com/comment/41287674
has comment: http://stackoverflow.com/comment/41278365
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41216446
tagged with: iframe
upvote count: 17
type: Question
has comment: http://stackoverflow.com/comment/41178129
has comment: http://stackoverflow.com/comment/41175648
tagged with: javascript
score: 17
linked to: http://stackoverflow.com/q/14391506
linked to: http://stackoverflow.com/q/23319537
has title: instanceof HTMLElement in IFRAME is not Element or Object?
has comment: http://stackoverflow.com/comment/41238501

http://stackoverflow.com/a/26326173
type: Answer
answers question: http://stackoverflow.com/q/26326042
has body: try replacing the $ with jQuery jQuery(document).ready(function() { jQuery(".fancybox").fancybox(); });
score: 0

http://stackoverflow.com/comment/41101683
comment on: http://stackoverflow.com/a/26209273
has text: Upvoting, since you solution was more elegant than mine. :-)
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/26216769
answer count: 3
has body: I am new in AngularJS. I was trying to call json file from factory function but it's showing my var customers = []; array is not updating. Please help. Below is my code. var demoApp = angular.module("myApp", []); demoApp.factory('simpleFactory', ['$http', function($http){ return { getCustomer: function(){ var customers = []; return $http.get("http://www.w3schools.com/website/Customers_JSON.php") .success( function(data){ customers = data; }, function(error){ console.log(error); }); console.log(customers) } } }]); demoApp.controller("emplyCtrl", function($scope, simpleFactory){ $scope.customers = simpleFactory.getCustomer(); }); Demo Fiddle
accepted answer: http://stackoverflow.com/a/26229337
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26216851
has answer: http://stackoverflow.com/a/26229337
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26218084
tagged with: http://stackoverflow.com/tag/json
has title: Calling JSON file from Angular Factory is not working
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26216851
score: 0

http://stackoverflow.com/q/26223361
tagged with: jquery
has comment: http://stackoverflow.com/comment/41128862
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41129796
tagged with: ajax
has comment: http://stackoverflow.com/comment/41128190
has comment: http://stackoverflow.com/comment/41128695
accepted answer: http://stackoverflow.com/a/26227246
has comment: http://stackoverflow.com/comment/41128992
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41129260
has answer: http://stackoverflow.com/a/26227246
has comment: http://stackoverflow.com/comment/41128723
has comment: http://stackoverflow.com/comment/41130220
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41128600
has comment: http://stackoverflow.com/comment/41128929
has comment: http://stackoverflow.com/comment/41130180
tagged with: javascript
has comment: http://stackoverflow.com/comment/41129021
has comment: http://stackoverflow.com/comment/41128727
has body: I am trying to use jQuery Autocomplete on a text box, but it's not working. Here is my script to get autocomplete list from database but it gives me error and alerts error message. $(function () { $("#ContentPlaceHolderSearch_txt_Search").autocomplete({ source: function (request, response) { $.ajax({ url: "Service/AutoComplete.asmx/GetCompletionListName", data: "{ 'prefixText': '" + request.term + "' }", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function (data) { return data; }, success: function (data) { response($.map(data.d, function (item) { return { value: item } })) }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }, minLength: 2 }); }); Here Is my server code [WebMethod] public string[] GetCompletionListName(string prefixText, int count) { List&lt;string&gt; items = new List&lt;string&gt;(count); GA_UsersTableAdapter uta = new GA_UsersTableAdapter(); UserControllar.GA_UsersDataTable udt = uta.GetDataByNameAutoComplete(prefixText); foreach (DataRow row in udt.Rows) { items.Add(row["Full_Name"].ToString()); } return items.ToArray(); }
has comment: http://stackoverflow.com/comment/41128487
has comment: http://stackoverflow.com/comment/41130369
score: 0
has comment: http://stackoverflow.com/comment/41128494
has comment: http://stackoverflow.com/comment/41128293
has comment: http://stackoverflow.com/comment/41129056
answer count: 1
has title: Autocomplete returns an error on ajax request

http://stackoverflow.com/comment/41290314
type: Comment
has text: @Vitorossi - sort of. But I'm using a local variable because global variables are of little use (and bad practice) when using asynchronous operations like `$.get()`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26311656

http://stackoverflow.com/q/26268044
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26310675
has title: will also hide if the screen is xs
tagged with: css
has answer: http://stackoverflow.com/a/26271745
score: 2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/41210829
has body: I got confused on how does boostrap works , for example let say i have the following Div:- Your cart: so this will hide the Div is the screen is small , but does this effect also applied is the screen is extra small -xs Second question is i have this Div:- cart: this means that the div will be displayed when the screen is small, but will it be visible when the screen is large ? can anyone adivce please, what is the rule governing this ?
possible better answer: http://stackoverflow.com/a/26271745
has comment: http://stackoverflow.com/comment/41312392
type: Question
has comment: http://stackoverflow.com/comment/41210710
accepted answer: http://stackoverflow.com/a/26310675
has comment: http://stackoverflow.com/comment/41313044
tagged with: javascript

php
tags question: http://stackoverflow.com/q/26198156
tags question: http://stackoverflow.com/q/26324797
tags question: http://stackoverflow.com/q/26196153
tags question: http://stackoverflow.com/q/26333243
tags question: http://stackoverflow.com/q/26212032
tags question: http://stackoverflow.com/q/26250696
tags question: http://stackoverflow.com/q/26245403
tags question: http://stackoverflow.com/q/26322558
tags question: http://stackoverflow.com/q/26218130
tags question: http://stackoverflow.com/q/26208992
tags question: http://stackoverflow.com/q/26242272
tags question: http://stackoverflow.com/q/26230833
tags question: http://stackoverflow.com/q/26211186
tags question: http://stackoverflow.com/q/26253023
tags question: http://stackoverflow.com/q/26314169
tags question: http://stackoverflow.com/q/26203925
tags question: http://stackoverflow.com/q/26201039
tags question: http://stackoverflow.com/q/26226779
tags question: http://stackoverflow.com/q/26300699
tags question: http://stackoverflow.com/q/26318044
tags question: http://stackoverflow.com/q/26216579
tags question: http://stackoverflow.com/q/26315260
tags question: http://stackoverflow.com/q/26333522
tags question: http://stackoverflow.com/q/26351488
tags question: http://stackoverflow.com/q/26311029
tags question: http://stackoverflow.com/q/26203453
tags question: http://stackoverflow.com/q/26278841
tags question: http://stackoverflow.com/q/26195015
tags question: http://stackoverflow.com/q/26331994
tags question: http://stackoverflow.com/q/26276881
tags question: http://stackoverflow.com/q/26259235
tags question: http://stackoverflow.com/q/26242527
tags question: http://stackoverflow.com/q/26285008
tags question: http://stackoverflow.com/q/26228700
tags question: http://stackoverflow.com/q/26212262
tags question: http://stackoverflow.com/q/26338547
tags question: http://stackoverflow.com/q/26225731
tags question: http://stackoverflow.com/q/26235017
tags question: http://stackoverflow.com/q/26275974
tags question: http://stackoverflow.com/q/26245335
tags question: http://stackoverflow.com/q/26270215
tags question: http://stackoverflow.com/q/26300917
tags question: http://stackoverflow.com/q/26323558
tags question: http://stackoverflow.com/q/26310491
tags question: http://stackoverflow.com/q/26209967
tags question: http://stackoverflow.com/q/26294193
tags question: http://stackoverflow.com/q/26328741
tags question: http://stackoverflow.com/q/26243928
tags question: http://stackoverflow.com/q/26332260
tags question: http://stackoverflow.com/q/26201154
tags question: http://stackoverflow.com/q/26299262
tags question: http://stackoverflow.com/q/26204488
tags question: http://stackoverflow.com/q/26248688
tags question: http://stackoverflow.com/q/26320689
tags question: http://stackoverflow.com/q/26207490
tags question: http://stackoverflow.com/q/26254935
tags question: http://stackoverflow.com/q/26255102
tags question: http://stackoverflow.com/q/26285461
tags question: http://stackoverflow.com/q/26199766
tags question: http://stackoverflow.com/q/26315234
tags question: http://stackoverflow.com/q/26325483
tags question: http://stackoverflow.com/q/26348078
tags question: http://stackoverflow.com/q/26238278
tags question: http://stackoverflow.com/q/26273710
tags question: http://stackoverflow.com/q/26328654
tags question: http://stackoverflow.com/q/26351335
tags question: http://stackoverflow.com/q/26345537
tags question: http://stackoverflow.com/q/26253959
tags question: http://stackoverflow.com/q/26267960
tags question: http://stackoverflow.com/q/26248848
tags question: http://stackoverflow.com/q/26204682
tags question: http://stackoverflow.com/q/26313921
tags question: http://stackoverflow.com/q/26282855
tags question: http://stackoverflow.com/q/26284937
tags question: http://stackoverflow.com/q/26323881
tags question: http://stackoverflow.com/q/26310521
tags question: http://stackoverflow.com/q/26328835
tags question: http://stackoverflow.com/q/26302976
tags question: http://stackoverflow.com/q/26235957
tags question: http://stackoverflow.com/q/26256858

http://stackoverflow.com/comment/41297255
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26314301
has text: I have updated the question, sorry for being vague @Darth Kotik.

http://stackoverflow.com/comment/41083197
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26199388
has text: Is `returnFalse` supposed to be a global variable? What happens if you init it with `var returnFalse = 0;` at the beginning of the function
score: 0

http://stackoverflow.com/a/26273531
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41221481
has body: You can use ng-include like this: Or if you have the fragment name in a variable (called fragment for example) on the scope: Your html fragment can then have a controller using the ng-controller="myFragmentController" syntax on the root element.
answers question: http://stackoverflow.com/q/26273147
has comment: http://stackoverflow.com/comment/41222770

http://stackoverflow.com/q/26230694
answer count: 2
downvote count: 0
tagged with: jsp
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41142053
tagged with: ajax
has comment: http://stackoverflow.com/comment/41141931
has comment: http://stackoverflow.com/comment/41142173
has comment: http://stackoverflow.com/comment/41141844
linked to: http://stackoverflow.com/q/6094130
has comment: http://stackoverflow.com/comment/41141991
has answer: http://stackoverflow.com/a/26231320
type: AnsweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/18300674
has answer: http://stackoverflow.com/a/26230808
type: Question
has comment: http://stackoverflow.com/comment/41142482
has comment: http://stackoverflow.com/comment/41141828
has body: $.ajax({ url: "NewUserRegistrationServlet", type: "post", cache: false, data : "username="+username+"&password="+encodeURIComponent(pswd)+"&email="+encodeURIComponent(email), dataType:"xml", timeout: 3000, success: function(data) { var xml_node = $('ResultSet',data); var status = xml_node.find('result').text() ; var result = xml_node.find('status').text() ; if( (result > 0) && ( status == 'SUCCESS') ) { alert("This Statement is getting executed"); //window.location.replace("login.jsp"); // Not Working //window.location.href = 'http://localhost:8080/MyProj/login.jsp'; // Not Working window.open = ('login.jsp','_top'); // Not Working }else{ $("#RegisErr").siblings("p").remove(); $("#RegisErr").after(" User Registration failed! Please Try Again. "); } }, error: function(xhr, status, text) { $("#RegisErr").siblings("p").remove(); $("#RegisErr").after(" User Registration failed! Please Try Again. "); } }); What i am doing wrong OnSubmit -> Validation of form // Working Fine If Valid -> Do Ajax Request // Working Fine On Success of Ajax -> Redirect to other JSP Page // Not Woking EDIT Screenshot Chrome Debugger Solved windows.location = "login.jsp" Thanks Everyone for your help.
has title: jQuery AJAX Page Redirection Error
possible better answer: http://stackoverflow.com/a/26230808
tagged with: javascript
has comment: http://stackoverflow.com/comment/41142407
accepted answer: http://stackoverflow.com/a/26231320

http://stackoverflow.com/comment/41367173
comment on: http://stackoverflow.com/a/26339434
has text: thanks for the reply u guys have amazing coding skills
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26284275
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41240199
type: Question
has title: Placing Javascript ad zone in PHP function
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26284470
has answer: http://stackoverflow.com/a/26284611
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26284611
has answer: http://stackoverflow.com/a/26284470
has body: I am trying to place a javascript ad zone inside a php function. I am doing this to control what ad zones are placed on each page. Currently in the php template I am using: <?php if(is_page('welcome-president')) { oiopub_banner_zone(9); oiopub_banner_zone(19); } ?> I am trying to place this javascript code inside the if conditional tag instead of the oiopub_banner_zone(9); so that the ads will not be cached and rotate. Thanks in advance!
linked to: http://stackoverflow.com/q/2648053

http://stackoverflow.com/comment/132292061
score: 0
type: AnswerComment
has text: @knguyen why does it matter if it iterates twice? Are we even sure it will result in a performance hit?
comment on: http://stackoverflow.com/a/57113330
type: Comment

http://stackoverflow.com/comment/41661962
type: QuestionComment
has text: @CharithDeSilva well, what should I do ?
comment on: http://stackoverflow.com/q/26342029
score: 0
type: Comment

http://stackoverflow.com/comment/41158893
has text: Version 37.0.2062.124 m / Windows 7 64bit
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26239205

http://stackoverflow.com/comment/41224130
has text: I removed this, still no display. and it was saying reference is null
comment on: http://stackoverflow.com/q/26274282
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41192735
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26199259
has text: Can you use firebugs cd command line expression? https://getfirebug.com/wiki/index.php/Cd
score: 0

http://stackoverflow.com/q/26312526
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/26312543
linked to: http://stackoverflow.com/q/6542169
type: Question
has comment: http://stackoverflow.com/comment/41291713
tagged with: javascript
score: 0
has title: Can i run a php file or a html file in a node js web server?
answer count: 1
has comment: http://stackoverflow.com/comment/41291717
has body: Maybe it's a stupid question but i am a newbie using node js, and I think that it can be used just with js files, I dont know, I installed node js on my windows and i started the web server but i dont know how to run the files, I have always worked with apache, I saw there is a folder called scrips in the node js installation folder

http://stackoverflow.com/comment/41080962
has text: Strange that it doesn't work for you in Chrome - it worked fine for me. I've updated the code to work in IE 11. Looks like `document.frm[input.name].value` doesn't work in IE. Also see my fiddle.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26197216
type: Comment

http://stackoverflow.com/comment/41172971
score: 1
comment on: http://stackoverflow.com/a/26243297
type: AnswerComment
has text: You do not have to add more javascript just more attributes, like suppose 'dara-url' and fetch it in javascript as I have shown
type: Comment

http://stackoverflow.com/a/26212450
has body: The body of the loop will only execute once. After which control flow will move on to whatever code you have after this, or the calling function. You probably don't want to be using a loop for this, you just need a function which does document.frm.result.value += "+"; and to call it whenever your button is clicked. For example, if your function were called displayPlus then you could give your button an onclick attribute like this: &lt;button onclick="displayPlus()"&gt; EDIT: It sounds like you want a way to decide conditionally whether to display another plus when the button is clicked. If you have logic that can determine whether this should be done at the time the button is pressed then this can be included in the function. For example if you want to only add another only if the previous character entered is not a plus then this method will work. Otherwise you could have a global boolean variable and check its value whenever the plus button is clicked to determine whether to print another plus.
has comment: http://stackoverflow.com/comment/41107636
answers question: http://stackoverflow.com/q/26212287
score: 0
type: Answer

http://stackoverflow.com/q/26345537
has body: The following is my php code with SQL. $con=mysqli_connect("localhost","root","","ananas"); if (mysqli_connect_errno()) { echo json_encode(mysqli_connect_errno()); } $sql = "SELECT venues.*, (6371*acos(cos(radians(".$curr_lat."))*cos(radians(venues.lat))*cos(radians(venues.longi)-radians(".$curr_longi."))+sin(radians(".$curr_lat."))*sin(radians(venues.lat)))) AS radius FROM venues HAVING radius &lt; ".$radius ; $result = mysqli_query($con,$sql); if (!$result) { die("Error running $sql: " . mysql_error()); } I ve verified all the database, table names and column names I wanna extract are working fine. Even same code was working fine before I reinstalled xampp and reset my phpmyadmin with DB. But now even with older setting, i.e. after restoring the same database, tables, username &amp; password as before I get an error. It shows error when I try calling it from JS file using xmlhttprequest object. The following is my JS function for calling the PHP file through xmlhttp function loadXMLDoc(city) { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { myData= eval("(" + xmlhttp.responseText + ")"); console.log(myData); $('#header_bottom_wrapper .nav span').html(city); mapMarkers(myData); map.fitBounds(circle.getBounds()); loadPlaces(); getVenues(); } else{ alert(status+", "+exception); } } xmlhttp.open("GET","./content/sessionVariableChange.php?city="+city+"&amp;curr_lat="+curr_lat+"&amp;curr_longi="+curr_longi+"&amp;radius="+radius+"&amp;capacity="+capacity,true); xmlhttp.send(); } sessionVariableChange.php is the name of php file where I access my database. When I try to run the file, I get the following error in my console. **Uncaught SyntaxError: Unexpected token ) ** Any help would be helpful. Thanks in advance.
type: Question
tagged with: google-maps
tagged with: javascript
score: 0
has title: Google Maps arcsine formula with SQL error
has comment: http://stackoverflow.com/comment/41356809
has comment: http://stackoverflow.com/comment/41357569
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41357294
answer count: 0
linked to: http://stackoverflow.com/q/6924896
tagged with: mysql

http://stackoverflow.com/q/26196092
favorite count: 0
has answer: http://stackoverflow.com/a/29325647
has body: Here is where I am trying implement the Multi Level Push Menu in a page powered by Perl: http://find-where.com/cgi-bin/perl_modules/installed_modules.cgi I am not a JS expert but do know how to use/implement simple JS; but in this case, I am stuck. I think it has something to do with jQuery which I am not well versed in. My problem is that the links are not working. I want the links to open in an iframe within the page. But, if I do 'open in new tab/window' on the very same links, they work just fine! But clicking on the links not working!
accepted answer: http://stackoverflow.com/a/26196918
has title: Trying to implement Multi Level Push Menu from http://multi-level-push-menu.make.rs on a site
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41077707
upvote count: 1
has comment: http://stackoverflow.com/comment/41077378
type: Question
tagged with: perl
tagged with: javascript
has comment: http://stackoverflow.com/comment/41077884
has answer: http://stackoverflow.com/a/26196918
answer count: 2
has comment: http://stackoverflow.com/comment/41077615
downvote count: 0
possible better answer: http://stackoverflow.com/a/29325647

recursion
type: Tag
tags question: http://stackoverflow.com/q/26342565
tags question: http://stackoverflow.com/q/26284612
tag name: recursion
tags question: http://stackoverflow.com/q/26205376
tags question: http://stackoverflow.com/q/26314467
tags question: http://stackoverflow.com/q/26330747
tags question: http://stackoverflow.com/q/26323446
tags question: http://stackoverflow.com/q/26242169
tags question: http://stackoverflow.com/q/26247193

http://stackoverflow.com/comment/41116166
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26217261
has text: `p { color: blue !important; }` - I just overwrote it. ;-)
score: 4

http://stackoverflow.com/a/26223085
answers question: http://stackoverflow.com/q/26222511
score: 1
has body: The typehead directive is creating its own isolated scope thus you can't access any properties which are not part of this scope. Basically you can access only these properties: scope:{ index:'=', match:'=', query:'=' } but you can access the model property of the mach match.model so in your example you can add the showLinks variable as a argument to the getLocation method and map its value to option object: &lt;input type="text" autofocus autocomplete="off" class="form-control" ng-model="query" typeahead="option as option.Name for option in getLocation($viewValue, showLinks)" typeahead-min-length="3" typeahead-template-url="location.html" /&gt; template &lt;script type="text/ng-template" id="location.html"&gt; {{match.model.showLinks}} &lt;!-- the show linLinks property is mapped inside getLocation method --&gt; &lt;span bind-html-unsafe="match.label | typeaheadHighlight:query"&gt;&lt;/span&gt; &lt;/script&gt; getLocation example: $scope.getLocation = function(viewValue, showLinks) { var locations = []; // code to fill locations // extend each location (option) object with showLinks data for (int i=0; i&lt;locations.length; i++) { var location = locations[i]; location.showLinks = showLinks; } return locations; }
has comment: http://stackoverflow.com/comment/41127977
has comment: http://stackoverflow.com/comment/41127865
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41127805
accepted answer of: http://stackoverflow.com/q/26222511
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41197307
type: Comment
type: QuestionComment
has text: Is there no way to do this then? Isn't it logical to you to be able to have a text input with a default value from a database that can be changed, POSTed to the API on `ng-click` to then update the user account? This is so simple in jQuery.
comment on: http://stackoverflow.com/q/26260861
score: 0

button
tags question: http://stackoverflow.com/q/26260964
tags question: http://stackoverflow.com/q/26247230
tags question: http://stackoverflow.com/q/26222567
tags question: http://stackoverflow.com/q/26275197
type: Tag
tags question: http://stackoverflow.com/q/26342253
tags question: http://stackoverflow.com/q/26279080
tags question: http://stackoverflow.com/q/26332019
tags question: http://stackoverflow.com/q/26322783
tags question: http://stackoverflow.com/q/26339024
tag name: button
tags question: http://stackoverflow.com/q/26275885

http://stackoverflow.com/comment/41265253
comment on: http://stackoverflow.com/q/26260431
has text: @Mohamad - I don't need to give people to add `script` tag. I will write ` ` in md which needs to be executed on rendered html page.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41143057
comment on: http://stackoverflow.com/a/26230781
type: Comment
score: 0
type: AnswerComment
has text: Is IN the url. www.sigmaaldrich.com/MSDS/MSDS/DisplayMSDSPage.do?country=NL&language=EN-generic&productNumber=271004&brand=SIAL&PageToGoToURL=null check the **productNumber** part

http://stackoverflow.com/a/26305403
has comment: http://stackoverflow.com/comment/41279909
has comment: http://stackoverflow.com/comment/41280119
answers question: http://stackoverflow.com/q/26305265
downvote count: 0
has body: I'm not sure what you exactly want to achieve but if you want to send a data from js (on client) along with form data to php script (on server) you should simply serialize your array and put as value of additional (hidden) form field. In php script you can somehow deserialize a value of that field (it depends on the format of you choice) //EDIT: Here is js script example that can you use http://jsfiddle.net/zyt2kcmv/ var myArrayToSend = ["val1", "val2"] var arrayField = document.querySelector("[name=jsArray]"); arrayField.value = JSON.stringify(myArrayToSend) On the server side you just need to deserialize value of $_POST["jsArray"] (use library for json or simple regex). Instead of JSON.stringify you can use myArrayToSend.join(";") and then use split method in pho to "deserialize" that string.
has comment: http://stackoverflow.com/comment/41278906
accepted answer of: http://stackoverflow.com/q/26305265
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26235285
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26235012
has body: Try removing filter: alpha(opacity=40); opacity: 0.4; This is affecting the contents of the DIV, not the background itself. You should also change the RGBA values to rgba(255,255,255,0.3); For a white semi-transparent background
downvote count: 0

http://stackoverflow.com/a/26312196
type: Answer
upvote count: 3
score: 3
has body: use transition to $state.transitionTo('purchase') and change syntax error in yor code url: '/purchase, to url: '/purchase',
downvote count: 0
answers question: http://stackoverflow.com/q/26301111

http://stackoverflow.com/comment/41288795
comment on: http://stackoverflow.com/q/26310743
score: 0
type: Comment
has text: Code is correct, problem will be on different place.
type: QuestionComment

http://stackoverflow.com/q/26226478
type: UnansweredQuestion
has title: disable time in time dropdownlist
tagged with: javascript
type: Question
score: 0
has body: Please suggest how to hide the past time from time dropdown list, displaying hours and minutes in each of the dropdown list. My requirement is, based on the date user has selected ,past time should not be shown in Hours and minutes dropdown list or past time can be disabled so that users could not able to select the past time, as done for Time field in http://jsfiddle.net/8o23tbLu/13/ Below is the sample code: &lt;script&gt; require(["dojo/_base/declare", "dijit/form/DateTextBox", "dojo/date/locale", "dojo/dom", "dojo/_base/lang", "dijit/registry", "dojo/ready", "dojo/domReady!", "dijit/form/TimeTextBox", "dojo/parser"], function (declare, DateTextBox, locale, dom, lang, registry, ready) { var pad, update_current_available_times, get_hour_string; pad = function (n) { n = n + ''; return n.length &gt;= 2 ? n : new Array(2 - n.length + 1).join('0') + n; }, get_hour_string = function (t) { var hour = pad(t.getHours()); var minute = pad(t.getMinutes()); return 'T' + hour + ':' + minute + ':00'; //current time 1 }, update_current_available_times = function (seldate) { var useMin, now, time, pad; if (typeof seldate === 'undefined') { seldate = new Date(document.getElementsByName('userDate')[0].value); } useMin = 'T00:00:00'; now = new Date(); if ((now.getDate() === seldate.getDate()) &amp;&amp; (now.getYear() === seldate.getYear()) &amp;&amp; (now.getMonth() === seldate.getMonth())) { useMin = get_hour_string(now); } time = registry.byId("time");//user selected time alert("time: " + time); time.set("constraints", lang.mixin(time.get("constraints"), { min: useMin })); }; declare("OracleDateTextBox", DateTextBox, { oracleFormat: { selector: 'date', datePattern: 'dd-MMM-yyyy', locale: 'en-us' }, value: document.getElementsByName('userDate')[0].value, // prevent parser from trying to convert to Date object postMixInProperties: function () { // change value string to Date object this.inherited(arguments); // convert value to Date object this.value = locale.parse(this.value, thi…
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: dojo
has answer: http://stackoverflow.com/a/26227039

http://stackoverflow.com/comment/41383318
type: AnswerComment
has text: I've read that the next version of IE will support the Web Audio API, but I don't know when that will be.
type: Comment
comment on: http://stackoverflow.com/a/26281172
score: 0

http://stackoverflow.com/comment/41323206
type: QuestionComment
has text: Or feasible, for anything but trivial code (OK, and maybe templates). Server-side JS doesn't have much in the way of built-in DOM stuff, AFAICR.
comment on: http://stackoverflow.com/q/26329621
score: 0
type: Comment

http://stackoverflow.com/comment/41256711
has text: Have tried that as I thought that was the logical thing, but does not change how it displays.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26292085

http://stackoverflow.com/comment/41389072
type: Comment
has text: i changed the file but isn't working... opens the "page" but not in the desired div
type: AnswerComment
comment on: http://stackoverflow.com/a/26351001
score: 0

http://stackoverflow.com/comment/41118772
comment on: http://stackoverflow.com/q/26218354
score: 0
type: Comment
type: QuestionComment
has text: Could you try and post something on jsfiddle?

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

http://stackoverflow.com/q/26271289
type: Question
answer count: 2
score: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs-ng-repeat
has title: Recursive call of directive crashing the browser tab
has answer: http://stackoverflow.com/a/26275677
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26271465
upvote count: 2
has answer: http://stackoverflow.com/a/26271465
tagged with: angularjs-directive
type: AnsweredQuestion
has body: I have an observation directive which render observation.html observation.js angular.module('bahmni.clinical') .directive('observation', function () { var controller = function ($scope) { console.log($scope.observation); }; return { restrict: 'E', controller: controller, scope: { observation: "=" }, templateUrl: "views/observation.html" }; }); I call observation directive from the observation.html. This will be done recursively. observation.html {{observation.getDisplayValue()}} {{observation.concept.units}} I call this for first time from someother directive. someother.js If i refresh the browser, The tab will be irresponsive. Don't know what is happening. Not able to debug because of the irresponsive tab. I would really appretiate your answer.
accepted answer: http://stackoverflow.com/a/26275677
tagged with: angularjs-scope

http://stackoverflow.com/a/26340643
downvote count: 0
has comment: http://stackoverflow.com/comment/41343436
type: AcceptedAnswer
score: 4
has body: You've redeclared "user" as a local variable in the function. Variable definitions in functions are always treated as if they occur at the very start of the function, meaning your code is equivalent to $(document).ready(function () { var user; if(!user) { user = '0'; } alert(user); }); At the if statement, the value of "user" will be undefined. The !user test succeeds, and so your code proceeds to set the variable to '0'.
has comment: http://stackoverflow.com/comment/41343425
has comment: http://stackoverflow.com/comment/41343456
answers question: http://stackoverflow.com/q/26340619
has comment: http://stackoverflow.com/comment/41343535
type: Answer
accepted answer of: http://stackoverflow.com/q/26340619
upvote count: 4
has comment: http://stackoverflow.com/comment/41343574

http://stackoverflow.com/comment/41156970
has text: That now works - I'd made a syntax error in making the call synchronous. So I now set a flag in my `beforeunload` routine which sets my Ajax calls to synchronous, call the save routine on my control, which I saved to a variable when it got focus, and 'Bob's your uncle'.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26223246

http://stackoverflow.com/q/26341372
tagged with: webview
type: Question
accepted answer: http://stackoverflow.com/a/26344452
type: AnsweredQuestion
tagged with: c#
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: windows-8.1
has body: How can I set page scroll position in WebView? I get X and Y coord by adding JavaScript on page: window.onscroll = scroll; function scroll () {" window.external.notify(window.pageXOffset + \",\" + window.pageYOffset)" } and save X and y in array : private void WebView_OnScriptNotify(object sender, NotifyEventArgs e) { string[] valuePair = e.Value.Split(','); XY[0] = int.Parse(valuePair[0]); XY[1] = int.Parse(valuePair[1]); } But how can I scroll page in WebView when I load page and want to restore scroll position?
favorite count: 0
has title: WebView scroll content
has answer: http://stackoverflow.com/a/26344452
tagged with: winrt-xaml
score: 1
upvote count: 1

http://stackoverflow.com/comment/41078881
type: Comment
has text: yes I am using d3 framework with other few libraries, how to remove this temporarily?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26196983

http://stackoverflow.com/a/26240577
answers question: http://stackoverflow.com/q/26240520
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26240520
type: Answer
has body: There's no way you can have multiple lines on an &lt;input type='text'&gt;. In order to do that you would need a textarea element. To prevent users from resizing the textarea, add resize: none; to the CSS of the element.
downvote count: 0
score: 1

http://stackoverflow.com/comment/41275492
type: AnswerComment
type: Comment
has text: Sadly not really. Because it is still an experimental technology, I haven't messed around with it much, but its the only thing I know of that can actually stop function execution without a conditional check. Here are some links: http://davidwalsh.name/es6-generators, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield, I don't think your problem is currently solvable the way you've stated it.
comment on: http://stackoverflow.com/a/26299246
score: 0

download
tags question: http://stackoverflow.com/q/26218935
type: Tag
tags question: http://stackoverflow.com/q/26294768
tag name: download
tags question: http://stackoverflow.com/q/26266029
tags question: http://stackoverflow.com/q/26288187

http://stackoverflow.com/a/26293373
score: 4
has comment: http://stackoverflow.com/comment/41257036
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26293332
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26293332
has body: Event has a target property $(document).click(function(e){ event = "EVENT_KEYPRESS_CLICK"; target = e.target; });

http://stackoverflow.com/comment/41086570
type: QuestionComment
has text: See https://stackoverflow.com/a/12100954/938089, below the section "Why are these images loaded? I didn't put them in the document".
score: 0
comment on: http://stackoverflow.com/q/26200588
type: Comment

http://stackoverflow.com/comment/41145952
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26233127
type: QuestionComment
has text: If it duplicates results, you should also post the source of `ajax/post.php`

http://stackoverflow.com/comment/48477001
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26254086
has text: @VitalyB In that case, use underscore/jquery extend or some immutable library (like react immutability helper) instead of concat.

http://stackoverflow.com/q/26330049
possible better answer: http://stackoverflow.com/a/26330135
has comment: http://stackoverflow.com/comment/41324384
has comment: http://stackoverflow.com/comment/41324933
has answer: http://stackoverflow.com/a/26330135
type: Question
accepted answer: http://stackoverflow.com/a/26330544
answer count: 2
has comment: http://stackoverflow.com/comment/41324107
has title: Fixing the tab border
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I want to make tab panel with two tabs over the entire width in HTML. I found and example, but I have a tiny problem. When I select the second tab, there is a break between right tab border and right panel border. What should I do? Help me please fix it. JSFiddle
has comment: http://stackoverflow.com/comment/41324067
has answer: http://stackoverflow.com/a/26330544
upvote count: 1
has comment: http://stackoverflow.com/comment/41324710
has comment: http://stackoverflow.com/comment/41324502
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41324342
score: 1

http://stackoverflow.com/comment/41158820
has text: If the repeater data source has multiple items yes - see my note about the class alternative.
type: Comment
comment on: http://stackoverflow.com/a/26239975
score: 0
type: AnswerComment

http://stackoverflow.com/a/37438887
type: Answer
answers question: http://stackoverflow.com/q/26257268
has comment: http://stackoverflow.com/comment/63857022
has comment: http://stackoverflow.com/comment/65685675
score: 69
upvote count: 69
downvote count: 0
has comment: http://stackoverflow.com/comment/135560298
has body: Using Chart.JS version 2.1.3, answers older than this one aren't valid anymore. Using getSegmentsAtEvent(event) method will output on console this message: getSegmentsAtEvent is not a function So i think it must be removed. I didn't read any changelog to be honest. To resolve that, just use getElementsAtEvent(event) method, as it can be found on the Docs. Below it can be found the script to obtain effectively clicked slice label and value. Note that also retrieving label and value is slightly different. var ctx = document.getElementById("chart-area").getContext("2d"); var chart = new Chart(ctx, config); document.getElementById("chart-area").onclick = function(evt) { var activePoints = chart.getElementsAtEvent(evt); if(activePoints.length &gt; 0) { //get the internal index of slice in pie chart var clickedElementindex = activePoints[0]["_index"]; //get specific label by index var label = chart.data.labels[clickedElementindex]; //get value by index var value = chart.data.datasets[0].data[clickedElementindex]; /* other stuff that requires slice's label and value */ } } Hope it helps.

http://stackoverflow.com/q/26207453
answer count: 2
accepted answer: http://stackoverflow.com/a/26207640
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41097960
possible better answer: http://stackoverflow.com/a/26207543
has answer: http://stackoverflow.com/a/26207543
type: AnsweredQuestion
has body: I'm practicing right now. I understand how to do the loops, but I can't get the data aligned properly Javascript practice <! -- JavaScript --> I want my count loop, numbers 1 through 6 to go directly underneath my 10*N header. But I can't get it there. If you run my code, you'll see it's in the second column, but too low, and not directly to the right of "Yankees". So basically I want the number 1 to be directly to the right of Yankees, and 2, 3, 4, 5 and 6 listed underneath.
has title: Getting loop data aligned properly in a table?
has answer: http://stackoverflow.com/a/26207640
type: Question
tagged with: for-loop
has comment: http://stackoverflow.com/comment/41098132
tagged with: javascript
tagged with: alignment
has comment: http://stackoverflow.com/comment/41097985
tagged with: html-table
score: 0

http://stackoverflow.com/comment/41413916
comment on: http://stackoverflow.com/a/26230442
type: AnswerComment
has text: I ran into this error after trying out Angular 1.3 - angular-route 1.3 got served even after a bower install. A bower install -f fixed that.
type: Comment
score: 6

http://stackoverflow.com/comment/41175034
comment on: http://stackoverflow.com/q/26248320
has text: you have `osFamily` commented out in the model, and then are trying to use it as the `valueField` + `displayField`, is that right?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41101508
has text: Everything @David said, and what's with the extra `});`s? Please check your code again, I think you missed some lines prior to `var wsUrl ...`.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26209301
type: QuestionComment

http://stackoverflow.com/q/26298346
answer count: 1
has answer: http://stackoverflow.com/a/26298452
has body: How can i read follwing line: var polygoneCoords = [javascriptvariable]; instead of var polygoneCoords = [new google.maps.LatLng(49.91727104462425, 10.872366428375244) ,new google.maps.LatLng(49.91740920888044, 10.872366428375244)]; Of course I have defined "javascriptvariable", but i ony get : Uncaught InvalidValueError: at index 0: not a LatLng or LatLngLiteral: not an Object"
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26298452
has title: Google Maps Api: polygoneCoords = [javascriptvariable];
score: 0
type: Question
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/comment/41093241
score: 0
type: Comment
type: QuestionComment
has text: Yes, but it doesn't get rid of the nesting
comment on: http://stackoverflow.com/q/26204865

http://stackoverflow.com/comment/41312928
type: AnswerComment
has text: You can use helper option for that in draggable. Explore the api of draggable.There are many great options for use!
type: Comment
comment on: http://stackoverflow.com/a/26324101
score: 0

http://stackoverflow.com/comment/41273037
type: AnswerComment
score: 0
type: Comment
has text: A function in a loop is bad practice? Coming from someone that posted an answer using globals and inline event handlers.....OK.
comment on: http://stackoverflow.com/a/26301758

http://stackoverflow.com/a/36842856
has comment: http://stackoverflow.com/comment/95854315
has body: Asynchronous implementation with JDK 1.8: public static void setTimeout(Runnable runnable, int delay){ new Thread(() -&gt; { try { Thread.sleep(delay); runnable.run(); } catch (Exception e){ System.err.println(e); } }).start(); } To call with lambda expression: setTimeout(() -&gt; System.out.println("test"), 1000); Or with method reference: setTimeout(anInstance::aMethod, 1000); To deal with the current running thread only use a synchronous version: public static void setTimeoutSync(Runnable runnable, int delay) { try { Thread.sleep(delay); runnable.run(); } catch (Exception e){ System.err.println(e); } } Use this with caution in main thread – it will suspend everything after the call until timeout expires and runnable executes.
type: Answer
has comment: http://stackoverflow.com/comment/103384226
has comment: http://stackoverflow.com/comment/134058620
has comment: http://stackoverflow.com/comment/95898776
score: 65
upvote count: 67
has comment: http://stackoverflow.com/comment/95898471
answers question: http://stackoverflow.com/q/26311470
downvote count: 2

http://stackoverflow.com/q/26204153
tagged with: node.js
tagged with: physijs
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: Online game with THREE.js, physijs and Node.js
has body: I'm trying to make a simple web online game using physijs and node.js I found a related source from here (https://github.com/jjoe64/nodejs-physijs) and below is the basic server-side code that I want to use. 'use strict'; var THREE = require('./libs/three.js'); var Ammo = require('./libs/ammo.js'); var Physijs = require('./libs/physi.js')(THREE, Ammo); ///////////////// // game var initScene, render, renderer, scene, camera, box_falling; initScene = function() { scene = new Physijs.Scene; // Box box_falling = new Physijs.BoxMesh( new THREE.CubeGeometry( 5, 5, 5 ), new THREE.MeshBasicMaterial({ color: 0x888888 }) ); scene.add( box_falling ); // Box var box = new Physijs.BoxMesh( new THREE.CubeGeometry( 5, 5, 5 ), new THREE.MeshBasicMaterial({ color: 0x880088 }), 0 ); box.position.y = -20; scene.add( box ); setTimeout( render, 200 ); }; render = function() { scene.simulate(); // run physics setTimeout( render, 200 ); }; ////////////////// // web socket var io = require('socket.io').listen(8088); (function() { io.sockets.on('connection', function (socket) { console.log('client conneted'); }); // start physijs scene initScene(); })(); the problem is, I am so beginner of node.js and socket.io, so I do not know how to import the scene from this server-side code to the client's viewport. is there any client-side sample code of this? or how can I emit the scene information from server to client using sockets? how can I display them?
type: UnansweredQuestion
tagged with: three.js
has answer: http://stackoverflow.com/a/29910188

http://stackoverflow.com/comment/41324384
type: Comment
type: QuestionComment
has text: @olgacosta Then remove `border-bottom` from `ul.tabs`: http://jsfiddle.net/hashem/ppf083f4/8/
comment on: http://stackoverflow.com/q/26330049
score: 0

http://stackoverflow.com/q/26225764
has comment: http://stackoverflow.com/comment/41134857
type: UnansweredQuestion
tagged with: checkbox
has body: I would like to run validation before saving the screen. The issue I have is that the checkboxes I need to see if they're checked are all dynamically created... &lt;div class="availableTypes"&gt; &lt;form:checkboxes path="types" items="${availableTypes}" itemValue="typeId" itemLabel="name" element="div" /&gt; &lt;/div&gt; Ideally I would like to get the 'value' of each of the checkboxes that are checked. /** * Run validation on types checkboxes before saving */ function validateTypes() { // todo: get all the checkboxes var checkedValue = []; for (Checkbox c) { if(isChecked) { checkedValue.push(c.value); } } if (checkedValue.contains('a')) { return false; } else { return true } }
has comment: http://stackoverflow.com/comment/41132815
linked to: http://stackoverflow.com/q/8563240
tagged with: spring-mvc
answer count: 0
tagged with: loops
has comment: http://stackoverflow.com/comment/41133010
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41134934
has title: JavaScript: Iterate over dynamically created checkboxes
score: 0

logout
tags question: http://stackoverflow.com/q/26306156
tag name: logout
type: Tag

http://stackoverflow.com/a/26199487
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/69190993
has body: There is no connect event for incoming sockets (passed to the createServer() callback). When the callback is called, the socket is already connected. So this is an error in the book then. You should also be careful of this usage. IMHO here is a better example: var events = require('events'); var net = require('net'); var channel = new events.EventEmitter(); channel.clients = {}; channel.subscriptions = {}; channel.on('join', function(id, client) { channel.clients[id] = client; channel.subscriptions[id] = function(senderId, message) { if (id !== senderId) channel.clients[id].write(message); } channel.on('broadcast', channel.subscriptions[id]); }).on('leave', function(id, client) { // cleanup on client disconnect console.log('user ' + id + ' has left'); delete channel.clients[id]; channel.removeListener('broadcast', channel.subscriptions[id]); delete channel.subscriptions[id]; }); var server = net.createServer(function(client) { var id = client.remoteAddress + ':' + client.remotePort; console.log('user ' + id + ' has joined'); channel.emit('join', id, client); client.on('data', function(data) { channel.emit('broadcast', id, data.toString()); }).on('close', function() { channel.emit('leave', id, client); }); }); server.listen(8888); A further improvement would be to have only one broadcast event handler which loops over all connected sockets instead of adding a new broadcast event handler for every single socket.
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26199358
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26199358

http://stackoverflow.com/q/26274537
tagged with: jquery
linked to: http://stackoverflow.com/q/7985930
favorite count: 0
has answer: http://stackoverflow.com/a/26274773
has comment: http://stackoverflow.com/comment/41222072
type: UnansweredQuestion
has body: Picture below shows simplification of the html page layout I am working with. It has 3 forms, every form has it's own submit button and can be submitted individually. At the top of the page "Master Save" is located. This button should save all 3 forms. Every form have submit() function overloaded and they look like this: form1.submit(function () { Form1SubmitOverloaded(this); return false; }); Form1SubmitOverloaded = function (form) { $.post(form.action, $(form).serialize(), function (data) { //DOM manipulation, etc/ }).fail(function () { //error parsing etc. }); return false; }; After pressing "Master Save" I want to submit forms in order 1 > 2 > 3. But I want Form 2 to wait until form 1 has ended. Form1 submitted >> Form2 submitted >> Form3 submitted. $('#masterSave').click(function () { $('#form1').submit(); $('#form2').submit(); // wait until form1 ended $('#form3').submit(); // waint until form2 ended return false; }); Please provide method to order submits in 'click' function as presented. Thanks.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41222093
has answer: http://stackoverflow.com/a/26274931
has comment: http://stackoverflow.com/comment/41222870
has title: One submit button for multiple forms. Master save strategy,
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: forms
answer count: 2
has comment: http://stackoverflow.com/comment/41223032
has comment: http://stackoverflow.com/comment/41222133
upvote count: 1

http://stackoverflow.com/q/26235012
has comment: http://stackoverflow.com/comment/41149319
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41149287
has title: background of div wont change transparency
has answer: http://stackoverflow.com/a/26235285
has comment: http://stackoverflow.com/comment/41149164
type: UnansweredQuestion
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/26235116
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41149348
has body: I have a div 'floater_EditData_Panel_popup' which contains updatepanel, placeholder, and more divs. I want to increase the transparency of the outer div 'floater_EditData_Panel_popup', to allow the user to see the background, only slightly. So far the background colour of the div remains white,while the text boxes are faded .floaterDiv{ top: 0%; left: 0%; height: 450px; width: 800px; border: solid 1px blue; /*background-color:white;*/ background-color:rgba(255,0,0,0.5); margin:1; text-align:left; outline-style: none; display:none; overflow:hidden; zoom: 1; filter: alpha(opacity=40); opacity: 0.4; z-index:999999999999; /* background-blend-mode: multiply;*/ } Select a feature to view/edit feature information. <asp:UpdatePanel runat="server" id="UpdatePanelDetails1" updatemode="Conditional" Childrenastriggers="true"> <asp:PlaceHolder ID="PlaceHolder1" runat="server" > </asp:PlaceHolder> <asp:button runat="server" id="UpdateButton" value="Save" Text="Save" OnClientClick="ValidateEditData();" CausesValidation="true" ValidationGroup="g_currentSelectedLayerName" /> <asp:ValidationSummary runat="server" ID="valSummary1" HeaderText="You must enter a value in the following fields:" DisplayMode="BulletList" EnableClientScript="true" ShowSummary="true" Enabled="true" /> </asp:UpdatePanel> which produces the following: please advise
has comment: http://stackoverflow.com/comment/41180772
score: 0
has comment: http://stackoverflow.com/comment/41149163
answer count: 2
has comment: http://stackoverflow.com/comment/41149428
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26277026
downvote count: 0
has body: To know what is the current locale used by the user, you can do this: currentLocale = chrome.i18n.getMessage("@@ui_locale"); Now currentLocale will be something like "en" or "fr" or wathever is the locale used by the user. So now you can use it to build locale-specific URLs. To use your messages.json as a Javascript Object you can: Get the current locale Request the messages.json file with an XMLHttpRequest Parse the content into an object using the JSON.parse() method. Let's say you've got a messages.json file like this: { "hello": { "message": "Hello world!", "description": "Sample text used for testing." } } You will now do an XHR to get the file, something like this: var currentLocale = chrome.i18n.getMessage("@@ui_locale"), xhr = new XMLHttpRequest(), messages; xhr.open("GET", "/_locales/"+currentLocale+"messages.json", false); xhr.send(); messages = JSON.parse(xhr.responseText); // now you can access the messages like this: alert(messages["hello"].message); And you'll see your message alert.
type: Answer
answers question: http://stackoverflow.com/q/26273405
score: 1
upvote count: 1

http://stackoverflow.com/q/26351335
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26351529
has title: Use a JavaScript variable as part of a href link in HTML
type: Question
has comment: http://stackoverflow.com/comment/41362958
has comment: http://stackoverflow.com/comment/41363015
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/41362834
has comment: http://stackoverflow.com/comment/41362910
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26351529
answer count: 1
score: 0
has body: Part of my code: {$value.file_name} Download This part of the url will already be present: "a.b.c.d.edu/bio/cluster/" $value.file_name contains "/var/www/html/biology/demo/files/mpijobs/107/mothership/data/job107_0_0_output.tif" After the script, "para" contains the edited path which is "/files/mpijobs/107/mothership/data/job107_0_0_output.tif" (the removal of "/var/www/html/biology/demo") The code: Download provides a clickable link to "a.b.c.d.edu/bio/cluster//var/www/html/biology/demo/files/mpijobs/107/mothership/data/job107_0_0_output.tif" and what I want to do is replace "{$value.file_name}" inside the brackets with "para" (and what it represents) so that the download link is linked to "a.b.c.d.edu/bio/cluster//files/mpijobs/107/mothership/data/job107_0_0_output.tif"
has comment: http://stackoverflow.com/comment/41362921
tagged with: php
has comment: http://stackoverflow.com/comment/41362861

http://stackoverflow.com/q/26286183
has title: Javascript variable that always returns value of function
type: Question
has comment: http://stackoverflow.com/comment/41244024
tagged with: javascript
has answer: http://stackoverflow.com/a/26286243
has comment: http://stackoverflow.com/comment/41244139
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26286228
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26286228
accepted answer: http://stackoverflow.com/a/26286243
upvote count: 1
has body: I'm pretty sure I know the answer to this (and that it is no), but is it possible to create a variable that always returns the value of a function without "calling" the variable? I'm sick of an inactivity warning on a website I use. I look at it a few times a day, but I keep it open in case there's an update I need to look at. It automatically signs me out after 15 minutes using some javascript--the token isn't invalidated by a cookie expiring, nor is my session removed server-side--and the variable it checks is called last_user_action. I'd like to make last_user_action always point to new Date().getTime();. last_user_action = function() { new Date().getTime(); } would work if I could easily change all the references to last_user_action to instead belast_user_action(), but I can't. last_user_action = (function() { return new Date().getTime(); })(); only sets the value once. So like I said, I doubt there's a way to do this, but if it is possible, how would I do it? EDIT It occurs to me now, it'd be easier to just run window.setInterval(function() { last_user_action = new Date().getTime(); }, 1000 * 60 * 10); in Chrome's javascript console.
has answer: http://stackoverflow.com/a/26286231
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26286257

http://stackoverflow.com/q/26289359
tagged with: javascript
has title: How to create text node in libxmljs
tagged with: libxml2
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: libxml-js
has comment: http://stackoverflow.com/comment/41260257
tagged with: node.js
has body: I have searched the documentation at https://github.com/polotek/libxmljs/wiki but fails to find out how to create plain text nodes. Here is my node.js code: var libxmljs = require('libxmljs'); var xmlStr = ' bar foo '; var doc = libxmljs.parseXmlString(xmlStr); // Create a normal extra node doc.get('/div/p').node('span', 'foobar'); doc.toString() now results in: <?xml version="1.0" encoding="UTF-8"?> bar foofoobar But what if I wanted: <?xml version="1.0" encoding="UTF-8"?> bar foo foobar I am aware that I can set the content of a node with .text(), so I COULD do this by getting the string content of , append it as a string and re-set it with .text() again. That is not what I need. I need to create a text node in the DOM. Is this not possible, or am I just to bad at reading the docs?
has comment: http://stackoverflow.com/comment/41269281
type: Question
score: 2
downvote count: 0

http://stackoverflow.com/comment/41168278
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26242423
has text: Not in bad faith @BigPino, just testing the code as you have it written. Inputs have the same name *all of the time* and so we have to account for that.
type: AnswerComment

http://stackoverflow.com/q/26208691
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41101071
has comment: http://stackoverflow.com/comment/41100281
has title: dynamic text moving other text
has comment: http://stackoverflow.com/comment/41100915
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41100983
has body: Ok, so I know this is probably simple but I'm having such a brain fart... I have a div with text in it and inside it a dynamic text that changes. The problem is that when the text changes, it is moving my other text. I have tried putting it as fixed...with fixes the problem, however, at a later time when i add more content that will involve scrolling, i know that the fixed text will remain there the entire scrolling.... so i'm trying to get the same thing that fixed is offering but allowing it to scroll. Here is some code: pretty much if I change the dynamicText to position:fixed; then everything on the left side stays still....but I think I should use a different way but don't know how. Thanks in advance HTML: Hi, my name is Carine. I'm a Web Developer. CSS: .message { font-size: 1em; margin: 3% auto; } .title { font-family: 'Over the Rainbow', cursive, sans-serif; font-size: 1.1em; } .dynamicText { opacity: 1; -webkit-transition: opacity 550ms ease; -moz-transition: opacity 550ms ease; -o-transition: opacity 550ms ease; transition: opacity 550ms ease; } .dynamicTextOff { opacity: 0; } JS: window.onload = function() { runSkills(); } runSkills = function() { var array = [ "Graphic Designer.", "UX Designer.", "Photographer.", "Consultant.", "Artist.", "Jill of all Trades." ]; var i = -1; var dyText = $(".dynamicText:last"); var interval = setInterval(function() { i++; dyText.text(array[i]); if(i == array.length-1) i = -1; }, 3100); var innerInt = setInterval(function() { dyText.toggleClass('dynamicTextOff'); }, 1550); }

http://stackoverflow.com/comment/41166028
type: Comment
score: 0
has text: What is the HTML doing there?
comment on: http://stackoverflow.com/q/26243576
type: QuestionComment

http://stackoverflow.com/a/26321757
upvote count: 1
has comment: http://stackoverflow.com/comment/41308612
type: Answer
downvote count: 0
score: 1
has body: Fiddle $('.total').html('Total: ' + Math.round(subtract * 100) / 100);
answers question: http://stackoverflow.com/q/26321738
has comment: http://stackoverflow.com/comment/41308595

http://stackoverflow.com/q/26269885
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26269963
tagged with: arrays
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Multi forms datas into array via Javascript
has answer: http://stackoverflow.com/a/26269963
type: AnsweredQuestion
has body: I have some forms like this: Image Link Content Author .... Image Link Content Author The forms will be added more and more when I click the add button, so will have multi forms. I want to submit multi datas into an json arrayjust looks like this: "quotes":[ {"image":"image_link","content":"content","author:"author"} {"image":"image_link","content":"content","author:"author"} ... {"image":"image_link","content":"content","author:"author"} ] which is an array will contain all of the forms' datas. And the amount of forms is not fixed. It will be changed when I click add button. So how can I do that automatically. Thank you so much!

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

http://stackoverflow.com/comment/41211967
has text: I think I have it all working corretly. Not exactly the way you suggested, but without using bind and unbind. See right below for code. Thanks for pointing me in a different direction.
type: Comment
comment on: http://stackoverflow.com/a/26261169
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41106130
comment on: http://stackoverflow.com/q/26211186
type: Comment
type: QuestionComment
has text: @V2Solutions-MSTeam : I added my code. please see.
score: 0

http://stackoverflow.com/q/26274036
score: 1
has comment: http://stackoverflow.com/comment/47061960
type: Question
has comment: http://stackoverflow.com/comment/41227345
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm trying to get the HTML content of an element using jQuery, works fine on each browsers I've tested such as Chrome Firefox Opera.. but with Safari 7.1 on MAC... it's not working I just get an Array containing the element. So if I do that: console.log($('#myElement').parent().find('svg').html()); I get this in my console. Error: undefined is not an object (evaluating 'b.innerHTML.replace') Even if I do that it doesn't work: console.log($($('#myElement').parent().find('svg').html())); Thank you in advance.
has title: I Don't get an object selecting an HTML element using jQuery in Safari 7.1 on MAC
has answer: http://stackoverflow.com/a/26274333
upvote count: 1
has comment: http://stackoverflow.com/comment/41227524
favorite count: 0
type: UnansweredQuestion
tagged with: safari
downvote count: 0

http://stackoverflow.com/comment/41145431
has text: use promoImg.attr('src') http://jsfiddle.net/rL2da9ef/1/
score: 2
comment on: http://stackoverflow.com/q/26232907
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41178549
comment on: http://stackoverflow.com/q/26250505
type: QuestionComment
score: 0
has text: sorry i've no idea to achive this,
type: Comment

http://stackoverflow.com/comment/41336007
has text: For 0 to 9 I would recommend having `var a = ["zro","one","two","tri","for","fiv","six","svn","egt","nin"];` since a[digit] would return the string needed
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26336390
type: QuestionComment

http://stackoverflow.com/a/26299567
accepted answer of: http://stackoverflow.com/q/26299387
answers question: http://stackoverflow.com/q/26299387
type: Answer
has comment: http://stackoverflow.com/comment/41268311
has body: Does $("#div").animate({scrollTop: "0px"}); not work? Anyone else who stumbles across this, here's a fiddle: http://jsfiddle.net/2z3fx3j5/1/ Hello $(document).ready(function() { $("body").animate({scrollTop: "1000px"}, 2000); $("body").animate({scrollTop: "0px"}, 2000); }); div { bordeR: solid 1px black; height: 2000px; }
has comment: http://stackoverflow.com/comment/41268433
has comment: http://stackoverflow.com/comment/41268353
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41194955
comment on: http://stackoverflow.com/q/26249745
score: 0
type: Comment
type: QuestionComment
has text: What do you mean, "child application". How did you overcome the "one viewport per window" limitation?

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/26319417
tags question: http://stackoverflow.com/q/26286578
tags question: http://stackoverflow.com/q/26211739
tags question: http://stackoverflow.com/q/26316787
tags question: http://stackoverflow.com/q/26310086
tags question: http://stackoverflow.com/q/26341922
tags question: http://stackoverflow.com/q/26327951
tags question: http://stackoverflow.com/q/26330326
tags question: http://stackoverflow.com/q/26245865
tags question: http://stackoverflow.com/q/26228761
tags question: http://stackoverflow.com/q/26271659
tags question: http://stackoverflow.com/q/26348197
tags question: http://stackoverflow.com/q/26217701
tags question: http://stackoverflow.com/q/26196332
tags question: http://stackoverflow.com/q/26346555
tags question: http://stackoverflow.com/q/26324213
tags question: http://stackoverflow.com/q/26229900
tags question: http://stackoverflow.com/q/26314252
tags question: http://stackoverflow.com/q/26312612
tags question: http://stackoverflow.com/q/26260313
tags question: http://stackoverflow.com/q/26211498
tags question: http://stackoverflow.com/q/26342743
tags question: http://stackoverflow.com/q/26203892
tags question: http://stackoverflow.com/q/26253570
tags question: http://stackoverflow.com/q/26256217
tags question: http://stackoverflow.com/q/26195518
tags question: http://stackoverflow.com/q/26336585
tags question: http://stackoverflow.com/q/26276945
tags question: http://stackoverflow.com/q/26349958
tags question: http://stackoverflow.com/q/26200750
tags question: http://stackoverflow.com/q/26226875
tags question: http://stackoverflow.com/q/26244519
tags question: http://stackoverflow.com/q/26275123
tags question: http://stackoverflow.com/q/26264366
tags question: http://stackoverflow.com/q/26275398
tags question: http://stackoverflow.com/q/26234988
tags question: http://stackoverflow.com/q/26329002
tags question: http://stackoverflow.com/q/26316572
tags question: http://stackoverflow.com/q/26326778
tags question: http://stackoverflow.com/q/26249133
tags question: http://stackoverflow.com/q/26339341
tags question: http://stackoverflow.com/q/26298186
tags question: http://stackoverflow.com/q/26329456
tags question: http://stackoverflow.com/q/26323132
tags question: http://stackoverflow.com/q/26264283
tags question: http://stackoverflow.com/q/26272760
tags question: http://stackoverflow.com/q/26332481
tags question: http://stackoverflow.com/q/26257568
tags question: http://stackoverflow.com/q/26206202
tags question: http://stackoverflow.com/q/26205731
tags question: http://stackoverflow.com/q/26212732
tags question: http://stackoverflow.com/q/26229267
tags question: http://stackoverflow.com/q/26256945
tags question: http://stackoverflow.com/q/26202962
tags question: http://stackoverflow.com/q/26330935
tags question: http://stackoverflow.com/q/26243930
tags question: http://stackoverflow.com/q/26195958
tags question: http://stackoverflow.com/q/26214142
tags question: http://stackoverflow.com/q/26305265
tags question: http://stackoverflow.com/q/26263585
tags question: http://stackoverflow.com/q/26213866
tags question: http://stackoverflow.com/q/26282549
tags question: http://stackoverflow.com/q/26343000
tags question: http://stackoverflow.com/q/26284204
tags question: http://stackoverflow.com/q/26273725
tags question: http://stackoverflow.com/q/26313001
tags question: http://stackoverflow.com/q/26232198
tags question: http://stackoverflow.com/q/26346246
tags question: http://stackoverflow.com/q/26263132
tags question: http://stackoverflow.com/q/26307188
tags question: http://stackoverflow.com/q/26218656
tags question: http://stackoverflow.com/q/26259538
tags question: http://stackoverflow.com/q/26296402
tags question: http://stackoverflow.com/q/26342058
tags question: http://stackoverflow.com/q/26261577
tags question: http://stackoverflow.com/q/26337941
tags question: http://stackoverflow.com/q/26260949
tags question: http://stackoverflow.com/q/26323667
tags question: http://stackoverflow.com/q/26282947
tags question: http://stackoverflow.com/q/26349883

http://stackoverflow.com/q/26258947
has body: I want to turn the following html: Another hurricane is coming here. And check out pictures here. into this: Another hurricane is coming @[23]. And check out pictures @[43]. I'm basically trying to fetch each "data-number"-value and putting it into square brackets, whilst omitting the text in the a-tags. Any idea on how best to solve this?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26259028
type: AnsweredQuestion
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26259028
score: 1
tagged with: indexof
possible better answer: http://stackoverflow.com/a/26259020
has title: How to swap link for text in div with Javascript of jQuery?
has answer: http://stackoverflow.com/a/26259020
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42883816
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26303324
has text: @Tasos hi :) there was no other way to destroy the panel, the widget has no destroy method. The code is meant to make panel work in multi pages environment.
score: 1

http://stackoverflow.com/a/26220872
type: Answer
answers question: http://stackoverflow.com/q/26218311
upvote count: 1
has body: Try this. if(isset($_POST['text'])) { $pdf=new PDF_HTML(); $pdf->SetFont('Arial','',12); $pdf->AddPage(); foreach($_POST['text'] as $text) { if(ini_get('magic_quotes_gpc')=='1') $text=stripslashes($text); $pdf->WriteHTML($text); } $pdf->Output(); exit; } ?> HTML2PDF <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" target="_blank"> Content: Text 1: Text 2: Text 3: Text 4: ?>
accepted answer of: http://stackoverflow.com/q/26218311
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26245209
tagged with: typeerror
has title: Node.js - strange TypeError when function being called twice within class
tagged with: asynchronous
type: UnansweredQuestion
has body: Consider this (simplified) extract from a class: function PluginsEngine() { this.allPluggins = require('./plugins'); }; PluginsEngine.prototype.applyPlugins = function(incomingData, done){ // bind the incoming data to each plugin var key; for (key in this.allPluggins) this.allPluggins[key] = this.allPluggins[key].bind(undefined, incomingData); async.parallel(this.allPluggins, done); }; The constructor loads a set of anonymous functions and the "applyPlugins" method then passes the "incomingData" (string) to each and these are executed using async. When writing tests against this I am seeing a strange behavior in that calling "applyPlugins" runs fine, but calling it again immediately afterwards causes the error: TypeError: string is not a function Adding some additional debug, I can see that allPluggins is empty (functions not available) when run the second time. Can anyone advise why the variable is losing the functions?
tagged with: node.js
has comment: http://stackoverflow.com/comment/41171039
answer count: 0
has comment: http://stackoverflow.com/comment/41169176
type: Question
tagged with: javascript
tagged with: class
score: 0

http://stackoverflow.com/q/26291910
tagged with: checkbox
has answer: http://stackoverflow.com/a/26292022
type: AnsweredQuestion
has body: I found this answer which does part of what I want to do, uncheck checkboxes when people go past a certain limit. Now I want to modify it so that the values of the checkboxes are added to and removed from a string as the checkboxes are checked/unchecked. My updated code looks like this: var filterURL = ''; var checked = [], $check = $('.accordion-list input').change(function() { checked.push(this); checked = $(checked); checked.prop('checked', false).slice(-6).prop('checked', true); if($(this).is(':checked')) { filterURL += ($(this).val()); } else { filterURL = filterURL.replace($(this).val(),''); } alert(filterURL); }); This works fine until I start to try and uncheck checkboxes – they don't uncheck and the value keeps getting appended to the string. Working demo
possible better answer: http://stackoverflow.com/a/26291972
has title: Limit number of checkboxes and update string based on their value
upvote count: 1
linked to: http://stackoverflow.com/q/16337625
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26291972
accepted answer: http://stackoverflow.com/a/26292022
favorite count: 0

http://stackoverflow.com/q/26254825
has comment: http://stackoverflow.com/comment/41185717
answer count: 3
downvote count: 0
has body: I would like to implement such a directive for AngularJS: if used in input[text], on hitting enter the focus would move to next input. What would be the best way to accomplish this? I have a very large form and would like to implement a way to go over the fields in a fast way.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/33007561
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/36960388
has title: AngularJS directive for text input: focus on next input on Enter
type: Question
has comment: http://stackoverflow.com/comment/41186034
tagged with: javascript
has answer: http://stackoverflow.com/a/26256775
linked to: http://stackoverflow.com/q/18086865

http://stackoverflow.com/q/26210724
has comment: http://stackoverflow.com/comment/41104273
score: 0
has body: I am cropping image with required area,which demo you can see at'http://www.script-tutorials.com/demos/197/index.html' but i want to use video in place of image,how to do it ? I had tried lot using following code but nothing happened.Can anybody help? html5 : how to crop a video tag into a canvas tag
has title: How to make cropping in video on mousemove
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41104369
has comment: http://stackoverflow.com/comment/41104262
has comment: http://stackoverflow.com/comment/41104389
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41357096
score: 0
has text: Console returns `Binding 'statechange' event - this should only happen once` and then... everythig stops. Everything else (when I comment out your function) works great, so it's most unlikely that the rest of the code is faulty.
comment on: http://stackoverflow.com/a/26347815
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26242696
tagged with: javascript
has comment: http://stackoverflow.com/comment/41164388
accepted answer: http://stackoverflow.com/a/26243040
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/19761241
has comment: http://stackoverflow.com/comment/41165552
has comment: http://stackoverflow.com/comment/41164389
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26243040
has body: I can open a new page in SAME tab by using function on button click This is the file current_tab.html: &lt;input id="openHere" type="button" value="Open Here" onclick="openHere()"/&gt; This is the file current_tab.js: function openHere(){ window.open("new_tab.html","_self"); } This new opened page must have a button which if pressed closes the tab: This is the button in new_tab.html &lt;input id="close" type="button" value="Close" onclick="close()"/&gt; And this is the function on file new_tab.js: function close() { window.close(); } When i press the Close button nothing happens, what am I missing?
has title: Javascript open new tab in same window with close button

arrays
tags question: http://stackoverflow.com/q/26291936
tags question: http://stackoverflow.com/q/26221784
tags question: http://stackoverflow.com/q/26310176
tags question: http://stackoverflow.com/q/26341265
tags question: http://stackoverflow.com/q/26260459
tags question: http://stackoverflow.com/q/26318036
tags question: http://stackoverflow.com/q/26307461
tags question: http://stackoverflow.com/q/26262356
tags question: http://stackoverflow.com/q/26254474
tags question: http://stackoverflow.com/q/26256858
tags question: http://stackoverflow.com/q/26208210
type: Tag
tags question: http://stackoverflow.com/q/26333243
tags question: http://stackoverflow.com/q/26209430
tags question: http://stackoverflow.com/q/26258602
tags question: http://stackoverflow.com/q/26276840
tags question: http://stackoverflow.com/q/26269398
tags question: http://stackoverflow.com/q/26241508
tags question: http://stackoverflow.com/q/26243576
tags question: http://stackoverflow.com/q/26281326
tags question: http://stackoverflow.com/q/26240448
tags question: http://stackoverflow.com/q/26273777
tags question: http://stackoverflow.com/q/26332714
tags question: http://stackoverflow.com/q/26349109
tags question: http://stackoverflow.com/q/26253797
tags question: http://stackoverflow.com/q/26294193
tags question: http://stackoverflow.com/q/26302240
tags question: http://stackoverflow.com/q/26260449
tags question: http://stackoverflow.com/q/26295972
tags question: http://stackoverflow.com/q/26269885
tags question: http://stackoverflow.com/q/26264159
tags question: http://stackoverflow.com/q/26336876
tags question: http://stackoverflow.com/q/26221730
tags question: http://stackoverflow.com/q/26218603
tags question: http://stackoverflow.com/q/26243746
tags question: http://stackoverflow.com/q/26325483
tags question: http://stackoverflow.com/q/26284479
tags question: http://stackoverflow.com/q/26238278
tags question: http://stackoverflow.com/q/26214232
tags question: http://stackoverflow.com/q/26328871
tags question: http://stackoverflow.com/q/26264059
tags question: http://stackoverflow.com/q/26319146
tags question: http://stackoverflow.com/q/26282855
tags question: http://stackoverflow.com/q/26251023
tags question: http://stackoverflow.com/q/26220911
tags question: http://stackoverflow.com/q/26219033
tags question: http://stackoverflow.com/q/26345451
tags question: http://stackoverflow.com/q/26302164
tags question: http://stackoverflow.com/q/26316928
tags question: http://stackoverflow.com/q/26213502
tags question: http://stackoverflow.com/q/26316291
tags question: http://stackoverflow.com/q/26299703
tags question: http://stackoverflow.com/q/26283588
tags question: http://stackoverflow.com/q/26237031
tags question: http://stackoverflow.com/q/26351853
tags question: http://stackoverflow.com/q/26213603
tags question: http://stackoverflow.com/q/26316536
tags question: http://stackoverflow.com/q/26205139
tags question: http://stackoverflow.com/q/26339184
tags question: http://stackoverflow.com/q/26303822
tags question: http://stackoverflow.com/q/26235398
tags question: http://stackoverflow.com/q/26226598
tags question: http://stackoverflow.com/q/26255867
tags question: http://stackoverflow.com/q/26221836
tags question: http://stackoverflow.com/q/26271176
tags question: http://stackoverflow.com/q/26251216
tags question: http://stackoverflow.com/q/26220492
tag name: arrays
tags question: http://stackoverflow.com/q/26269791
tags question: http://stackoverflow.com/q/26281000
tags question: http://stackoverflow.com/q/26285061
tags question: http://stackoverflow.com/q/26329593
tags question: http://stackoverflow.com/q/26207410
tags question: http://stackoverflow.com/q/26273043
tags question: http://stackoverflow.com/q/26305265
tags question: http://stackoverflow.com/q/26245091
tags question: http://stackoverflow.com/q/26224562
tags question: http://stackoverflow.com/q/26287781
tags question: http://stackoverflow.com/q/26323481
tags question: http://stackoverflow.com/q/26260886

http://stackoverflow.com/a/26218848
has body: In you Backbone.View, you've to listen to your model changes : var MyView = Backbone.View.extend({ initialize: function(){ this.listenTo(this.model, "change", this.compareToDefaults); }, compareToDefaults: function(model){ // here, you can compare each model value with the default ones. // and display or not display your RESET button. } });
answers question: http://stackoverflow.com/q/26218584
type: Answer
score: 0

http://stackoverflow.com/a/26201475
upvote count: 1
has body: That's a prepared statement, which you should use to prevent SQL Injection attacks. E.g. var text = "foo"; var ts = "bar"; tx.executeSql("INSERT INTO todo(todo, added_on) VALUES (?,?)", [text, ts]); is the same as: tx.executeSql("INSERT INTO todo(todo, added_on) VALUES ('foo','bar')");
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26201452

http://stackoverflow.com/a/26217109
has body: For this reason - there is the Promises/A+ spec. Promises/A+ is a promise specification that defines only the then method. It describes how different promise libraries interoperate with each other - effectively serving exactly the purpose you describe. All these libraries you describe - Bluebird, Q and AngularJS's $q are in fact A+ promises and are all run against the test suite. That minimal interface you describe exists - and it is then. Alternatively if you need to create your own promises directly - you may choose any one Promises/A+ library from that list and you are guaranteed it will work in all of the other libraries - since they're all Promises/A+ they will assimilate the promises correctly. It will also work between different versions of the library (minus bugs). If you choose a Promises/A+ library, for example Bluebird in your app - users can use any conformant implementation. Here is the suite. If you really want to be able to create promises from scratch - you can ask the users to provide their assimilation method to your library - for example: MyLib.init = function init(assimilator){ MyLib.assimilator = assimilator } MyLib.apiCall = function(){ // assimilate a returned promise from whatever library you want return MyLib.assimilator(promiseYouCreateInWhateverLibrary()); } MyLib.init(Promise.resolve); // Initialize with Blubird, or native promises MyLib.init(Q); // Initializes with Q // initialize with any empty promise with any library MyLib.init(function(x){ return empty.then(function(x){ return x; }); });
has comment: http://stackoverflow.com/comment/41117272
type: Answer
has comment: http://stackoverflow.com/comment/41118374
has comment: http://stackoverflow.com/comment/41117714
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41118456
has comment: http://stackoverflow.com/comment/41118275
has comment: http://stackoverflow.com/comment/41116348
accepted answer of: http://stackoverflow.com/q/26216636
answers question: http://stackoverflow.com/q/26216636
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26209647
accepted answer of: http://stackoverflow.com/q/26209599
type: Answer
has comment: http://stackoverflow.com/comment/41123745
score: 2
has comment: http://stackoverflow.com/comment/41102533
upvote count: 2
has comment: http://stackoverflow.com/comment/41102193
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26209599
has body: You can use array.filter and then walk each of the objects in the array like so: var myArray = [ {"name1": "aaa", "name2":"bbb", "other":"ccc"}, {"name1": "ddd", "name2":"eee", "other":"fff"} ]; myArray.filter(function(row){ for( key in row ){ if( key.indexOf('name') === 0 ){ // only matches keys **starting** with "name" console.log( 'a[' + key + '] = ' + row[key] ); } } });
has comment: http://stackoverflow.com/comment/41102174

http://stackoverflow.com/a/26220501
accepted answer of: http://stackoverflow.com/q/26220472
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/41123584
downvote count: 0
has comment: http://stackoverflow.com/comment/41123642
has comment: http://stackoverflow.com/comment/41123035
has comment: http://stackoverflow.com/comment/41123102
has comment: http://stackoverflow.com/comment/41123227
has comment: http://stackoverflow.com/comment/41122691
type: AcceptedAnswer
has body: Use delay(duration) $('.sub-menu').delay(500).hide(0); $(id).delay(500).hide(0); More info: http://api.jquery.com/delay/
answers question: http://stackoverflow.com/q/26220472
score: 4

http://stackoverflow.com/q/26195581
has answer: http://stackoverflow.com/a/26196648
favorite count: 0
has comment: http://stackoverflow.com/comment/41076301
has title: Javascript issues?
score: -3
possible better answer: http://stackoverflow.com/a/26196364
type: AnsweredQuestion
downvote count: 3
type: Question
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26196364
answer count: 3
has body: So here is what I have so far. I am trying to create a button that calculates percentages of test scores then displays onto the page when you press a button. Bear in mind i'm a VERY new programmer with less than 3 weeks experience and I could really use the help. var sam = 9; var sally = 8; var donald = 4; function go(){ function percentage(); alert("Sam's score on the test is " + samp + "%\nSally's score on the test is " + sallyp + "%\nDonald's score on the test is " + donaldp + "%") } function percentage(){ var samp = sam / 10 * 100; var sallyp = sally / 10 * 100; var donaldp = donald / 10 * 100; }
has answer: http://stackoverflow.com/a/26195642
accepted answer: http://stackoverflow.com/a/26195642

http://stackoverflow.com/q/26243219
has comment: http://stackoverflow.com/comment/41167380
has comment: http://stackoverflow.com/comment/41166580
tagged with: javascript
has comment: http://stackoverflow.com/comment/41166022
tagged with: passport.js
tagged with: express
tagged with: rest
has body: Suppose I have a script like this, which uses a Passport authentication strategy with an Express backend. How would I use this script to actually make API function calls? I don't see any explicit examples in the linked project's documentation nor can I find anything in Passport.js's documentation. Thanks.
has answer: http://stackoverflow.com/a/26244243
has comment: http://stackoverflow.com/comment/41167158
has comment: http://stackoverflow.com/comment/41166441
has answer: http://stackoverflow.com/a/26245214
favorite count: 0
has comment: http://stackoverflow.com/comment/41167222
has title: Need help on how to actually use Passport authentication strategy in Express
possible better answer: http://stackoverflow.com/a/26244243
upvote count: 2
has comment: http://stackoverflow.com/comment/41165829
tagged with: node.js
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26245214
downvote count: 1
type: Question
answer count: 2

http://stackoverflow.com/q/26347802
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26347855
possible better answer: http://stackoverflow.com/a/26348074
has body: I'm having a fuzzy brain day or something...I want to set a var = data returned from an ajax call and use it as a parameter in a morris chart. function GetICCGraphData() { return $.ajax({ url: "/url/" }); } $(function() { var promise = GetICCGraphData(); Morris.Area({ element: 'icc-graph', data: promise.success(function (data) { return data; }), ...&lt;snip&gt;... the url returns JSON and if I hit the url manually and paste the data into data: &lt;paste&gt; the chart works as it should...intially I tried to do it like one might think it should be...to just use the function as the value for data...then I got off on this 'promise' thing....so I just need to figure out how to make a variable equal data from an ajax call. Seems like it should be easy so I dunno, maybe I've just been staring at it for too long? thanks people
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41356546
has answer: http://stackoverflow.com/a/26347855
has comment: http://stackoverflow.com/comment/41356683
type: Question
linked to: http://stackoverflow.com/q/14220321
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
duplicate of: http://stackoverflow.com/q/14220321
has title: jquery: set variable as data returned from ajax call
has answer: http://stackoverflow.com/a/26348074

http://stackoverflow.com/q/26255923
has body: I want to achieve. 1. Creating a single model on model.save should point to url mentioned in Models attributes 2. I want to do a bulk save ( how can i do that ). So, as per example, say I have arrays of books model and I want to save it at once using Collection's url. var BookModel = Backbone.Model.extend({ idAttribute: 'id', url: function() { return 'http:/test.com/books/addsinglebook' }, defaults: { id: null, name: '' }, }); var BookCollection = Backbone.Collection.extend({ url: 'http:/test.com/books/addbulkbooks', model: BookModel, }); // bookmodel.save() should point to /addsinglebook // bookcollection.somesavemethod() should point to /addbulkbooks Since Backbone collection doesn't have a save and create is for a single model, do I need to add my own method to the prototype for implementing a bulk save?
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26256263
type: UnansweredQuestion
tagged with: backbone-model
has title: Backbone Collection and Model url, bulk model collection save
type: Question
tagged with: backbone.js-collections
has answer: http://stackoverflow.com/a/26256971
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/12287359
answer count: 2

http://stackoverflow.com/comment/41175394
comment on: http://stackoverflow.com/a/26248368
type: AnswerComment
has text: I'm sorry about that.Would you mind to clarify your point lil bit,please
score: 0
type: Comment

http://stackoverflow.com/comment/41199381
type: QuestionComment
has text: @JustinPowell I got it working! Thank you! Do you know if it's possible to put the creation of the YT.player object in a separate .js file? It didn't work when I tried.
comment on: http://stackoverflow.com/q/26257395
score: 0
type: Comment

http://stackoverflow.com/comment/41231551
score: 0
type: Comment
type: QuestionComment
has text: @epascarello I said "I would like to show the scroll bar". And I have my reasons for it.
comment on: http://stackoverflow.com/q/26278500

http://stackoverflow.com/comment/41075332
type: QuestionComment
has text: @adeno: setTimeout is working.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26194907

http://stackoverflow.com/comment/41283397
type: AnswerComment
has text: @Rodrigo Have a read of the Ember documentation: http://emberjs.com/guides/models/defining-models/#toc_one-to-one
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26307211

http://stackoverflow.com/q/26283580
has body: When applying MVVM pattern using library like knockout, kendo, angular... in a MVC .NET application we probably have to deal with some concerns: How to organize and render scripts efficiently when those scripts only needed for this view but that view (view-specific script)? How to associate data between the model at server-side and the view-model at client-side without manually declaring the view-model? How to facilitate MVVM APIs to bind view-specific script with HTML element in view? Below is an approach for those concerns: Firstly, we need some core functions allow extending JS objects in an inheritance structure. Based on jquery, it can be done in a file app.core.js like this: (function ($) { AppGlobal = function () { }; AppGlobal.prototype = { DOT: '.', init: AppGlobal, namespace: function (namespace, context) { context = context || window; var index = namespace.indexOf(this.DOT); if (index > 0) { var subNamespace = namespace.substring(index + 1); var subContextName = namespace.substring(0, index); context[subContextName] = context[subContextName] || {}; return this.namespace(subNamespace, context[subContextName]); } context[namespace] = context[namespace] || {}; return context[namespace]; }, extend: function (protobj, skipBaseConstructor) { protobj = protobj || {}; var subClass = null; var baseConstructor = this; if (typeof (baseConstructor) != "function") { baseConstructor = this.init; } if (protobj.init) { subClass = function () { if (!skipBaseConstructor) { baseConstructor.apply(this, arguments); } protobj.init.apply(this, arguments); }; } else { subClass = function () { if (!skipBaseConstructor) { baseConstructor.apply(this, arguments); } }; protobj.init = baseConstructor; } subClass.prototype = subClass.prototype || {}; $.extend(true, subClass.prototype, this.prototype, protobj); subClass.extend = this.extend; return subClass; }, }; app = new AppGlobal(); app.Core = app.extend({ }); })(jQuery); Place that file in ~\Scripts folder and register it in bundli…
type: UnansweredQuestion
tagged with: mvvm
has title: A well-defined structure for javascript object model and organization for javascript files in an ASP .NET MVC application
answer count: 0
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41259897
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/45563927
score: 0

http://stackoverflow.com/q/26263925
accepted answer: http://stackoverflow.com/a/26265037
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41202993
type: AnsweredQuestion
has title: How to change image of other buttons on onClick event?
possible better answer: http://stackoverflow.com/a/26264124
has answer: http://stackoverflow.com/a/26264124
type: Question
tagged with: javascript
has body: i am here again with a problem. I have four buttons, when i click on button one, it changes button image from old image to new image ok now the image is changed but if i press button 2 the image of button 2 is changed but the image of button one is same i.e new image. i want it to revert back to old image. here is code : &lt;input type="image" id="start" src="buttonred.png" width="50px" height="50px" onClick= "this.src='buttonblue.png'"/&gt; &lt;input type="image" id="stop" src="buttonred.png" width="50px" height="50px" onClick="this.src='buttonblue.png'"/&gt; &lt;input type="image" id="slow" img src="buttonred.png" width="50px" height="50px" onClick="this.src='buttonblue.png'"/&gt; &lt;input type="image" id="fast" img src="buttonred.png" width="50px" height="50px" onClick="this.src='buttonblue.png'"/&gt;
has answer: http://stackoverflow.com/a/26265037

http://stackoverflow.com/comment/41152397
type: Comment
has text: I have my server log also how can i identify my error from that
comment on: http://stackoverflow.com/a/26236566
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41166247
score: 0
comment on: http://stackoverflow.com/q/26243576
type: Comment
type: QuestionComment
has text: @MikeBrant Please chk my edited code

http://stackoverflow.com/a/26204197
type: Answer
answers question: http://stackoverflow.com/q/26201725
has body: One thing I see is the use of the class hide. The following code: &lt;div id="demoLightbox" class="lightbox hide fade" tabindex="-1" role="dialog" area-hidden="true"&gt; Needs to be changed to this according to the Github repo of the plugin: &lt;div id="demoLightbox" class="lightbox fade" tabindex="-1" role="dialog" area-hidden="true"&gt; Also, the Github plugin page states it is updated to use bootstrap v3, not v2.3.2
score: 0

http://stackoverflow.com/comment/79668938
has text: THIS is the explanation I've been looking for for a month! I used `.isEnabled()` and ran 100 tests and they all passed, whereas before it was at a 90% pass rate. I hope others find this answer. Thank you so much @Louis
comment on: http://stackoverflow.com/a/26664694
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26249148
score: 0
answers question: http://stackoverflow.com/q/26237914
type: Answer
has body: Implement your GETs in an angular service or factory like this: angular.module('pages',[]).factory('Pages', function($http) { return { getPage: function(pageNum, callback) { $http.get('/images?page=' + pageNum).success(function(data, status) { callback(data, status); }); } } }); Then inject the service into your controller. Here is an edit to your jsfiddle with this approach stubbed out: http://jsfiddle.net/ef0d9zuk/1/ Hope it helps.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26237914

http://stackoverflow.com/comment/41302922
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26318752
has text: Show the code what you have tried yet.
score: 0

http://stackoverflow.com/a/26256369
has body: Why are you even using .each() ? All you need to make it work is using the selector since jQuery already will loop all of the selected items to .on() $('#gallery .gallery-item .file_upload').on( 'change', 'input', function(evt){ var files = evt.target.files; var file = files[0]; console.log(files[0]); var reader = new FileReader(); reader.onload = (function(file) { return function(e) { console.log(e.target.result); }; })(file); reader.readAsDataURL(file); }); The problem is that each is taking the curently existing inputs from the gallery unless you are looping everytime you are appending new items but then you will bind the handler alot of times on the same element.
has comment: http://stackoverflow.com/comment/41188738
type: Answer
has comment: http://stackoverflow.com/comment/41188823
answers question: http://stackoverflow.com/q/26256282
has comment: http://stackoverflow.com/comment/41188620
has comment: http://stackoverflow.com/comment/41188481
score: 0
has comment: http://stackoverflow.com/comment/41188399

http://stackoverflow.com/a/26240848
score: 1
has comment: http://stackoverflow.com/comment/41162260
has comment: http://stackoverflow.com/comment/41162200
downvote count: 0
type: Answer
has body: You have to change some things. Try this way: http://jsfiddle.net/csdtesting/jww96u92/ var k = { "current": "2014-10-07T17:53:03+02:00", "T1": { "0": [null], "1": [null], "2": [null], "3": [null], "4": [null], "5": [null], "6": [{ "name": "ABC", "value": 63 }] }, "T2": { "0": [null], "1": [null], "2": [null], "3": [null], "4": [null], "5": [null] }, "T3": { "0": [null], "1": [null], "2": [null], "3": [null], "4": [null], "5": [null] }, "T4": { "0": [null], "1": [null], "2": [null], "3": [null], "4": [null], "5": [null] }, "T5": { "0": [null], "1": [null], "2": [null], "3": [null], "4": [null], "5": [null] } }; var t1 = []; console.log(k); if (k.T1 != undefined) { $.each(k.T1, function(i, item) { if (item[0] == null) { t1.push(NaN) } else { alert("I just put " + item[0]["value"] + "in t1 array!Thanks!"); t1.push(item[0]["value"]) } console.log(item); }); console.log(t1); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
upvote count: 1
answers question: http://stackoverflow.com/q/26240448
has comment: http://stackoverflow.com/comment/41162079

http://stackoverflow.com/q/26194988
tagged with: angularjs
has answer: http://stackoverflow.com/a/26195147
tagged with: ng-show
has answer: http://stackoverflow.com/a/26195089
possible better answer: http://stackoverflow.com/a/26195147
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26195450
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26195450
score: 0
answer count: 3
has title: angular ng-show doesnt show data
has body: I would like to filter dates. Current dates should be displayed and future dates hidden. But whenever I use ng-show everything gets shut down. See for yourself - here is fiddle http://jsfiddle.net/adeling/Tb9j5/22/ I would be thankful for any advice.

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

http://stackoverflow.com/a/26344502
type: Answer
has comment: http://stackoverflow.com/comment/41352673
has comment: http://stackoverflow.com/comment/41351006
has body: And one more version. Note: I didn't remove elements but hid them. It allows to show relevant results even after typing in other word in . Fiddle. HTML: first second third four five six CSS: .matched { background-color: #ff6d6d } JS: $(document).ready(function() { $('#userinput').change(function() { var userinput = this.value.toLowerCase(); var allElements = $('#overzicht_list h3'); if (!userinput.replace(/\s+/g, '')) { alert("You haven't entered any search words."); allElements.removeClass("matched").show(); return; } allElements.removeClass("matched").hide(); allElements.filter(function() { var text = this.textContent.toLowerCase(); return (text.indexOf(userinput) > -1); }).addClass("matched").show(); }); }); Update. Updated fiddle for hiding all children (not only ) and showing and , in which are wrapped.
score: 1
answers question: http://stackoverflow.com/q/26344155
accepted answer of: http://stackoverflow.com/q/26344155
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41351255
has comment: http://stackoverflow.com/comment/41351517
has comment: http://stackoverflow.com/comment/41352790

http://stackoverflow.com/q/26200424
has comment: http://stackoverflow.com/comment/41086064
tagged with: konacha
has comment: http://stackoverflow.com/comment/41086122
has answer: http://stackoverflow.com/a/26200456
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26200994
has title: Stub .prop() with sinon
score: 0
has body: Using Konacha and Sinon.js. I have the following Javascript in Coffee Script (simplified for clarity): if $('#payment_cc').prop('checked') console.log 'checked' else console.log 'not checked' I have been trying to stub $('#payment_cc').prop('checked') in the test spec, but still couldn't get it done. I used spy, stub methods in sinon, or $('#payment_cc').click(), but couldn't simulate the DOM. Been cracking my head for hours. Please advise.
tagged with: sinon
type: UnansweredQuestion

http://stackoverflow.com/q/26291389
has comment: http://stackoverflow.com/comment/41253337
upvote count: 1
accepted answer: http://stackoverflow.com/a/26291493
has comment: http://stackoverflow.com/comment/41253378
has body: Tough to come up with the title for this question. More for proof of concept, I'm wondering why this doesn't work. What I'm attempting to do is use a jquery event to change the ID attribute, then use another jquery event bound to this newly changed ID. For example: <?php echo <<<END Test TEST TEXT END; ?> On hover over my test text, the color changes from maroon to blue, as expected. It is my understanding that the text would now have an ID of "after" and the click event handler function would apply when clicked. However that is not the case the quick event handler and its associated alert does not appear to trigger. I am new to jquery is there perhaps an update handlers function I'm overlooking?
possible better answer: http://stackoverflow.com/a/26291569
favorite count: 0
has answer: http://stackoverflow.com/a/26291569
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/26291493
has comment: http://stackoverflow.com/comment/41253465
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41253366
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Changed ID not being found by jQuery

http://stackoverflow.com/a/26259675
has comment: http://stackoverflow.com/comment/41195181
type: Answer
has comment: http://stackoverflow.com/comment/41204596
answers question: http://stackoverflow.com/q/26259424
has body: Yes there is a simpler way than using 2 different menu tags. You will have 1 menu tag (with some test for the menu) and put your menu items inside your menu tag (but don't display them - display:none). When user clicks on the menu, change the display of your items to block (display:block) and make sure your menu will show the items outside it's original size.
score: 0

http://stackoverflow.com/comment/41355135
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26345770
type: Comment
has text: Well in that case you can't perform requests. You'll have to proxy through PHP.

http://stackoverflow.com/a/74635018
has body: In your script you need a function to create the form for dropzone, and then execute the function Dropzone.discover() function add_dropzone() { const drop_zone = document.createElement("form"); drop_zone.setAttribute("class","dropzone"); drop_zone.setAttribute("action","url_to_upload_files/"); drop_zone.setAttribute("id","my_dropzone"); //find a div where you want to add your dropzone document.getElementById("div_for_dropzone").appendChild(drop_zone); // this function will find the class="dropzone" tag and load it. Dropzone.discover(); } then in your html you just need to add a div with the id="div_for_dropzone"
answers question: http://stackoverflow.com/q/26323417
score: 0
type: Answer

http://stackoverflow.com/comment/41256353
score: 0
has text: @torazaburo nice information, really helpful, Thank you very much
type: Comment
comment on: http://stackoverflow.com/a/26293126
type: AnswerComment

http://stackoverflow.com/q/26346246
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41354012
has comment: http://stackoverflow.com/comment/41353956
has comment: http://stackoverflow.com/comment/41353854
has answer: http://stackoverflow.com/a/26346391
score: 0
has answer: http://stackoverflow.com/a/26346551
answer count: 2
linked to: http://stackoverflow.com/q/750486
has title: How can I assign JQuery click handlers via iteration?
has comment: http://stackoverflow.com/comment/41353944
has comment: http://stackoverflow.com/comment/41353907
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has body: I have this code which can be seen Here. The idea would be that I could have a list of items, which I could then assign a handler to run whatever repetitive code I would need to run (for example, a function which modifies a series of classes). The idea is that I could iterate through a list of ids and assign a handler, however due to my limited knowledge of Javascript, it doesn't' appear to be working. Would anyone be able to help? The Code of Interest: HTML: First Second Third Forth Javascript: //Choose which ids I want to iterate ids = ['#first', '#second', '#third', 'forth'] //For all the ids there are for ( i=0; i<ids.length; i++ ) { //Select an item item = ids[i] //Add a click handler to that item $( item ).click(function() { //Run a function that involves knowing the item I have iterated... alert( "Handler for "+ item + " called." ); }); } Thanks, Aj.
has comment: http://stackoverflow.com/comment/41353805

http://stackoverflow.com/a/26257070
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41189643
type: Answer
score: 11
downvote count: 0
has body: You can set the CSS property pointer-events: none on the obstructing object... but be aware that pointer events are all or nothing; mouseovers and hovers will pass right through, but so will clicks. Here is a description of the value, from the Mozilla Developer's Network: none: The element is never the target of mouse events; however, mouse events may target its descendant elements if those descendants have pointer-events set to some other value. In these circumstances, mouse events will trigger event listeners on this parent element as appropriate on their way to/from the descendant during the event capture/bubble phases. I've put together a little example. In this example, I'm using onmouseover and onmouseout, since that's what you use on your website, but you could just as easily use the CSS :hover pseudo-selector. Here's a jsfiddle version of the example, and the stack snippet is below. .hoverable { width: 100px; height: 100px; background-color: blue; } .obscuring { /* this first line is the important part */ pointer-events: none; position: absolute; top: 50px; left: 50px; width: 100px; height: 100px; background-color: red; opacity: 0.5; } &lt;div class="hoverable" onmouseover="this.style.backgroundColor = 'green'" onmouseout="this.style.backgroundColor = 'blue'"&gt; &lt;/div&gt; &lt;div class="obscuring"&gt; &lt;/div&gt;
upvote count: 11
accepted answer of: http://stackoverflow.com/q/26257024
answers question: http://stackoverflow.com/q/26257024

http://stackoverflow.com/comment/41307807
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26318519
has text: For simple debugging purposes, calling `persist()` on the event before logging it may be a fine workaround.
score: 9

http://stackoverflow.com/q/26320388
has title: Is there a JavaScript equivalent to css/sass
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/44766050
type: Question
has comment: http://stackoverflow.com/comment/41306048
has body: I have recently begun using SASS. It is amazing with partials, including them into the file then outputting all of your css to a single minified sheet. Is there anything similar to this that can replicate these features for JavaScript files?
score: 1
has comment: http://stackoverflow.com/comment/41305961
has comment: http://stackoverflow.com/comment/41305974
upvote count: 2
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/41321039
type: Comment
comment on: http://stackoverflow.com/a/26328492
score: 0
type: AnswerComment
has text: Still getting undefined.

http://stackoverflow.com/comment/41150759
type: QuestionComment
has text: I do. I have also made a file to input data to my db, which works fine.
score: 0
comment on: http://stackoverflow.com/q/26235715
type: Comment

http://stackoverflow.com/q/26331191
has body: I am having trouble with having the first user of the room I am trying to communicate to always leaving but this only happens when I check for its id. socket.on('player moved', function(msg) { var curr_room = msg.room_number; var room_data = io.sockets.adapter.rooms[curr_room]; var temp_room = []; console.log(room_data); for (var id in room_data) { temp_room.push(io.sockets.adapter.nsp.connected[id]); } var player1_id = temp_room[0].id; var player2_id = temp_room[1].id; console.log(player1_id); console.log(player2_id); console.log(msg.player_id); if (player1_id &amp;&amp; player2_id) { if (player1_id === msg.player_id) { temp_room[1].emit('update coords', "dude"); } else if ("ffff" === msg.player_id) { console.log('tessting to see wheter i can be in') temp_room[0].emit('update coords', "sweet"); } } So this works without any errors and when I console.log room data I see two sockets which is what I want, however if I change "ffff" to player2_id I get this weird error where for the first iteration of this function I get the two sockets but after that the first player disconnects and I'm left with var player1_id = temp_room[0].id; ^ TypeError: Cannot read property 'id' of undefined I have absolutely no idea why having this check would make the user disconnect and furthermore I have no idea why the user is disconnecting if the page remains open. Anybody have any insights, it would be greatly appreciated! Thanks!!
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41357095
score: 0
has title: Socket.IO disconnecting first user in room
type: UnansweredQuestion
tagged with: sockets
has comment: http://stackoverflow.com/comment/41331430
tagged with: socket.io-1.0
tagged with: node.js
answer count: 0
tagged with: socket.io

http://stackoverflow.com/comment/41166805
score: 1
type: AnswerComment
type: Comment
has text: I was about to. First thing I noticed was the invalid JSON -- for future use: http://jsonlint.com/
comment on: http://stackoverflow.com/a/26244010

http://stackoverflow.com/q/26329761
has body: I am trying to make jsfiddle , my onclick is not working in jsfiddle. what is wrong in my code &lt;input value="press" type="button" onclick="myclick()"&gt; function myclick(){ alert("myclick") } http://jsfiddle.net/hiteshbhilai2010/gs6rehnx/11/ EDIT I tried No wrap - In head and tried again with document.ready it is not working in jsfiddle again ERROR - Uncaught ReferenceError: myclick is not defined http://jsfiddle.net/hiteshbhilai2010/33wLs160/6/ I have checked with already existing question here but my problem is happening when I am trying it in jsfiddle Can some one please help me ....thanks
linked to: http://stackoverflow.com/q/5468350
answer count: 5
type: UnansweredQuestion
has title: javascript onclick not working in jsfiddle
has comment: http://stackoverflow.com/comment/41323558
linked to: http://stackoverflow.com/q/5453937
has answer: http://stackoverflow.com/a/26329983
tagged with: onclick
downvote count: 2
upvote count: 17
type: Question
has answer: http://stackoverflow.com/a/59376188
tagged with: jsfiddle
has answer: http://stackoverflow.com/a/26329820
has comment: http://stackoverflow.com/comment/41324000
tagged with: javascript
has comment: http://stackoverflow.com/comment/41323640
score: 15
has comment: http://stackoverflow.com/comment/41333237
has comment: http://stackoverflow.com/comment/41329981
has comment: http://stackoverflow.com/comment/41323453
has answer: http://stackoverflow.com/a/42082978
has comment: http://stackoverflow.com/comment/41323621
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26330245
favorite count: 0

http://stackoverflow.com/comment/41349604
type: QuestionComment
has text: Oh ok So i should hang everything off of iniAll and make that the overall JS function for what i want to do? Kicking myself for not thinking JS was the same as CSS and HTML where the last overwrites the first.
comment on: http://stackoverflow.com/q/26343083
score: 0
type: Comment

http://stackoverflow.com/a/26273681
has body: Use filter and some. data.filter( // Filter the data array by function(product) { // looking at each product in it return Object.keys(product) // and for that product's keys .some( // see if any of the function(key) { // keys return product[key] === true; // have a value of true } ) ; } )
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26273551
answers question: http://stackoverflow.com/q/26273551
has comment: http://stackoverflow.com/comment/41221466

http://stackoverflow.com/comment/41302951
type: Comment
type: QuestionComment
score: 1
has text: Can you be more specific? What part are you having trouble with? Taking an action when a button is clicked? Making content hidden? Making hidden content visible?
comment on: http://stackoverflow.com/q/26318752

http://stackoverflow.com/a/26316313
has comment: http://stackoverflow.com/comment/41298531
answers question: http://stackoverflow.com/q/26316201
upvote count: 3
has comment: http://stackoverflow.com/comment/41298538
has comment: http://stackoverflow.com/comment/41298896
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41299470
has comment: http://stackoverflow.com/comment/41299298
has body: fiddle: http://jsfiddle.net/dxgL6rdo/ $(document).ready(function() { $(document.body).keyup(function(event) { if (event.which === 37) { $('#previous-item').click(); } else if (event.which === 39) { $('#next-item').click(); } }); });

http://stackoverflow.com/q/26246761
type: Question
has comment: http://stackoverflow.com/comment/41171926
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41198369
has comment: http://stackoverflow.com/comment/41171993
has title: This jquery lookup is not working for some reason
favorite count: 0
has comment: http://stackoverflow.com/comment/41173853
has comment: http://stackoverflow.com/comment/41174509
has comment: http://stackoverflow.com/comment/41171841
answer count: 0
has comment: http://stackoverflow.com/comment/41173035
has comment: http://stackoverflow.com/comment/41172015
type: UnansweredQuestion
upvote count: 1
has body: $(".pagination.postpagination a").click(function(event) { // Populate the hidden page_number field and submit the search form. event.preventDefault(); var page = $(this).attr('data-page-number'); $("#id_page_number").val(page); $("#customer-search-form").submit(); }); For some reason the customer search from does not fire unless there is a 'console.log()' before or after that line for customer search. Any ideas? I am not a JS programmer but am helping someone on our team. The lookup is failing for some reason I think. Thanks!
has comment: http://stackoverflow.com/comment/41201954
score: 1
has comment: http://stackoverflow.com/comment/41174653

http://stackoverflow.com/q/26307951
has comment: http://stackoverflow.com/comment/41283709
score: 0
has comment: http://stackoverflow.com/comment/41284071
has comment: http://stackoverflow.com/comment/41284163
upvote count: 1
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has title: Non-modal or popup like window
has comment: http://stackoverflow.com/comment/41284105
type: AnsweredQuestion
has body: Is it possible to create a non-modal or pop-up window using jquery in JSP. I want to show user some detail information on separate window but without blocking main window. I don't wan to use new tab or browser window so basically like modal box but with ability to access main page too.
type: Question
has answer: http://stackoverflow.com/a/26308443
accepted answer: http://stackoverflow.com/a/26308443
tagged with: javascript

http://stackoverflow.com/q/26296342
upvote count: 2
answer count: 1
tagged with: jquery
has title: Image does not render with KineticJS
favorite count: 0
tagged with: kineticjs
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26315514
type: Question
has body: I am simply trying to render an image with Kinetic, but nothing appears, nor do i get an error. The fiddle can be found here. Source code: $( function() { var stage = new Kinetic.Stage({ container: 'container', width: 400, height: 800 }); var layer = new Kinetic.Layer(); var yoda = new Kinetic.Image({ x: 0, y: 0, width: 200, height: 400 }); var imageObj = new Image(); imageObj.src = 'http://farm6.staticflickr.com/5448/9408019718_88934b087e_b.jpg'; imageObj.onload = function() { yoda.setImage(imageObj); layer.draw(); }; layer.add(yoda); stage.add(layer); });
tagged with: javascript
has answer: http://stackoverflow.com/a/26315514

http://stackoverflow.com/comment/41143485
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26231670
has text: @vks: best use `\\[` and `\\]`: OP is passing string to the `RegExp` constructor, the backslash needs escaping, too

http://stackoverflow.com/a/26248528
has body: The http.get's callback get only one argument, it's the response : http.get("http://www.google.com/index.html", function(res) { console.log("Got response: " + res.statusCode); }).on('error', function(e) { console.log("Got error: " + e.message); }); Doc.
answers question: http://stackoverflow.com/q/26248474
type: Answer
has comment: http://stackoverflow.com/comment/41175037
has comment: http://stackoverflow.com/comment/41175024
score: 0
has comment: http://stackoverflow.com/comment/41175086
has comment: http://stackoverflow.com/comment/41175059
has comment: http://stackoverflow.com/comment/41175122
has comment: http://stackoverflow.com/comment/41175135

promise
tags question: http://stackoverflow.com/q/26320058
tags question: http://stackoverflow.com/q/26287859
tags question: http://stackoverflow.com/q/26268651
tags question: http://stackoverflow.com/q/26329229
tags question: http://stackoverflow.com/q/26227251
tags question: http://stackoverflow.com/q/26261612
tags question: http://stackoverflow.com/q/26271179
tags question: http://stackoverflow.com/q/26305267
tags question: http://stackoverflow.com/q/26295514
tag name: promise
tags question: http://stackoverflow.com/q/26273938
type: Tag
tags question: http://stackoverflow.com/q/26288617
tags question: http://stackoverflow.com/q/26218228
tags question: http://stackoverflow.com/q/26240813
tags question: http://stackoverflow.com/q/26217478
tags question: http://stackoverflow.com/q/26347305
tags question: http://stackoverflow.com/q/26216636
tags question: http://stackoverflow.com/q/26242143
tags question: http://stackoverflow.com/q/26320342
tags question: http://stackoverflow.com/q/26319873
tags question: http://stackoverflow.com/q/26250626
tags question: http://stackoverflow.com/q/26316291
tags question: http://stackoverflow.com/q/26253682
tags question: http://stackoverflow.com/q/26204865
tags question: http://stackoverflow.com/q/26252620
tags question: http://stackoverflow.com/q/26349750
tags question: http://stackoverflow.com/q/26283911
tags question: http://stackoverflow.com/q/26254104
tags question: http://stackoverflow.com/q/26221616

http://stackoverflow.com/comment/41310191
score: 0
type: AnswerComment
type: Comment
has text: Thank you for the help. It doesn't function as intended though. What should happen is the first element remains with all information, and if a second is added and elements are changed it doesn't effect the first. Trying to find a better way to illustrate this, as I realize my original post is lacking in clarity.
comment on: http://stackoverflow.com/a/26322643

http://stackoverflow.com/q/26348813
tagged with: mysql
upvote count: 1
has answer: http://stackoverflow.com/a/26349012
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41358601
has body: Here is my Code I want to move my Variable of "Hellow" from JavaScript to PHP Query at: document.write("&lt;?php $result = mysql_query("SELECT Urdu FROM translate where English= 'Variable'"); ?&gt;");. Kindly any help? &lt;script type='text/javascript'&gt; var Variable = "Hellow"; document.write("&lt;?php $db = mysql_connect("localhost","root",""); mysql_select_db("Dictionary",$db); ?&gt;"); document.write("&lt;?php $result = mysql_query("SELECT Urdu FROM translate where English= 'Variable'"); ?&gt;"); document.write("&lt;?php while($row = mysql_fetch_array($result)) { echo $row['Urdu'] ; } mysql_close($db); ?&gt;"); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41358625
answer count: 2
has comment: http://stackoverflow.com/comment/41358823
has title: How I Can move variable from JavaScript into a php Query?
accepted answer: http://stackoverflow.com/a/26349012
favorite count: 0
linked to: http://stackoverflow.com/q/2379224
has comment: http://stackoverflow.com/comment/41358646
has comment: http://stackoverflow.com/comment/41358654
tagged with: php
possible better answer: http://stackoverflow.com/a/26349369
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26349369
downvote count: 2

http://stackoverflow.com/q/26209698
tagged with: css
type: AnsweredQuestion
has title: Issue with jQuery when using animate while adding new content
has body: The problem occurs when I try to hit the right "next" button. My div's start to slide but when I've hit the butten a couple of times I start to see these blank White spaces between my div's. Thats not suppose to happen. How could this be solved. I've provided a link to jsfiddle. var x = ["blue", "red", "black", "green", "orange"]; var i = 0; $(document).ready(function(){ $("#right").click(function(){ if (i === x.length) { i = 0; } $(".slide2:last-child").after("&lt;div class='slide2' style='background-color:" + x[i] + ";'&gt;&lt;/div&gt;"); $(".slide2").animate({right:'+=100%'}, 1000); //$(".slide2:last").remove(); i++; }); });
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26209785
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26209785
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26303393
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/16078544
tagged with: http://stackoverflow.com/tag/html
has body: running simple export javscript function for this stackoverflow - Export to CSV using jQuery and html example here: http://jsfiddle.net/terryyounghk/KPEGU/ however I want to change it up so it only gets rows that have a certain class, this is what i've tried so far. original var $rows = $table.find('tr:has(td)'), mine var $rows = $table.find('tr.hasClass('show'):has(td)'), I know nothing about JS, apparently, so help is much appreciated.
has answer: http://stackoverflow.com/a/26303407
type: AnsweredQuestion
has title: javascript find html with class and with nested
type: Question
accepted answer: http://stackoverflow.com/a/26303407

http://stackoverflow.com/q/26328274
score: 1
has body: I am currently stubbing my $http.get() calls with json files. I am wanting to return a subset of the json file to angular controller. I have looked at other post and they suggested setting a params property in the Get call but it is not working for me. Here is my controller: angular.module('agileApp') .controller('projectController', ['$scope', '$filter', '$http','$routeParams', function($scope, $filter, $http, $routeParams){ $http.get('json/testData.json').success(function(data){ //console.log(data); $scope.projectData = $filter('filter')(data.projectDetail, {Id:1})[0]; console.log($scope.projectData); }); }]); Here is my json file: { 'projectDetail': [{ 'Id': 1, 'projectName': 'Project1', 'projectStatus': 'In Progress', 'teamMembers': ['User1,'User2', 'User3'], 'userStories': [ {'userStoryId': 0, 'Description': 'As a user blah blah blah 1', 'storyPoints': 10 }, {'userStoryId': 1, 'Description': 'As a user blah blah blah 2', 'storyPoints': 10 }, {'userStoryId': 2, 'Description': 'As a user blah blah blah 3', 'storyPoints': 10 }, {'userStoryId': 3, 'Description': 'As a user blah blah blah 4', 'storyPoints': 10 }, {'userStoryId': 4, 'Description': 'As a user blah blah blah 5', 'storyPoints': 10 }, {'userStoryId': 5, 'Description': 'As a user blah blah blah 6', 'storyPoints': 10 }, ] }, There are other objects in the project detail array, but I just want to pull back the one where Id = routeID which is passed into the controller as a parameter. Any help would be greatly appreciated. Thanks!
upvote count: 1
tagged with: http
type: Question
has answer: http://stackoverflow.com/a/26328444
accepted answer: http://stackoverflow.com/a/26328444
tagged with: javascript
has comment: http://stackoverflow.com/comment/41320675
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: AngularJS passing a parameter in an $http.get() to get a subset of a json file
type: AnsweredQuestion

http://stackoverflow.com/comment/41139516
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26229145
has text: these days, it CAN be useful to use them around blocks, since block-level scoping for functions is becoming the default in most browsers. ex: (function(){ 'use strict';{ function f3(){} } alert(typeof f3 === "undefined");}());
score: 0

minify
tags question: http://stackoverflow.com/q/26338811
tags question: http://stackoverflow.com/q/26314585
tags question: http://stackoverflow.com/q/26259910
tag name: minify
type: Tag

http://stackoverflow.com/q/26346314
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26346452
type: Question
downvote count: 0
has body: I'm creating a web app with jquery mobile, and i'm trying to change the color of the background pages, but somethings is wrong. It's creating this strange effect: I'm changing the color to white, because i'm using a background-color.. if i dont make changes, the words will appears like this: Anyone knows what is going on?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26346452
tagged with: jquery
tagged with: colors
has title: Change font color using the jquery mobile?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
score: 1
tagged with: css

http://stackoverflow.com/comment/41187326
comment on: http://stackoverflow.com/q/26255758
score: 0
type: Comment
type: QuestionComment
has text: Look at http://stackoverflow.com/questions/8373735/jquery-hide-option-doesnt-work-in-ie-and-safari

http://stackoverflow.com/comment/41155874
type: Comment
type: QuestionComment
score: 2
has text: Just so it's said, i'm enjoying the irony of spending other people's CPU cycles (=> electricity => carbon footprint) to basically brag about carbon savings.
comment on: http://stackoverflow.com/q/26238348

http://stackoverflow.com/q/26342948
tagged with: javascript
tagged with: jquery
tagged with: datepicker
has title: Identify date format in jquery and set it as default in a jquery datepicker
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26343044
accepted answer: http://stackoverflow.com/a/26343044
type: Question
has body: // I have installmentDate which is an object object var installmentDate = installment.installmentDate; alert(JSON.stringify(installmentDate)); Using JSON.stringify(installmentDate) it shows {"date":3, "day":5, "hours":0, "minutes":0, "month":9, "nanos":0, "seconds":0, "time":1412274600000, "timezoneoffset":-330, "year":114} Please identify in which format this is in. And I am trying to set this date as default to a jquery datepicker These are the following ways I tried and nothing works $('#dueDate').datepicker('setDate', installmentDate); $('#dueDate').datepicker('setDate', new Date((installment.installmentDate)); $('#dueDate').val(installmentDate);
score: 0
answer count: 1

http://stackoverflow.com/q/26310405
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41288950
has comment: http://stackoverflow.com/comment/41308273
type: Question
has answer: http://stackoverflow.com/a/26747181
tagged with: javascript
has body: In my custom web-based application, the user has the ability to set his/her own timezone, locale, currency and language (independent of the computer they are using). Is there a way to set these parameters for Angular at the App level, so that I don't have to set it for each and every currency or datetime value within the page? The objective is to keep the code the natural way developers write AngularJS, however be able to globally set currency symbol, locale and timezone of the user who is browsing the app.
score: 0
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41288971
has title: Angular JS, Timezone, Currency and Locale

http://stackoverflow.com/comment/41187213
comment on: http://stackoverflow.com/q/26254910
score: 0
type: Comment
type: QuestionComment
has text: @ Vivek Pradhan yes i wish to delete a specific row by clicking on delete (i didn't used a button i made a link) but before that a confirmation box should get displayed

http://stackoverflow.com/comment/41173328
comment on: http://stackoverflow.com/a/26224313
type: Comment
has text: hey brother, I adapted the code and it worked correctly, added the points, clusters and infowindow, however, the setContent is repeating in all infowindow all lie with the latest information received .. Can you check for me? [this new code](https://gist.github.com/anonymous/39d083883552c759d528)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41325199
type: Comment
has text: Thanks very much I missed that!
comment on: http://stackoverflow.com/a/26330623
type: AnswerComment
score: 0

http://stackoverflow.com/a/26302187
has body: By default, elements that come further down the page in your code will overlap elements further up the page. To change this, you must provide a CSS position attribute on a container and use z-index on the child elements to determine a stacking order. For example: .container { position:relative; } .logo { z-index: 10; } #slides { z-index: 1; } That should be enough to at least start with the right overlapping order.
type: Answer
answers question: http://stackoverflow.com/q/26301977
score: 0

gruntjs
tags question: http://stackoverflow.com/q/26236650
tags question: http://stackoverflow.com/q/26314585
tags question: http://stackoverflow.com/q/26236484
tags question: http://stackoverflow.com/q/26279789
tags question: http://stackoverflow.com/q/26347915
tags question: http://stackoverflow.com/q/26291058
tags question: http://stackoverflow.com/q/26206069
tags question: http://stackoverflow.com/q/26283267
tags question: http://stackoverflow.com/q/26218322
tags question: http://stackoverflow.com/q/26331097
tags question: http://stackoverflow.com/q/26350131
type: Tag
tags question: http://stackoverflow.com/q/26201865
tags question: http://stackoverflow.com/q/26323210
tags question: http://stackoverflow.com/q/26315486
tags question: http://stackoverflow.com/q/26278869
tags question: http://stackoverflow.com/q/26233743
tag name: gruntjs
tags question: http://stackoverflow.com/q/26353372

http://stackoverflow.com/a/26236044
answers question: http://stackoverflow.com/q/26235906
has comment: http://stackoverflow.com/comment/41152978
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41152468
has comment: http://stackoverflow.com/comment/41151248
has comment: http://stackoverflow.com/comment/41151178
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/41152939
has body: The fun with look aheads. "12.34.56.78".replace(/\.(?=[^.]*\.)/g,"_")
accepted answer of: http://stackoverflow.com/q/26235906
has comment: http://stackoverflow.com/comment/41151453
downvote count: 0
has comment: http://stackoverflow.com/comment/41151992

http://stackoverflow.com/comment/41236943
type: Comment
comment on: http://stackoverflow.com/a/26282165
type: AnswerComment
has text: Thanks Dave - sorry - it does not make sense to me.
score: 0

http://stackoverflow.com/comment/41136437
has text: userinfogrid shows [object object] in the firebug. I checked the ID it is returning the grid id.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26227428
score: 0

http://stackoverflow.com/q/26211737
accepted answer: http://stackoverflow.com/a/26217526
answer count: 1
has title: Format textbox inside a gridview with javascript
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41106226
has body: How do you format a textbox inside a gridview using javascript. Here's what my gridview columns looks like: &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;ItemTemplate&gt;&lt;asp:ImageButton runat="server" id="imgbtnEnterAmt" ImageUrl="~/Images/bullet_list.png" Width="12px" Height="12px" OnClick="imgbtnEnterAmt_Click" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField DataField="particulars" HeaderText="HOSPITAL CHARGES/ PARTICULARS" /&gt; &lt;asp:TemplateField HeaderText="ACTUAL"&gt; &lt;%--&lt;ItemTemplate&gt;&lt;asp:TextBox runat="server" ID="txt_ipamt" OnTextChanged="txt_ipamt_TextChanged" AutoPostBack="true"&gt;&lt;/asp:TextBox&gt; &lt;/ItemTemplate&gt; --%&gt; &lt;ItemTemplate&gt;&lt;input type="text" id="txth_ipamt" onblur="format_amt()" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField DataField="deductions" HeaderText="DEDUCTION/ PHILHEALTH" /&gt; &lt;/Columns&gt; And my javascript on formatting the textbox: function format_amt() { var str_amt = document.getElementById('txth_ipamt').value; var n = parseFloat(str_amt).toFixed(2); document.getElementById('txth_ipamt').value = n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } The problem is, when I tend to add more rows, only the first textbox is formatted upon onblur and when the onblur event is triggered again the textbox gets formatted again resulting in a wrong output.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26217526
score: 0
type: Question
tagged with: c#
tagged with: javascript

http://stackoverflow.com/comment/41128723
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26223361
has text: what is actual error message?
score: 0

http://stackoverflow.com/comment/41078842
has text: The HTML is generated by third party software that I have no control on it. Only the CSS file is static and does not change (I thought I could add a JavaScript to be executed from the CSS file)
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26196947
type: Comment

http://stackoverflow.com/q/26276122
has answer: http://stackoverflow.com/a/26276471
score: 0
tagged with: xmpp
answer count: 1
type: UnansweredQuestion
has body: I tried with strophe.js by using iq method, and I can able to get the number of online users, but I'm not able to get the online user list from my Openfire 3.9.3 server. XMPP request body: <command xmlns='http://jabber.org/protocol/commands' node='http://jabber.org/protocol/admin#get-online-users-list' /> XMPP response <command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#get-online-users-list"/> <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> Ref: http://xmpp.org/extensions/xep-0133.html#get-online-users-list
tagged with: http://stackoverflow.com/tag/xml
has title: XEP-0133: Admin request to get all online users list
type: Question
tagged with: openfire
tagged with: javascript

http://stackoverflow.com/comment/41320932
has text: ...or by *"extract"* do you mean you want to eliminate the wrapping `b` elements and leave the text? In that case `$("b").unwrap()`. You really need to put more effort into describing your issue.
score: 0
comment on: http://stackoverflow.com/q/26328399
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26219425
accepted answer of: http://stackoverflow.com/q/26219359
answers question: http://stackoverflow.com/q/26219359
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/41120903
has body: It's hard to see exactly what you want from the question, but assuming this is javascript because of the tag, give the textarea an id and do document.getElementById("myId").innerText=sometext or document.getElementsByName("texte") and find the textarea
has comment: http://stackoverflow.com/comment/41120917
upvote count: 1
has comment: http://stackoverflow.com/comment/41120809
has comment: http://stackoverflow.com/comment/41121014

http://stackoverflow.com/comment/41110855
score: 0
has text: Even if I'll use different id for different svg, once I'll call d3.select("svg").remove() for some chart inside some id-based condition, it'll remove all the svgs
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26214276

http://stackoverflow.com/q/26227797
type: Question
has body: I am hoping an Angular guru can point me in the right direction. When using a factory in the format below, how do I modify the header for POST so that: 'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'? The code: var tableModule = angular.module('theApp', ['ui-rangeSlider','ngScrollbar']); tableModule.factory('Services', ['$http', function($http) { return { get : function($path, callback) { return $http.get($path).success(callback); }, post : function($path, $data, callback) { return $http.post($path, $data).success(callback); } }; }]);
tagged with: javascript
has answer: http://stackoverflow.com/a/26227826
accepted answer: http://stackoverflow.com/a/26227856
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/26227826
favorite count: 0
has title: AngularJS, How to correctly modify http headers in a factory
tagged with: angularjs
upvote count: 2
tagged with: factory
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26227856

http://stackoverflow.com/comment/41156498
type: QuestionComment
comment on: http://stackoverflow.com/q/26237922
score: 0
type: Comment
has text: The * has worked as is - so I assume it probably doesn't. I am not a regex expert however.

http://stackoverflow.com/comment/41091244
has text: also all your columns start with lower case except 'User_type' fix it if this is a typo
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26203969
score: 0

http://stackoverflow.com/q/26320238
tagged with: microformats
answer count: 1
has comment: http://stackoverflow.com/comment/41305792
has comment: http://stackoverflow.com/comment/41305919
has title: Microformat oomph.js breaks rest of my JS
has comment: http://stackoverflow.com/comment/41305689
type: AnsweredQuestion
has body: I'm writing a little webpage that displays some Flickr photos and also includes microformats using oomph.js. I have bit of JS and when I run the code without the code runs fine (all my photos are loaded. However, when I add in the above script tag, my photos don't load. Here is my broke JS (doesn't show photos): and here is the code that works (shows photos): I've browsed the internet and have yet to find a solution. If anyone could shed some light on this issue I would greatly appreciate it :-).
has comment: http://stackoverflow.com/comment/41305816
has comment: http://stackoverflow.com/comment/41305744
type: Question
has comment: http://stackoverflow.com/comment/41305832
tagged with: javascript
has comment: http://stackoverflow.com/comment/41305645
has comment: http://stackoverflow.com/comment/41305774
score: 0
has answer: http://stackoverflow.com/a/26320377
accepted answer: http://stackoverflow.com/a/26320377

http://stackoverflow.com/q/26282239
has answer: http://stackoverflow.com/a/26282489
score: 0
has answer: http://stackoverflow.com/a/26282653
has comment: http://stackoverflow.com/comment/41236179
favorite count: 0
has comment: http://stackoverflow.com/comment/41236442
has comment: http://stackoverflow.com/comment/41236212
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/10213703
upvote count: 1
downvote count: 1
has body: I'm trying to capture all DOM events on a page. This is the source code I've come up with to do so. It requires jQuery. Is there a better implementation out there? See any problems with my implementation? // required jQuery $('*').each(function () { var ignore = [ 'mousemove', 'mouseover', 'mouseout', 'mouseenter', 'mouseleave' ]; for (var key in this) { if (key.substring(0, 2) === 'on') { $(this).on(key.substr(2), function (event) { var eventName = event.type, tag = this.tagName.toLowerCase(), id = this.id ? ('#' + this.id) : ''; if (ignore.indexOf(eventName) === -1) { console.log(tag + id + ' ' + eventName); } }); } } });
has title: Capturing all DOM events
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41236345
tagged with: javascript
tagged with: jquery
tagged with: dom-events

http://stackoverflow.com/comment/56071299
comment on: http://stackoverflow.com/a/26248569
type: AnswerComment
has text: Wondering why you posted multiple answers.. farming rep asking to upvote each of them..?!
type: Comment
score: 0

http://stackoverflow.com/comment/41239022
type: Comment
comment on: http://stackoverflow.com/a/26283593
type: AnswerComment
has text: I havent tried anything since i dont know what to add exactly
score: 0

http://stackoverflow.com/comment/41225045
score: 0
has text: @EikePierstorff - are you able to give me an example, please? Do you mean within that method, after the iCat? or a seperate method in the iCatGaFunction, like this... _gaq.push(['_trackEvent', 'BannersTracking', // category of activity 'iCatBanner', // Action ]);
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26275902

http://stackoverflow.com/q/26228738
has comment: http://stackoverflow.com/comment/41138584
type: Question
has body: I would like implement the javascript background image changer on page load on Impresspages 4.2.3 as described on http://www.9lessons.info/2011/03/background-image-change-on-refresh-with.html. It works on my localhost but not working when moved to my hosting server. I put this code below on "_header.php" between the tag: &lt;script type="text/javascript"&gt; var totalCount = 4; function ChangeIt() { var num = Math.ceil( Math.random() * totalCount ); document.body.background = 'http://localhost/halmaheradivecruise.com/theme/air/assets/img/'+num+'.jpg'; document.body.style.backgroundRepeat = "repeat";// Background repeat } &lt;/script&gt; and this code below in tag: &lt;script type="text/javascript"&gt; ChangeIt(); &lt;/script&gt;
tagged with: impresspages
tagged with: javascript
has comment: http://stackoverflow.com/comment/41139206
score: 0
answer count: 2
has title: JavaScript Background Image Change on page load on Impresspages
has comment: http://stackoverflow.com/comment/41138669
accepted answer: http://stackoverflow.com/a/26229551
has answer: http://stackoverflow.com/a/26229551
possible better answer: http://stackoverflow.com/a/26228959
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4959975
has comment: http://stackoverflow.com/comment/41138972
has answer: http://stackoverflow.com/a/26228959

http://stackoverflow.com/q/26267156
has answer: http://stackoverflow.com/a/26267233
has comment: http://stackoverflow.com/comment/41209094
tagged with: validation
answer count: 1
tagged with: javascript
has body: I am trying to valdate a drop down by checking to see that something other than the first option ("Choose one") is skipped Logic: Is it true that the value is NOT "choose"? If so, return true (submit the form). I believe the logic requires me to test to see if the value is NOT the first option. My code seems correct, but I guess I am not doing the "!" operator correctly. I have tried these versions of "If val is NOT string; but they didn't work. if(val !== 'choose') if(val != 'choose') // Code example below Choose one... test1 test2 test3 message here: function validatedMenu() { var dd = document.getElementById("dropDown"); var val = dd.options[dd.selectedIndex].value; var txt = dd.options[dd.selectedIndex].text; if(val != 'choose') { document.getElementById("mySpan").innerHTML = "You must make a selection."; } else { document.getElementById("mySpan").innerHTML = "Success! You chose " + txt; return false; } return true; }
has title: Why is the first If 'is Not' statement not working?
type: UnansweredQuestion
tagged with: if-statement
has comment: http://stackoverflow.com/comment/41209145
type: Question
score: 0

http://stackoverflow.com/a/26289505
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26289482
type: Answer
has body: Your return is too early. You also need to handle when mycolor is past the array length. var color = function() { var list = ["red", "blue", "green"]; if (mycolor &gt;= list.length) mycolor = 0; return list[mycolor++]; }; An alternative way of writing the above would be the following: var color = function() { var list = ["red", "blue", "green"]; return list[mycolor++ % list.length]; }; function run(){ $(".demo").text(color()); }
upvote count: 1

http://stackoverflow.com/q/26281155
has body: I have an unordered list (HTML below and Javascript code is below). The first function "display_dropdown_multiple" works for me. However, I'm having issues with the second function "get_selected_owner". After making a selection from dropdown menu. I want the second function to return the 'selected value'. Any help would be appreciated. function display_dropdown_multiple(event) { $(".dropdown-menu").on('click', 'li a', function(){ $(this).parents(".btn-group").find('.btn').text($(this).text()); $(this).parents(".btn-group").find('.btn').val($(this).data('value')); }); }); function get_selected_owner() { return $('#owner').find('option:selected').val(); }); }); Owner major Owner 1 minor Owner 2 Owner 3
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap
type: UnansweredQuestion
type: Question
has title: jQuery functions, one to display dropdown on click and another to get selected item from dropdown
has answer: http://stackoverflow.com/a/26281216

http://stackoverflow.com/q/26203177
has title: CSS class is missed after jQuery replaceWith. How to fix?
tagged with: css
type: AnsweredQuestion
has body: I added this line to a master.cs page. [ - ] Hide In CSS file: .hideAndShow { position: fixed; top:120px; right:420px; color: white; background-color:green; } Then this in the same master.cs page. The expected behavior: The text [ - ] Hide should toggle between: [ + ] Show and [ - ] Hide. But what happens is that it only responds to the very first click. In that [ - ] Hide is replaced with [ + ] Show. But when clicking it again; there is no effect as expected. Where is the problem? and How to fix it?
type: Question
accepted answer: http://stackoverflow.com/a/26203200
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26203200
answer count: 1
tagged with: .net
tagged with: jquery
has comment: http://stackoverflow.com/comment/41089851

http://stackoverflow.com/a/26302612
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26302001
upvote count: 1
has body: You need to inject $document into your controllers like this: app.controller('About', ['$scope','$document', function ($scope, $document) { $document.title = 'About Us'; console.log('About controller hit.'); }]); It might be the $document that is throwing the error, as angular does not know what it is without the injection. However, the error for this issue would be an Error: Unknown provider:

http://stackoverflow.com/comment/41152198
type: AnswerComment
has text: @Daphen, I also missed you were setting the `showLastLabel` option to false. This was suppressing the `23:00` label. Taking that out: http://jsfiddle.net/e0p69ra5/2/. You should really try and whittle those options down to the ones you really need.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26223796

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/26309675
tags question: http://stackoverflow.com/q/26283275
tags question: http://stackoverflow.com/q/26316227
tags question: http://stackoverflow.com/q/26221023
tags question: http://stackoverflow.com/q/26339944
tags question: http://stackoverflow.com/q/26264169
tags question: http://stackoverflow.com/q/26324137
tags question: http://stackoverflow.com/q/26247637
tags question: http://stackoverflow.com/q/26283145
tags question: http://stackoverflow.com/q/26234252
tags question: http://stackoverflow.com/q/26222926
tag name: svg
tags question: http://stackoverflow.com/q/26230629
tags question: http://stackoverflow.com/q/26303655
tags question: http://stackoverflow.com/q/26284029
tags question: http://stackoverflow.com/q/26262680
tags question: http://stackoverflow.com/q/26275186
tags question: http://stackoverflow.com/q/26225402
tags question: http://stackoverflow.com/q/26348038
tags question: http://stackoverflow.com/q/26342029
tags question: http://stackoverflow.com/q/26276125
tags question: http://stackoverflow.com/q/26299545
tags question: http://stackoverflow.com/q/26273769
tags question: http://stackoverflow.com/q/26242788
tags question: http://stackoverflow.com/q/26222040
tags question: http://stackoverflow.com/q/26207636
tags question: http://stackoverflow.com/q/26200200
tags question: http://stackoverflow.com/q/26214276
tags question: http://stackoverflow.com/q/26329365
tags question: http://stackoverflow.com/q/26316323
tags question: http://stackoverflow.com/q/26290134
tags question: http://stackoverflow.com/q/26343879
tags question: http://stackoverflow.com/q/26202870
tags question: http://stackoverflow.com/q/26323011
tags question: http://stackoverflow.com/q/26349278
tags question: http://stackoverflow.com/q/26308097
tags question: http://stackoverflow.com/q/26298076
tags question: http://stackoverflow.com/q/26225060
tags question: http://stackoverflow.com/q/26201397
tags question: http://stackoverflow.com/q/26341422
tags question: http://stackoverflow.com/q/26238882
tags question: http://stackoverflow.com/q/26271034
tags question: http://stackoverflow.com/q/26275615
tags question: http://stackoverflow.com/q/26310664
tags question: http://stackoverflow.com/q/26245387
tags question: http://stackoverflow.com/q/26352960
type: Tag

http://stackoverflow.com/comment/41280409
score: 0
comment on: http://stackoverflow.com/q/26306186
type: Comment
type: QuestionComment
has text: Here's your call to `getUsers`: `getUsers(leanBody, leanSenderId, leanSenderName, randUsers);`, here's `getUsers`: `function getUsers(randUsers, response, leanBody, leanSenderName, leanSenderId, randUsers)` notice how a) your parameters don't match and b) you have `randUsers` twice.

http://stackoverflow.com/q/26314585
has answer: http://stackoverflow.com/a/27232541
has title: Grunt build + nginx: unexpected errors
has comment: http://stackoverflow.com/comment/41295355
type: Question
tagged with: nginx
tagged with: javascript
tagged with: gruntjs
score: 0
answer count: 1
has body: I understand that there are always risks of going with something nonstandard like grunt to deploy projects but I decided to do that anyway. I used Yeoman to scaffold a simple AngularJS project and grunt to test it. It was all good and I didn't get many Jslint errors. I followed all coding standards pretty much. I then did grunt build to build the project (minify et al) and copied the dist folder over to a server. I pointed nginx to the dist directory and was quite surprised to see many errors in the source files. The first one is probably an nginx configuration issue; I get errors in the console which are; Resource interpreted as Script but transferred with MIME type text/html I checked the server configuration but found that in my case, the configuration already had: include /etc/nginx/mime.types; So no go. My console is jittered with javascript errors which look like Uncaught SyntaxError: Unexpected token &lt; ui-bootstrap.js:1 And I actually see HTML tags having been inserted in ui-bootstrap.js -- either by nginx or by grunt build In any case, this really has me stuck. Can anyone help solve this? Thanks.
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41295928
has comment: http://stackoverflow.com/comment/41295264
tagged with: minify

http://stackoverflow.com/comment/41092218
type: QuestionComment
comment on: http://stackoverflow.com/q/26201925
has text: Which version of Fuel UX are you using? 2.6.x or 3.0.x? I'm guessing Fuel UX 2 since you refer to the control as a datagrid instead of repeater. If it's 2, then is may be a bug in a deprecated version. If it's Fuel UX 3. I might be able to work with you to get this added as a feature in an upcoming release.
score: 0
type: Comment

http://stackoverflow.com/q/26233009
accepted answer: http://stackoverflow.com/a/26378857
has comment: http://stackoverflow.com/comment/41152216
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41146802
has comment: http://stackoverflow.com/comment/41157038
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41145923
upvote count: 3
has title: How to get tagged posts for a specific blog using Tumblr API V2?
has answer: http://stackoverflow.com/a/26378857
tagged with: tumblr
type: Question
score: 3
has body: I have read the Tumblr API V2 documentation and understand that I can use the /posts method with the tag parameter to get posts from a specific blog with a specific tag, but the response I get doesn't contain any posts, just the total count. This is true for any blog and tag combination I try. I am using javascript (not the official client) but the result is the same even when I use the Tumblr API Console or type a request directly into the browser URL. Example request: http://api.tumblr.com/v2/blog/washingtonpost.tumblr.com/posts/text?tag=culture&amp;api_key=fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4 Response: {"meta":{"status":200,"msg":"OK"},"response":{"blog":{"title":"The Washington Post","name":"washingtonpost","posts":2647,"url":"http:\/\/washingtonpost.tumblr.com\/","updated":1412647225,"description":"Things you should see and know, from civil rights to Senate races to sports to book reviews. Curated by Julia Carpenter.","is_nsfw":false,"ask":true,"ask_page_title":"Ask away!","ask_anon":true,"share_likes":false},"posts":[],"total_posts":7}} The response.total_posts count is accurate, but why is the response.posts array empty? How could I use this response to get the actual posts? Edit: As of today there are 7 posts on the Washington Post blog tagged "culture". There is 1 text post, 3 quote posts and 3 photo posts. This request returns all 3 photo posts. This request returns all 3 quote posts. So why does this request not return the 1 text post?
tagged with: javascript
tagged with: api

http://stackoverflow.com/q/26316222
tagged with: firefox-addon
has body: I am writing a firefox addon and have a content script that does my DOM manipulation as I want, but I now want to display some images from my add-on's data directory in the manipulated webpage (rather than link to them on a remote server) but I'm not sure how to do it. I see that communication between the add-on module and content script should be done via port.emit, but the API says that the parameter has to be JSON serializable. Has anyone done this before? I feel that I've missed something.
accepted answer: http://stackoverflow.com/a/26318746
tagged with: firefox-addon-sdk
score: 0
has comment: http://stackoverflow.com/comment/41334413
type: AnsweredQuestion
has title: Displaying images from firefox add-on's data directory in webpage
type: Question
has answer: http://stackoverflow.com/a/26318746
answer count: 2
possible better answer: http://stackoverflow.com/a/26318367
tagged with: javascript
has answer: http://stackoverflow.com/a/26318367

http://stackoverflow.com/q/26210970
has comment: http://stackoverflow.com/comment/41104733
has answer: http://stackoverflow.com/a/26211520
has answer: http://stackoverflow.com/a/26211019
has body: I am using following code to send form data from php &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#preloader').hide(); $('#preloader') .ajaxStart(function(){ $(this).show(); }).ajaxStop(function(){ $(this).hide(); }); $('#form form').submit(function(){ $('#result').empty(); $.get('something.php', $(this).serialize(), function(data){ $('#result').html(data); }); return false; }); }); &lt;/script&gt; It's working fine but not working when form has large data, please suggest me how to send it.
score: -1
type: Question
upvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41104690
answer count: 3
has answer: http://stackoverflow.com/a/26211043
has title: Ajax serialize() is not post form data
type: UnansweredQuestion
tagged with: php
downvote count: 1
linked to: http://stackoverflow.com/q/2659952

http://stackoverflow.com/comment/41330432
score: 0
has text: This is going to fail for columns >26...(A1 notation that uses 2 letters)
comment on: http://stackoverflow.com/a/26332665
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26242643
upvote count: 18
has comment: http://stackoverflow.com/comment/118693546
has comment: http://stackoverflow.com/comment/128875455
has comment: http://stackoverflow.com/comment/41164008
has comment: http://stackoverflow.com/comment/41164076
type: AcceptedAnswer
downvote count: 0
score: 18
answers question: http://stackoverflow.com/q/26240463
has comment: http://stackoverflow.com/comment/128868359
accepted answer of: http://stackoverflow.com/q/26240463
type: Answer
has body: Content scripts are sandboxed, so don't have access to the same window object. That's not entirely true: although content scripts by default cannot interact with the window object of the page where they are loaded, they share the same hidden window object of the "isolated world". So if you load two different content scripts into the same page, you'll be using the same window for both content scripts. Here is an example, try it by yourself, and do something like this: A sample of manifest.json: { "name": "My extension", ... "content_scripts": [ { "matches": ["*://*/*"], "js": ["one.js", "two.js"] } ] } The script one.js with the function: function sayHello(name) { alert("Hello " + name + "!"); } The script two.js that uses that function: sayHello('John'); What happens here? That's pretty easy to tell: When a page is loaded, the content scripts are injected The one.js script is injected first and defines the sayHello function Now two.js and any other content script injected after one.js can use that function Calling sayHello('John'); will alert "Hello John!" as expected. That's why most of the developers (me too) love doing something like this: "content_scripts": [ { "matches": ["*://*/*"] "js": ["jquery.min.js", "script.js"] } ] because that's an easy way to include jQuery and use it with your content scripts. Obviously content scripts will share the same window object even if they are injected from the background page with the chrome.scripting.executeScript() (MV3) or chrome.tabs.executeScript() (MV2) function. To answer your question: You can easily create a script containing all your utilities and most used functions, so you'll always be ready to use them in any other content script injected after the first one. So, basically, doing something like this: "content_scripts": [ { "matches": ["*://*/*"] "js": ["script1.js", "script2.js", "script3.js", ...] } ] means that: script1.js is injected script2.js is injected and inherits the namespace of script1.js script3.js …
has comment: http://stackoverflow.com/comment/127442728

google-maps
tags question: http://stackoverflow.com/q/26314206
tags question: http://stackoverflow.com/q/26318272
tag name: google-maps
tags question: http://stackoverflow.com/q/26346076
tags question: http://stackoverflow.com/q/26336592
tags question: http://stackoverflow.com/q/26294996
tags question: http://stackoverflow.com/q/26264759
tags question: http://stackoverflow.com/q/26349554
tags question: http://stackoverflow.com/q/26198934
tags question: http://stackoverflow.com/q/26338704
tags question: http://stackoverflow.com/q/26278864
tags question: http://stackoverflow.com/q/26337101
tags question: http://stackoverflow.com/q/26276680
tags question: http://stackoverflow.com/q/26327532
tags question: http://stackoverflow.com/q/26224129
tags question: http://stackoverflow.com/q/26308666
tags question: http://stackoverflow.com/q/26345758
tags question: http://stackoverflow.com/q/26295797
tags question: http://stackoverflow.com/q/26283423
tags question: http://stackoverflow.com/q/26319196
tags question: http://stackoverflow.com/q/26197073
tags question: http://stackoverflow.com/q/26259439
tags question: http://stackoverflow.com/q/26280356
tags question: http://stackoverflow.com/q/26330001
tags question: http://stackoverflow.com/q/26242866
tags question: http://stackoverflow.com/q/26323784
tags question: http://stackoverflow.com/q/26283525
tags question: http://stackoverflow.com/q/26275566
tags question: http://stackoverflow.com/q/26313986
tags question: http://stackoverflow.com/q/26273575
tags question: http://stackoverflow.com/q/26277221
tags question: http://stackoverflow.com/q/26329644
tags question: http://stackoverflow.com/q/26319293
tags question: http://stackoverflow.com/q/26209427
type: Tag
tags question: http://stackoverflow.com/q/26292572
tags question: http://stackoverflow.com/q/26329061
tags question: http://stackoverflow.com/q/26340651
tags question: http://stackoverflow.com/q/26243805
tags question: http://stackoverflow.com/q/26317161
tags question: http://stackoverflow.com/q/26351488
tags question: http://stackoverflow.com/q/26197020
tags question: http://stackoverflow.com/q/26331994
tags question: http://stackoverflow.com/q/26239412
tags question: http://stackoverflow.com/q/26258125
tags question: http://stackoverflow.com/q/26284532
tags question: http://stackoverflow.com/q/26229255
tags question: http://stackoverflow.com/q/26285640
tags question: http://stackoverflow.com/q/26316227
tags question: http://stackoverflow.com/q/26345537
tags question: http://stackoverflow.com/q/26212235
tags question: http://stackoverflow.com/q/26212162
tags question: http://stackoverflow.com/q/26308353
tags question: http://stackoverflow.com/q/26338733
tags question: http://stackoverflow.com/q/26350558
tags question: http://stackoverflow.com/q/26332420
tags question: http://stackoverflow.com/q/26329981

http://stackoverflow.com/q/26321375
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26321409
accepted answer: http://stackoverflow.com/a/26321409
type: AnsweredQuestion
tagged with: alert
has title: Un-disabling alert() in Chrome?
has body: I have acidentally disabled alerts on codepen.io and I need it for a website I am making. I pressed the "Prevent this page from making additional dialogs." Please tell me that there is a way to fix it. I have looked at all the other questions towards fixing, but none of them work. Closing and reopening the tab will not work either. Please help! Steps to reproduce: Run the following JavaScript: alert('first'); alert('second'); Click OK on the first alert. Check "Prevent this page from making additional dialogs." and click OK on the second alert. Reload the page. Thanks in advanced!
tagged with: google-chrome
type: Question
tagged with: disabled-control
score: -2
tagged with: javascript
downvote count: 4
answer count: 1

http://stackoverflow.com/a/26306963
has comment: http://stackoverflow.com/comment/76561836
has comment: http://stackoverflow.com/comment/106024987
type: Answer
has body: There doesn't seem to be a straightforward way to do this, unfortunately. Short of writing your own function for this, you'll need to return something that can be directly compared for equality (as in your first example). One method would be to just .join() the properties you need: _.uniqBy(myArray, function(elem) { return [elem.a, elem.b].join(); }); Alternatively, you can use _.pick or _.omit to remove whatever you don't need. From there, you could use _.values with a .join(), or even just JSON.stringify: _.uniqBy(myArray, function(elem) { return JSON.stringify(_.pick(elem, ['a', 'b'])); }); Keep in mind that objects are not deterministic as far as property order goes, so you may want to just stick to the explicit array approach. P.S. Replace uniqBy with uniq for Lodash &lt; 4
answers question: http://stackoverflow.com/q/26306415
downvote count: 2
score: 44
has comment: http://stackoverflow.com/comment/57407727
has comment: http://stackoverflow.com/comment/41281811
upvote count: 46
has comment: http://stackoverflow.com/comment/41281762
has comment: http://stackoverflow.com/comment/41282474
has comment: http://stackoverflow.com/comment/41282751

http://stackoverflow.com/comment/41335554
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26336075
has text: true, but the trick with jQuery is knowing _when not to use it..._
type: Comment

http://stackoverflow.com/q/26202499
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41090008
has answer: http://stackoverflow.com/a/26203429
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8650408
tagged with: mysql
type: Question
accepted answer: http://stackoverflow.com/a/26203429
tagged with: javascript
has body: I have this code to call run myupdate.php everytime a link with .two class is clicked. &lt;link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css"&gt; &lt;link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="customstyle.css"&gt; &lt;script&gt; $(document).ready(function(){ $(".two").click(function(){ $.ajax({ type : "POST", url : "myupdate.php", data : {action_type:"update"}, success : function(html){ } }); }); }); This is my code for myupdate.php &lt;?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(); } ?&gt; What one have to do is visit the page click on any link containing class .two and when he refreshes the page his points increase by two. This code works on all browsers on PC, Firefox for android and other such browsers, it works in built in browser in android. However, it does not work in opera mini and UC browser. Do UC browser and opera mini have some problem with executing php code written in this way or they don't register these events as clicks.
has title: MySQL values not updating when using Opera mini and UC browser?
score: 0
answer count: 1

http://stackoverflow.com/q/26316615
type: Question
accepted answer: http://stackoverflow.com/a/26316686
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/26316686
answer count: 1
favorite count: 0
has body: I want to place the following code into the editor frame of a single page in Wordpress. My goal is to turn the text white of anything inside a tag set. I've already confirmed that the tag can take a style. So it works if I edit a single tag to: Foo
type: AnsweredQuestion
has title: javascript in wordpress page editor not working
has comment: http://stackoverflow.com/comment/41299114
downvote count: 0
score: 1
tagged with: wordpress

http://stackoverflow.com/comment/48192943
comment on: http://stackoverflow.com/a/26414246
type: AnswerComment
has text: Please note that the class name of 'positionClass': 'toast-top-right' in the configuration is not right. It should be 'position-class': 'toast-top-right'.
score: 0
type: Comment

http://stackoverflow.com/a/26295867
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41263894
answers question: http://stackoverflow.com/q/26282843
upvote count: 1
has body: When you are adding an event listener you are actually calling the function which returns undefined and makes a postback. So if you will remove a __doPostBack call from changeCatalogPostback function the line with addEventListener call would evaluate to the end and will be equal to: xListYears[f].addEventListener('click', undefined); Instead addEventListener should accept a function as a second parameter. Use a bind call: xListYears[f].addEventListener( 'click', changeCatalogPostback.bind(this, xListYears[f].getAttribute('customparam'), true));
score: 1
accepted answer of: http://stackoverflow.com/q/26282843
type: AcceptedAnswer

http://stackoverflow.com/comment/41163959
score: 0
comment on: http://stackoverflow.com/q/26241843
type: Comment
type: QuestionComment
has text: @SameerShemna So either I set the anchor tags with `data-ajax=false` or I change the IDs for each popup.

http://stackoverflow.com/q/26219606
has title: jQuery error: cannot call methods on dialog prior to initialization; attempted to call method 'open'
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41151096
has comment: http://stackoverflow.com/comment/41121025
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41151141
has comment: http://stackoverflow.com/comment/41151878
answer count: 0
type: Question
tagged with: dialog
has body: I'm rewriting an existing application where I'm replacing a lot of Ajax control toolkit stuff with jQuery. I'm running into a weird problem with the jQuery dialog: The dialog opens fine, but when I click the close button and want to navigate away from the page, it throws me this error. Explanation of the code The dialog opens when clicking a button. An aspx page is loaded inside the dialog. This page also contains some jQuery stuff to display error messages and a dialog when the user enters false data. This piece of code initializes and shows the first (outer) dialog: function ShowDistributionDialog() { //Create the Add Distribution dialog $(dialogControl).dialog({ title: 'Add/Edit Distributions', autoOpen: false, modal: true, closeOnEscape: false, draggable: false, resizable: false, width: 600, height: 475 }); //Load the Distribution page into the dialog $(dialogControl).load('./DistributionJQ.aspx?RID=' + rid + '&amp;DistributionNr=' + distributionID); //Open the dialog $(dialogControl).dialog('open'); } In the DistributionJQ.aspx page, there is a normal button to add the distribution. This triggers a postback so the data filled in this page can be saved to the database. I can open the dialog again without any issues. When I click a link button (hosted in a user control somewhere else in the page) to return to the home page of the application, this error pops up. When I click No in the Webpage Error dialog, the DistributionJQ.aspx (originally hosted in the dialog) page is displayed. Edit The mark up for the LinkButton looks like this: &lt;ASP:LINKBUTTON cssclass="Label hand" onclientclick="PleaseWait();" font-underline="True" font-size="10" runat="server" id="LinkButtonUserName" causesvalidation="false"&gt;&lt;/ASP:LINKBUTTON&gt; I found out that the error occurs in the onclientclick method PleaseWait. So I took it out. When I click the linkbutton now, it shows me the DistributionJQ.aspx page. This all happens client side!! In the onclick method on the server is a…
tagged with: javascript
has comment: http://stackoverflow.com/comment/41121061
score: 0
has comment: http://stackoverflow.com/comment/41156072

http://stackoverflow.com/a/26305210
has comment: http://stackoverflow.com/comment/41278730
has comment: http://stackoverflow.com/comment/41281978
has comment: http://stackoverflow.com/comment/41278716
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/26305026
has body: Verify that you have this Microsoft update installed: Windows 7 http://support2.microsoft.com/kb/2936068 You can check Control Panel > Programs and Features > View installed updates, and look for 2936068 Windows 8.1 http://support.microsoft.com/kb/2854645
has comment: http://stackoverflow.com/comment/82085507
has comment: http://stackoverflow.com/comment/41278607
has comment: http://stackoverflow.com/comment/82239615
score: -1
has comment: http://stackoverflow.com/comment/89935410
downvote count: 1

http://stackoverflow.com/comment/41229328
type: Comment
comment on: http://stackoverflow.com/q/26278550
has text: @andrex Been there, done that...
score: 0
type: QuestionComment

http://stackoverflow.com/q/26309984
tagged with: javascript
has comment: http://stackoverflow.com/comment/41359522
score: 0
tagged with: jquery
has title: jqGrid Custom operations with Edit Dialog fields
has comment: http://stackoverflow.com/comment/41295119
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41289215
type: Question
has comment: http://stackoverflow.com/comment/41359308
has body: I have a jqGrid that has some editable columns. I'm using the Edit Dialog feature to edit the table rows: I need the SACOS field to be multiplied (and other operations) with the PESO BRUTO field to obtain the value of COSTO TRANSPORTE. I've tried using JavaScript and/or JQuery selecting their names (obtaining then using Firebug) but nothing works, maybe it's because this little form is inside another form and as we know HTML nested forms are forbidden. So, how can I perform operations with the edit dialog fields? Thanks in advance.
tagged with: jqgrid

http://stackoverflow.com/a/26224017
downvote count: 0
answers question: http://stackoverflow.com/q/26223924
type: Answer
has comment: http://stackoverflow.com/comment/41154301
has comment: http://stackoverflow.com/comment/41156269
has comment: http://stackoverflow.com/comment/41155095
has body: Enumerate the &lt;option&gt; elements of the &lt;select&gt; elements and check their selected attribute. Untested JavaScript snippet: var sel = document.getElementById('selType'); for (var i = 0; i &lt; sel.options.length; i++) { if ( sel.options[i].selected ) { alert(sel.options[i].value); } }
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26223924
type: AcceptedAnswer

http://stackoverflow.com/comment/41202702
has text: @Tartar: Even if the element is defined in the HTML, it probably doesn't exist *at the moment* your are trying to bind the handler. If you put the event handler binding inside `$(document).ready(...)` (like the tutorial suggest), or *after* the element in the HTML source, your code probably works fine. "Proof": http://jsfiddle.net/y2myrzka/
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26263712
type: Comment

http://stackoverflow.com/comment/41254169
type: Comment
has text: So these changes will be dribbling down slowly as the spec is finalized? Anything I can do to avoid them until we're ready?
comment on: http://stackoverflow.com/a/26288604
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41305594
comment on: http://stackoverflow.com/a/26320100
has text: @Batman - In the Q promise library, you can use `.allSettled()` to get called when all promises have finished and then check to see which ones completed successfully. Details [here](https://github.com/kriskowal/q/wiki/API-Reference#promiseallsettled).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41265170
score: 0
has text: do i need to add some script to use navigator.geolocation.getCurrentPosition();? to support android browser
type: Comment
comment on: http://stackoverflow.com/q/26297806
type: QuestionComment

http://stackoverflow.com/comment/41195356
type: Comment
type: QuestionComment
has text: Looks fine to me, is there any particular problem you are having with it? Any particular problem you are trying to solve? Why do you think it might need to be optimized?
score: 0
comment on: http://stackoverflow.com/q/26259706

http://stackoverflow.com/q/26242132
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26242191
has comment: http://stackoverflow.com/comment/41163154
answer count: 2
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26242185
has title: What do random colons mean in JavaScript
favorite count: 0
type: Question
upvote count: 6
has comment: http://stackoverflow.com/comment/41163055
accepted answer: http://stackoverflow.com/a/26242185
downvote count: 3
linked to: http://stackoverflow.com/q/6528325
has answer: http://stackoverflow.com/a/26242191
duplicate of: http://stackoverflow.com/q/6528325
has body: Like in LinkedIn's api example:

http://stackoverflow.com/a/26271983
has body: You can use Html5 History API Good tutorial for using HTML5 History API (Pushstate?) $(document).ready(function() { $('a[href^="#"]').on('click',function(e) { e.preventDefault(); var t = $(this.hash).offset().top; $('.wrapper').animate({ scrollTop:t }, 1000); history.pushState(null, null, location.href + $(this).href); // &lt;- not sure whether your links are relative or absolute.. do change appropriately.. }) });
answers question: http://stackoverflow.com/q/26271847
score: 0
has comment: http://stackoverflow.com/comment/41221671
type: Answer
has comment: http://stackoverflow.com/comment/41221488

http://stackoverflow.com/comment/41217726
has text: That might be ( reversed ) what you want: http://stackoverflow.com/questions/26195212/find-all-elements-in-javascript-that-do-not-have-a-data-attribute.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26271933

http://stackoverflow.com/q/26222786
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41129002
has comment: http://stackoverflow.com/comment/41127056
type: Question
has comment: http://stackoverflow.com/comment/41127109
has title: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access.
has comment: http://stackoverflow.com/comment/41127299
has answer: http://stackoverflow.com/a/26222988
has comment: http://stackoverflow.com/comment/41127061
answer count: 1
tagged with: javascript
has body: I have a node.js server which is running locally on my computer. And I am developing html page with js-code: var MainController = function($scope, $http) { var onCountComplete = function(response) { $scope.count = response.data; }; var onError = function(reason) { $scope.error = "Could not fetch data"; }; $http.get("http://localhost:1337/api/count") .then(onCountComplete, onError); $scope.message = "hello"; }; I get the error when I were running this code: XMLHttpRequest cannot load http://localhost:1337/api/count. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. I have tried to launch the Chrome with --allow-file-access-from-files key, but it doesn't helps. Is there a way to avoid this error during development?
has comment: http://stackoverflow.com/comment/41127078
score: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/8456538
has comment: http://stackoverflow.com/comment/41127173

http://stackoverflow.com/a/31492263
accepted answer of: http://stackoverflow.com/q/26222690
has comment: http://stackoverflow.com/comment/50965449
answers question: http://stackoverflow.com/q/26222690
score: 0
has comment: http://stackoverflow.com/comment/50947976
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/50965566
has body: This is pretty good. Simple walk through. I'm doing the same thing for an assignment. https://gist.github.com/shimondoodkin/6213581. This is what I have for a POST and 404 'use strict'; var http = require('http'); var server = http.createServer(function(req, res) { if (req.url === '/hello') { res.writeHead(200, { 'Content-Type': 'application/json' }); if (req.method === "POST") { console.log('post'); var body = ''; req.on('data', function(data) { body += data.toString('utf-8'); }); req.on('end', function(data) { body += data ? data.toString('utf-8') : ''; var parsedBody; try { parsedBody = JSON.parse(body); } catch(e) { console.log(e); res.write(JSON.parse({msg: 'invalid json'})); return res.end(); } res.write(JSON.stringify({msg: 'hello ' + parsedBody.name})); res.end(); }); } else { res.write(JSON.stringify({msg: 'hello world'})); res.end(); } } else { res.writeHead(404, { 'Content-Type': 'application/json' }); res.write(JSON.stringify({msg: 'could not find page'})); res.end(); } }); server.listen(3000, function() { console.log('server started'); });
type: Answer

http://stackoverflow.com/a/36277137
has body: Grunt cssmin has a dependency on node.js module clean-css. I would recommend to use clean-css API within Grunt with the options available https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-api. One of the parameters available is; advanced - set to false to disable advanced optimizations - selector &amp; property merging, reduction, etc. You play with this option on http://refresh-sf.com/. If you go to tab 'clean-css' below the textarea, you could enable/disable advanced to see it working. Edit: Issued this at grunt-contrib-cssmin repo as an issue https://github.com/gruntjs/grunt-contrib-cssmin/issues/263
type: Answer
answers question: http://stackoverflow.com/q/26279789
score: 0

http://stackoverflow.com/a/26273646
upvote count: 2
has comment: http://stackoverflow.com/comment/61260537
has body: $.ajax return a promise so you can't do it directly. Your best shot is that : var fail = function () { alert("fail"); }; var ajaxCall = $.ajax({ url: pUrl, type: "POST", data: pData, dataType: "json", processData: false, contentType: "application/json; charset=utf-8" }) .always(function () { alert("always"); }) .success(function (data) { if (data == "fail") { fail(); return; } alert("success"); }) .fail(fail);
answers question: http://stackoverflow.com/q/26273612
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41230432
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26278030
has text: The problem is that the store here as actually judge pile of legacy code which does a lot of stuff. Otherwise you'd build it into angular from the start..
score: 0

http://stackoverflow.com/comment/41275351
score: 1
has text: If it was successfully restarting, then you can shorten the `--minUptime` option so that `forever` considers it successfully started before the bad user interaction happens. I looked in the `forever` source and I don't see any limitations on how many times it restarts.
comment on: http://stackoverflow.com/q/26289059
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26318996
downvote count: 0
answers question: http://stackoverflow.com/q/26318856
type: Answer
accepted answer of: http://stackoverflow.com/q/26318856
has body: Simply, it would allow you to create standalone JavaScript programs and allow embedding JavaScript in Java. Java must be compiled into what is known as a "machine language" before it can be run. JavaScript is text-based and interpreted, and is interpreted by browsers. So being able to use this technology inside Java is a pretty cool thing. JRuby is another example of a scripting language that can run inside Java, as well as it's Python equivalent Jython. They are all just wrappers for languages to use inside Java. It is already possible to run dynamic languages on top of the JVM, but the goal is to ease new dynamic language implementations and increase their performance. One advantage I can think of is using JavaScript for the scripting of a Java game. Hope it helps :)
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41303416
type: AcceptedAnswer

http://stackoverflow.com/q/26329589
tagged with: javascript
has title: Receive nested JSON object with Node.js
linked to: http://stackoverflow.com/q/9733638
has body: I am having trouble posting a nested JSON object to my node.js server. Here is what the object should look like: { "name" : "Plan 1", "schedule": [ { "start": 0, "days": [ { "title" : "Day1" } ] } ] } Here is my server.js code router.route('/plans') .post(function(req, res) { console.log(JSON.stringify(req.body)); var plan = new Plan(); plan.name = req.body.name; plan.tagline = req.body.tagline; plan.duration = req.body.duration; plan.schedule = req.body.schedule; plan.save(function(err) { if (err) res.send(err); res.send(plan); }); }) And some python code to make the request. (I have tried using Postman and curl and got the same results) import requests payload = {"name" : "Plan 1", "schedule": [{"start": 0, "days": [{"title" : "Day1"}]}]} r = requests.post("http://localhost:5000/plans", data=payload) print(r.text) This is what is output by server.js for the JSON.stringify(req.body) {"name" : "Plan 1", "schedule" : ["start", "days"]} And then nothing actually gets saved, so print(r.text) outputs: {} What is the proper way to go about doing this? I am using MongoDB for storage if that is relevant, but it looks like my server.js is not even receiving the full JSON correctly.
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41323183
has comment: http://stackoverflow.com/comment/41323155
upvote count: 1
tagged with: node.js
score: 1
has comment: http://stackoverflow.com/comment/41323226
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26329685
tagged with: mongodb
downvote count: 0

http://stackoverflow.com/a/26221304
answers question: http://stackoverflow.com/q/26221219
type: Answer
has body: In javascript there is no type safety for objects as I know. you can assign one object to another without any casting. Please see below example. var x= []; // x is an array x = {}; // Now x changes to object
score: 0

http://stackoverflow.com/comment/41353415
score: 0
type: QuestionComment
type: Comment
has text: Your object is invalid...that array has no key `{key:val, []}` isn't valid
comment on: http://stackoverflow.com/q/26345996

http://stackoverflow.com/a/26272069
answers question: http://stackoverflow.com/q/26271938
type: AcceptedAnswer
downvote count: 0
upvote count: 16
has body: If you take a look at $modal source code you will see this lines: var modalInstance = { result: modalResultDeferred.promise, opened: modalOpenedDeferred.promise, close: function(result) { $modalStack.close(modalInstance, result); }, dismiss: function(reason) { $modalStack.dismiss(modalInstance, reason); } }; From which it's clear, that close and dismiss methods accept only one result parameter. So you have to pass and object or array if you want to pass several.
type: Answer
score: 16
accepted answer of: http://stackoverflow.com/q/26271938

http://stackoverflow.com/q/26228008
has comment: http://stackoverflow.com/comment/41137054
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26228334
tagged with: validation
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26228334
accepted answer: http://stackoverflow.com/a/26228151
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41139495
type: AnsweredQuestion
type: Question
has body: I'm working on a web form with several textboxes and a submit button. When the submit button is clicked, I am supposed to verify that the required fields all have input and that the age field is only numeric. For example, the user can enter 56, but 56 years-old, shouldn't be accepted. If the user enters invalid input or leaves required fields blank, the border around the appropriate textboxes should turn red. However, as my code is written now all the required fields turn red regardless of input. Any ideas how I can fix this and make the page follow the couple of rules I listed? Most Recent Code Project 4 Welcome to my Web Form! Please fill out the following information. Please note that fields marked with an asterisk (*) are required. *Last Name: First Name: *Hobbies (separate each hobby with a comma): Pets: Children: *Address: *Phone Number: *Age: The problem I'm currently having is that when I click the submit button, all the fields turn red for a split second, but then go back to the regular color and the input is erased. Any thoughts on how to fix this?
has title: Validating Input with Javascript
has answer: http://stackoverflow.com/a/26228151

http://stackoverflow.com/comment/41151126
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26235238
score: 0
has text: I am using "angular routes" to map views and controllers...and the property "activator" i need to get is in the shell page(index.html) and i want that property to be accessed in any controller i call.I have updated my code.Hope it is clear.

http://stackoverflow.com/comment/41312926
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26324023
type: Comment
has text: not the array. i mean the element you append the value of the array ($('.quote'))

http://stackoverflow.com/a/26266728
downvote count: 0
has body: To achieve a fade in effect, you have to add the element as child in 3 steps : Set the opacity of your element to 0 Append it to the parent do the animation of the opacity from 0 to 1 (the fade in effect) In your code, something like that: document.getElementById('addBar').addEventListener('click', function(e) { // step 1: create element and set opacity to 0. var selector = createSelector(); selector.style.opacity = 0; // be careful this is not working in IE before 9. // step 2: append it to its parent. form.appendChild(selector); // step 3: fade in (we choose to do 20 steps in 1 second to go from 0 to 1. Steps are 50ms each) var steps = 0; var timer = setInterval(function() { steps++; selector.style.opacity = 0.05 * steps; if(steps &gt;= 20) { clearInterval(timer); timer = undefined; } }, 50); }); If this code should work in IE 7 or 8 you have to add this line each time you set opacity: element.style.filter = "alpha(opacity=0)"; // for step 1 ... element.style.filter = "alpha(opacity=" + (5 * steps) + ")"; // for step 3 If you use jQuery your code can be simpler to write and you don't have to worry about IE compatibility for the opacity : document.getElementById('addBar').addEventListener('click', function(e) { // step 1: create element and set opacity to 0. var selector = $(createSelector()); selector.css("opacity", 0); // step 2: append it to its parent. $(form).append(selector); // step 3: fade in selector.fadeIn(); });
has comment: http://stackoverflow.com/comment/41210108
has comment: http://stackoverflow.com/comment/41209061
has comment: http://stackoverflow.com/comment/120509513
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26266409
answers question: http://stackoverflow.com/q/26266409
has comment: http://stackoverflow.com/comment/41209899
type: Answer
has comment: http://stackoverflow.com/comment/41209140
score: 2
has comment: http://stackoverflow.com/comment/41208919

http://stackoverflow.com/q/26327368
tagged with: javascript
favorite count: 0
answer count: 4
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26327447
has body: I want to remove all childNodes with class="child" from their parentNode, but only odd sequence is removed. How can I remove all elements with class="child" in native javascript and why only odd sequence is removed? var child = document.getElementsByClassName("child"); function remove(){ for (var i=0; i<child.length; i++) { child[i].parentNode.removeChild(child[i]); } } document.getElementById("del").onclick = remove; Child 1 Child 2 Child 3 Child 4 Child 5 Child 6 Remove Child
has title: Can't remove all childNodes
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26327433
has answer: http://stackoverflow.com/a/64327242
upvote count: 2
has answer: http://stackoverflow.com/a/26327433
has answer: http://stackoverflow.com/a/26327480
has comment: http://stackoverflow.com/comment/41318977
has comment: http://stackoverflow.com/comment/41318888
possible better answer: http://stackoverflow.com/a/26327447

http://stackoverflow.com/a/26203946
score: 0
type: Answer
has body: In order to do what you want you indeed will need to use the this but don't be scared. It is actually very straightforward. Take a look at this snippet: $(".photo").hover(function () { $(".photo-info").slideToggle("slow"); }); Just use this instead: $(this).children(".photo-info").slideToggle("slow"); And all problems solved. Hope this helps.
answers question: http://stackoverflow.com/q/26203892

http://stackoverflow.com/comment/41634833
comment on: http://stackoverflow.com/a/26459892
type: Comment
score: 0
has text: @GuyT, exactly. That's why I can't find logic in your previous post.
type: AnswerComment

http://stackoverflow.com/q/26206202
has comment: http://stackoverflow.com/comment/41095571
tagged with: javascript
has answer: http://stackoverflow.com/a/26206229
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41095568
has title: Why won't my javascript function execute when it's called?
favorite count: 0
has body: I am writing a regular expression to check if the characters in the text box are only letters and hyphens, but for some reason when I call the function from onclick it will not execute. submit
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26206226
score: -1
type: Question
answer count: 2
downvote count: 2

http://stackoverflow.com/a/26324683
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26319196
type: Answer
upvote count: 1
score: 1
has body: Working example(using geocoder instead of AJAX, because there is no guarantee that the service sends the required Access-Control-Allow-Origin-header): for (var x = 0; x &lt; locations.length; x++) { geocoder.geocode({address:locations[x][4]}, (function(x){ return function(data,status){ if (status == google.maps.GeocoderStatus.OK) { marker = new google.maps.Marker({ position: data[0].geometry.location, map: map }); google.maps.event.addListener(marker, 'click', (function(marker, x) { return function() { infowindow.setContent(locations[x][0]); infowindow.open(map, this); } })(marker, x)); } } })(x) ); } Demo: http://jsfiddle.net/doktormolle/utg45kzq/
accepted answer of: http://stackoverflow.com/q/26319196

http://stackoverflow.com/comment/41156358
comment on: http://stackoverflow.com/q/26238348
score: 0
type: Comment
has text: This seems to work, not sure if its recording the right figure though -- http://jsfiddle.net/4sb7bvyr/
type: QuestionComment

http://stackoverflow.com/a/26279398
answers question: http://stackoverflow.com/q/26279189
score: 0
has comment: http://stackoverflow.com/comment/41255478
type: Answer
has body: Read about the Content Filtering. There are many ways to configure CKEditor's content filtering mechanism (called the Advanced Content Filter) so I can't just show here once, because that would be misleading. Update: Clear your browsers cache after changing any configuration option.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41231409
has comment: http://stackoverflow.com/comment/41256696
has comment: http://stackoverflow.com/comment/41246011

http://stackoverflow.com/q/26234238
has comment: http://stackoverflow.com/comment/41148143
favorite count: 0
tagged with: mouseover
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41148292
has body: The site I use for work has a drop down menu at the top and then form content underneath. Clicking on Selects within forms is causing the menu items to be selected as though the user has hovered over them. I've managed to replicate the problem on an example page, take a look at this fiddle: http://jsfiddle.net/86d1nx7x/1/ &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src="../../resources/jquery/jquery-1.11.1.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;title&gt;&lt;/title&gt; &lt;script type="text/javascript"&gt; $(document).ready( function() { $('#nav li a').on('mouseover', function() { var id = '#menu_' + $(this).parent('li').attr('id').substr(5), menu = $(id), offset = $(this).offset(), xpos = offset.left, ypos = offset.top + $(this).height(); $('.menu').hide(); menu.css({ 'left': (xpos + 2) + 'px', 'top': ypos + 'px' }).show(); } ); $('#nav li a').on('mouseout', function() { //$('.menu').hide(); } ); } ); &lt;/script&gt; &lt;style&gt; body, div, ul, li, a { padding:0px; margin:0px; } #nav { position: absolute; padding:0px 0px 0px 10px; top: 0px; width: 100%; height: 30px; background-color:#FFF; -webkit-transition: background-color 0.5s ease; } #nav:hover { background-color:#000; } #nav ul{ list-style-type:none; } #nav li { float:left; } #nav a { display:block; margin:0px 10px 0px 0px; height:30px; line-height:30px; padding:0px 10px 0px 10px; background-color:#AAA; } #nav .menu { display:none; width:200px; height:100px; position:absolute; background-color:#BBB; } #content { padding: 5px; margin: 35px 0px 0px 0px; background-color:#CCC; } #content .columns .column { display:block; float:left; width:200px; } #content .columns .column select { display:block; } .clear { clear:both; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="content"&gt; &lt;div class="columns"&gt; &lt;div class="column"&gt; &lt;select&gt; &lt;option value="1"&gt;Select 1&lt;/option&gt; &lt;/select&gt; &lt;select&gt; &lt;option value="2"&gt;Select 2&lt;/option&gt; &l…
has comment: http://stackoverflow.com/comment/42685026
score: 2
tagged with: select
tagged with: google-chrome
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41148104
has title: Chrome - Strange Mouse Events from Select element
downvote count: 0
has comment: http://stackoverflow.com/comment/41148056

http://stackoverflow.com/q/26282440
favorite count: 0
upvote count: 2
has title: Programmatically set width of HTML element at runtime in AngularJS
type: AnsweredQuestion
has body: I am working on a directive in an AngularJS project. In this directive, I HAVE to programmatically set the width of an HTML element at runtime. However, I am not having any success in doing so. Currently, my directive looks like this: My Plunkr Is Here myApp.directive('myDirective', function () { return { restrict:'E', transclude: true, templateUrl: 'my-directive.html', link: function(scope, element, attrs) { var inputField = element.find('input'); scope.width = inputField[0].offsetWidth; scope.err1 = 'none'; try { var testDiv = element.find('#test-name'); element(testDiv).css('width', (scope.width + 'px')); } catch (e1) { scope.err1 = e1.message; } scope.err2 = 'none'; try { var testDiv = element.find('.test-class'); element(testDiv).css('width', '500px'); } catch (e2) { scope.err2 = e2.message; } }, controller: function ($scope) { } }; }); As the plunkr shows, I get a runtime error when I attempt to programmatically set the width of my div. I do not understand what I'm doing wrong. Can somebody please show me what I'm doing wrong? I need to figure out how to set the width at runtime in either the link or controller function. Once again, I have to do this programmatically. I cannot add a width to the scope and bind the UI to it.
has answer: http://stackoverflow.com/a/26282804
type: Question
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41236905
accepted answer: http://stackoverflow.com/a/26282804

http://stackoverflow.com/comment/41312302
has text: Thank you for replying to my question. but i was thinking if it would be possible to make it with JSON as i have written it for the purpose of expanding the object using jquery function called extend later on.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26282178
type: Comment

http://stackoverflow.com/q/26204572
has answer: http://stackoverflow.com/a/26204594
possible better answer: http://stackoverflow.com/a/26204598
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26204598
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26204594
has body: I have a simple contact form which i ahve created using php and jquery. The problem is when i click on the image, which im using as a submit button it doesnt post the values to my php files. i jus put up some alert boxes to check if the click events work. it works but the values dont post. jquery html form Enter Your Shipping Information First Name: Last Name: Email: i dont see any errors in my firebug console. can someone tell me what am i doing wrong here?
has title: jquery form not posting values to php on click
type: AnsweredQuestion

http://stackoverflow.com/a/38084691
answers question: http://stackoverflow.com/q/26306090
has body: I use the following code: function resetAtMidnight() { var now = new Date(); var night = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 1, // the next day, ... 0, 0, 0 // ...at 00:00:00 hours ); var msToMidnight = night.getTime() - now.getTime(); setTimeout(function() { reset(); // &lt;-- This is the function being called at midnight. resetAtMidnight(); // Then, reset again next midnight. }, msToMidnight); } I think there are legitimate use-cases for running a function at midnight. For example, in my case, I have a number of daily statistics displayed on a website. These statistics need to be reset if the website happens to be open at midnight. Also, credits to this answer.
score: 32
downvote count: 0
has comment: http://stackoverflow.com/comment/139415365
has comment: http://stackoverflow.com/comment/116417181
upvote count: 32
type: Answer

http://stackoverflow.com/a/29723019
has comment: http://stackoverflow.com/comment/49674790
type: Answer
upvote count: 4
score: 3
has comment: http://stackoverflow.com/comment/49665496
downvote count: 1
has body: Inject the $window into your controller and you can get the scroll position on scroll var windowEl = angular.element($window); var handler = function() { console.log(windowEl.scrollTop()) } windowEl.on('scroll', handler); Fiddle Adaptation from another stackoverflow answer
answers question: http://stackoverflow.com/q/26319551

http://stackoverflow.com/q/26213540
has title: How to find out whether traffic information is available in the requested area?
answer count: 0
has body: I'm using Google API V3, and JavaScript and want to calculate the delay to get from one point to another that is caused by the traffic. So, I made two requests (also see code below): One with durationInTraffic = true and one with durationInTraffic = false Strangely enough, both return the same values (I tested several bigger areas like Munich, Berlin, London, Sidney). Now I wonder whether my code is wrong or there are simply no traffic data available in the requested area. function getRoute(){ var directionsService = new google.maps.DirectionsService(); var myOptions = { zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP }; var startValue=document.getElementById('start').value; var zielValue=document.getElementById('ziel').value; var stundeValue=document.getElementById('stunde').value; var minuteValue=document.getElementById('minute').value; var tagValue=document.getElementById('tag').value; var monatValue=document.getElementById('monat').value; var jahrValue=document.getElementById('jahr').value; //departure time in Epoch time var abfahrtsZeitValue=monatValue+"/"+tagValue+"/"+jahrValue+" "+stundeValue+":"+minuteValue; var request_withTraffic = { origin: startValue, destination: zielValue, travelMode: google.maps.DirectionsTravelMode.DRIVING, transitOptions: { departureTime: new Date(abfahrtsZeitValue) }, durationInTraffic: true }; var request_withoutTraffic = { origin: startValue, destination: zielValue, travelMode: google.maps.DirectionsTravelMode.DRIVING, transitOptions: { departureTime: new Date(abfahrtsZeitValue) }, durationInTraffic: false }; directionsService.route(request_withTraffic, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { // Display the duration: document.getElementById('durationWithTraffic').innerHTML="Dauer mit Vekehr: "; document.getElementById('durationWithTraffic').innerHTML += response.routes[0].legs[0].duration.value + " seconds"; } }); directionsService.route(request_withoutTraffic, function(response, status) { i…
type: Question
has comment: http://stackoverflow.com/comment/41112260
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/41115745
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41387672

http://stackoverflow.com/comment/41275060
comment on: http://stackoverflow.com/a/26303258
type: Comment
score: 1
has text: You have a missing `)` in your first `appendChild`.
type: AnswerComment

http://stackoverflow.com/a/26217516
type: Answer
downvote count: 0
score: 1
has body: Change this : var pb = $('#spinner'); pb.innerHTML = '&lt;img src="./ajax-loader.gif" width=200 height=40/&gt;'; pb.style.display = ""; with this : var pb = $('#spinner'); pb.html('&lt;img src="./ajax-loader.gif" width=200 height=40/&gt;'); pb.css({'display':''}); Plus I must add that something IE8 have issue with fadeIn / fadeOut so I would recommande if you still have a problem to try .show() / hide() instead.
answers question: http://stackoverflow.com/q/26217398
upvote count: 1

http://stackoverflow.com/q/26262318
has comment: http://stackoverflow.com/comment/41199709
tagged with: javascript
tagged with: sorting
accepted answer: http://stackoverflow.com/a/26262351
upvote count: 3
answer count: 3
has comment: http://stackoverflow.com/comment/41199632
has answer: http://stackoverflow.com/a/26262353
favorite count: 0
has answer: http://stackoverflow.com/a/26262351
has answer: http://stackoverflow.com/a/26262366
downvote count: 2
has body: function randOrd() { return (Math.round(Math.random()) - 0.5) } A = [0,1,2,3,4,5,6,7] var B = A.sort(randOrd) console.log('A=',A) console.log('B=',B) output: a= [ 3, 4, 0, 1, 6, 2, 5, 7 ] b= [ 3, 4, 0, 1, 6, 2, 5, 7 ] I expected a to be the original array and b to be sorted. But they are both equal (sorted), why?
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26262353
has comment: http://stackoverflow.com/comment/41199715
type: Question
has comment: http://stackoverflow.com/comment/41200034
has title: Why A and B are equal after sort()?
has comment: http://stackoverflow.com/comment/41199672

http://stackoverflow.com/q/26276680
has comment: http://stackoverflow.com/comment/41225774
type: Question
tagged with: c#
tagged with: google-maps
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/35466957
has body: I'm incorporating google map into an app I am building. When the app loads, it displays a list of locations from an Sql server database on the map canvas. However, there is also a requirement that the app should be able to display a location(s) on the map as user types in a location name in a textbox provided and when the textbox is cleared the entire locations should then be redisplayed on the map.The search is to be performed using ajax. I have a created a controller to do the search but what I am not sure of is how to make the ajax call and display the returned location on the map using javascript. Any clues or helpful pointers would be very helpful. I am using ASP.NET MVC 3 and C# for back-end dev.
score: 0
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41226157
has title: ASP.NET MVC 3 and Google Maps API
has comment: http://stackoverflow.com/comment/41226942

http://stackoverflow.com/comment/41304350
type: Comment
has text: Perfect! it's working great! I did that pending = a.filter(function(elem) { return elem.b != data; }); a = pending;
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26319400

http://stackoverflow.com/q/26210054
type: UnansweredQuestion
has body: Hi i am using this kill function in my application, here I am calling kill function inside a for loop each time it will return d for each iteration but some times I am getting d value before it is completion of d.done() and after returning d it is calling d.done() could any body please suggest me which concept i have to use here kill: function() { var t = this , url = "My URL"//App.Data.url('user', p.get('id'), 'dissociate_tag', id) , d = _.http.del(url); d.done(function() { t.resetTile(); t.set('killed', true); }); return d; }
has answer: http://stackoverflow.com/a/26210093
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/41102953
type: Question
tagged with: ember.js
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/41103097
score: 0
has comment: http://stackoverflow.com/comment/41103055
has title: return statement returning before finishing the task
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41286594
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26306067
has text: If the "alert show 'AjaX Success'", then how do you know the response text of the request? Does this mean that you see `'ajaxTest not Set.'` for non-ajax request or you debug the request in the browser's console?

http://stackoverflow.com/q/26252938
favorite count: 0
has answer: http://stackoverflow.com/a/66531416
has answer: http://stackoverflow.com/a/33302959
has answer: http://stackoverflow.com/a/62203462
possible better answer: http://stackoverflow.com/a/39108519
answer count: 10
upvote count: 24
has body: I was trying to put FullCalendar 2.1.1 but it is not working: When I go to try open it I get the following errors: SyntaxError: missing ) after argument list ..."'").replace(/"/g,""").replace(/\n/g,"")}function P(t){returnt.replace(/ TypeError: $(...).fullCalendar is not a function eventLimit: true, // allow "more" link when too many events I have followed the Basic Usage Documentation but it still doesn't work.
has comment: http://stackoverflow.com/comment/41183183
has answer: http://stackoverflow.com/a/60204030
has answer: http://stackoverflow.com/a/50533653
has answer: http://stackoverflow.com/a/77318824
accepted answer: http://stackoverflow.com/a/26253167
type: AnsweredQuestion
has title: FullCalendar TypeError: $(...).fullCalendar is not a function
has comment: http://stackoverflow.com/comment/41182556
downvote count: 0
has answer: http://stackoverflow.com/a/66628094
tagged with: fullcalendar
score: 24
has answer: http://stackoverflow.com/a/26253167
type: Question
has answer: http://stackoverflow.com/a/65403678
tagged with: javascript
has answer: http://stackoverflow.com/a/39108519
tagged with: jquery

http://stackoverflow.com/q/26224196
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26224543
has comment: http://stackoverflow.com/comment/41130163
has body: I want to use magnific popup on dynamically generated content. I have link generated via javascript and a want to use "iframe" magnific popup with this link. HTML: link JS: $(function(){ $('.mp').magnificPopup({ type: 'iframe', closeOnContentClick: false, closeBtnInside: true, removalDelay: 300, mainClass: 'mfp-with-zoom mfp-img-mobile my-mfp-slide-bottom' }); var a = $("a").clone(); a.text('generated'); a.appendTo('#content'); }); live example : jsfiddle With classic static link everything works well but on generated link it doesn't work. Is there some "refresh" function which will register generated link to magnific popup scope? I tried to construct new magnific instance after generating the link and it works, but is there some cleaner solution? Thanks for any response.
score: 3
favorite count: 0
tagged with: magnific-popup
has comment: http://stackoverflow.com/comment/41130239
has answer: http://stackoverflow.com/a/26224543
type: AnsweredQuestion
has title: magnific popup on JS generated link
upvote count: 3
type: Question
linked to: http://stackoverflow.com/q/203198
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/41207957
has text: Works for me http://jsfiddle.net/0ynu7ej7/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26265710
score: 1

http://stackoverflow.com/a/26338507
answers question: http://stackoverflow.com/q/26337275
has comment: http://stackoverflow.com/comment/41351699
upvote count: 1
type: AcceptedAnswer
has body: If you only want to update an individual postId:: // index is the position in the list you want to update (0 for the first one) Posts.update( {_id: postId[index]}, { $addToSet: {'message': sometext}}); If you wanted to update the whole lot: Posts.update( {_id: { $in: postId }}, { $addToSet: {'message': sometext}});
has comment: http://stackoverflow.com/comment/41340630
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26337275

http://stackoverflow.com/q/26255402
tagged with: datepicker
tagged with: css
has answer: http://stackoverflow.com/a/26257854
type: AnsweredQuestion
has body: I have a few Jquery datepickers on form. $('#start, #end').datepicker({ changeYear: true, dateFormat: 'yy', onChangeMonthYear: function (dateText, inst) { var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val(); $(this).datepicker('setDate', new Date(year, 1)); } }); $("#fulldate").datepicker({dateFormat: "dd-mm-yy"}); I need to hide some fields in first datepicker calls, and nothing change in last call. If i wrote something like this it change all instance of datepicker. .ui-datepicker-calendar, .ui-datepicker-month { display: none; } Thx for help.
possible better answer: http://stackoverflow.com/a/26255596
has answer: http://stackoverflow.com/a/26255596
type: Question
has comment: http://stackoverflow.com/comment/41190777
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26257854
tagged with: javascript
tagged with: jquery
has title: Custom css for only few jquery datepickers?
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41187371
linked to: http://stackoverflow.com/q/6832622

http://stackoverflow.com/a/26233352
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26232752
has body: try this HTML Question Show Hide some text Script $(document).ready(function () { $("#txtBoxId").hide(); $("input[name='showhide']").on("click", function () { var option = $(this).attr('value'); if (option == "yes") { $("#txtBoxId").show(); } else { $("#txtBoxId").hide(); } }); }); Fiddle Sample
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26232752

http://stackoverflow.com/comment/41356908
has text: Thanks, this seemed to do the trick!
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26347659

http://stackoverflow.com/q/26261612
has comment: http://stackoverflow.com/comment/41208064
has title: When using promises, should we use throw or reject when dealing with errors relating to incorrect arguments
answer count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/q
linked to: http://stackoverflow.com/q/21616432
has comment: http://stackoverflow.com/comment/41213377
has comment: http://stackoverflow.com/comment/41208117
has comment: http://stackoverflow.com/comment/41201794
linked to: http://stackoverflow.com/q/21887856
tagged with: promise
type: Question
has body: I'm using promises for async requests, and I'm wondering what's the best way to reject errors relating to invalid arguments (aka errors which can be detected immediately). I currently simply throw an error like what I normally do in a synchronous function, but wondering if this is bad practice and should I use the reject method of the promise instead? http://jsfiddle.net/7xv8f600/ function doSomething(time) { //option 1 if (typeof time !== 'number' || time &lt;= 0) throw new Error('invalid argument'); var deferred = Q.defer(); setTimeout(function() { deferred.resolve('yay'); }, time); return deferred.promise; }; doSomething('kappa').then(function(data) { console.log(data); }); function doSomething2(time) { var deferred = Q.defer(); //option 2 if (typeof time !== 'number' || time &lt;= 0) { deferred.reject(new Error('invalid argument')); } else { setTimeout(function() { deferred.resolve('yay'); }, time); } return deferred.promise; }; doSomething2('kappa').then(function(data) { console.log(data); }, function(err) { console.log(err); });
has comment: http://stackoverflow.com/comment/41209916
duplicate of: http://stackoverflow.com/q/21887856
linked to: http://stackoverflow.com/q/17866672
has comment: http://stackoverflow.com/comment/41213091
score: 0
has comment: http://stackoverflow.com/comment/41198313

http://stackoverflow.com/a/26266623
answers question: http://stackoverflow.com/q/26266005
score: 0
has body: You can't use string as key in object. You could possibly do it through eval function, but i don't recommend it. I would to it like this: function move(dir) { var distance = 25, dir = 'margin' + '-' + dir, animation = {}, previousValue = parseInt($element.css(dir), 10); animation[dir] = previousValue + 25; $element.animate(animation, 500); }; And here is the working example: http://jsfiddle.net/6o28x8bt/ Also this will animate just margins, if you want animate the element to direction as you click the button you will need to do increment/decrement left and right position or margin. Like example here: http://jsfiddle.net/jwL1e558/1/ Hope this will help :)
type: Answer

http://stackoverflow.com/comment/41226942
comment on: http://stackoverflow.com/q/26276680
has text: Ah, that's a nasty one. I would recommend a third party library for that, otherwise you'll get a real headache when trying to make is browser compatible. `knockout` for example, has a special binder for this sort of things (valueUpdate). I would recommend the tutorials. http://knockoutjs.com/documentation/value-binding.html
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41079713
type: Comment
has text: Skipping jQuery to compute the height won't "improve performance".
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26197375

http://stackoverflow.com/q/26216066
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26216336
upvote count: 3
has answer: http://stackoverflow.com/a/26216657
type: Question
has title: AngularJS filter by unique attribute value and get the filtered count
type: AnsweredQuestion
score: 3
has body: i have the following array: items: [ { id: "0", name: "כיבוי אורות", icon: "rooms_salon.svg", type: "scenario", status: 1 }, { id: "1", name: "הדלקת אורות", icon: "rooms_salon.svg", type: "scenario", status: 1 }, { id: "0", name: "תנור מטבח", icon: "rooms_salon.svg", type: "heater", status: 0 }, { id: "1", name: "מזגן מטבח", icon: "rooms_salon.svg", type: "ac", status: 0 }] i need to filter it so i get only unique item.type and the count of the original amount of items per type. the resolute i need: items: [ { type: "scenario", amount: 2 }, { type: "heater", amount: 1 }, { type: "ac", amount: 1 } ] What would be the best way to do so? P.O: i need to filter it in the controller, not in ng-repeat. Thanks allot Avi
has answer: http://stackoverflow.com/a/26216336
possible better answer: http://stackoverflow.com/a/26216657
answer count: 2

http://stackoverflow.com/q/26330161
tagged with: impress.js
has answer: http://stackoverflow.com/a/26330244
tagged with: javascript
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26330429
tagged with: jquery
tagged with: fancybox
tagged with: iframe
accepted answer: http://stackoverflow.com/a/26330244
possible better answer: http://stackoverflow.com/a/26330429
has title: Unable to Close Fancybox iFrame
type: AnsweredQuestion
has body: My issue is available at http://www.jeremiahbenes.com/#/portfolio by clicking on one of the tiles. I tested this in the latest release of Chrome for Mac and experienced the issue described below. I have implemented fancybox, but when the iFrame appears, I am unable to close it. The "x" in the top-right corner appears to be unclickable. Here is what I have for my implementation: GE Garage Envy The code I have for Fancybox is: Why does it not close? (On another note, how can I set it to automatically take up 95% of available height and width? I tried using autosize, but that does not work). Thanks for your help.

http://stackoverflow.com/q/26234872
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41148960
has answer: http://stackoverflow.com/a/26235125
type: Question
has comment: http://stackoverflow.com/comment/41149662
has answer: http://stackoverflow.com/a/26235456
has title: jquery dynamically created checkbox not working properly with function
answer count: 2
has body: I wrote a jquery for dynamic generation of check box as well as subtraction operation performed on text box with the value of checked check box. Jquery is working fine with predefined checkbox but not working with dynamically created checkbox. I tried solution like "ON" delegate but still i am struck here my code is like HTML Select One 92(11) 923(12) 9230(12) 9231(12) 9232(12) 9233(12) 9234(12) 925(12) Ports Working Fine JQuery $(document).ready(function(){ $('#destination').change(function(){ $( ".dev" ).remove(); $( "#button1" ).before(" Not Working "); }); var $cbs = $('.checkbox'); function calcUsage(){ var total = 0; //$("#more").val(); $cbs.each(function() { if ($(this).is(':checked')) { // total = parseFloat(total) + parseFloat($(this).val()); total = parseFloat($(this).val()); } }); $("#port").val($("#port").val()-total); if($("#port").val()<0) { alert("Check Your Port Capacity"); } } //For checkboxes $cbs.click(function() { calcUsage(); }); }); JSFiddle Link (*this is a sample code but i am populating checkbox on AJAX call for selected destination)
has comment: http://stackoverflow.com/comment/41149244
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41149111
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26254436
favorite count: 0
has body: I've been using tablesorter a lot in my website like this $(".tablesorter").tablesorter({ widgets: ['zebra'], dateFormat: 'uk', }); But i've a problem with date in the format : MM/YYYY (it's when I don't have the day I prefer showing 12/2005 than 00/12/2005). This format does not work with tablesorter dateFormat uk. How to make it working ? And the difficulty is that I can have in the same table differents formats like this : Date - Title 11/2005 - Movie 1 12/11/2005 - Movie 2 2006 - Movie 3 Thank you.
accepted answer: http://stackoverflow.com/a/26255700
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: tablesorter
has answer: http://stackoverflow.com/a/26255700
has title: Tablesorter and date mm/yyyyy
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41182605
type: AnswerComment
score: 0
type: Comment
has text: But it works even if I had signed out from the chrome account
comment on: http://stackoverflow.com/a/26251520

http://stackoverflow.com/comment/41340351
type: Comment
has text: I don't quite understand... So the onchange="name=this.value;" does that set the value name? because I haven't set var name... I tried it out and its not working
comment on: http://stackoverflow.com/a/26338742
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41090789
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26203725
type: Comment
has text: I have an extremely hacky version of something here, but it is fragile and only allows simple routes to match: https://github.com/natew/react-base (see make-webpack-config) and (app/routes.js)

http://stackoverflow.com/q/26195975
accepted answer: http://stackoverflow.com/a/26196012
upvote count: 3
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26196012
type: AnsweredQuestion
score: 3
downvote count: 0
has title: Regex to match only comma's but not inside multiple parentheses
has body: Okay, i have this case where comma are inside parenthesis, I want to match the commas that are only outside the parenthesis. Input : color-stop(50%,rgb(0,0,0)), color-stop(51%,rgb(0,0,0)), color-stop(100%,rgb(0,0,0))) Output(i'm looking for):color-stop(50%,rgb(0,0,0))**,** color-stop(51%,rgb(0,0,0))**,** color-stop(100%,rgb(0,0,0))) And this is my regex:- /(?![^(]*\)),/g The sad part is, it doesn't work when there is a multiple parenthesis :( Regex
favorite count: 0
has comment: http://stackoverflow.com/comment/41077034
type: Question
tagged with: regex

http://stackoverflow.com/a/45340493
type: Answer
answers question: http://stackoverflow.com/q/26261035
score: 0
has body: In D3, there are layout functions that transform the data into nodes with layout data; dx, dy, x, y, etc added. If you are using the latest version of D3, version 4 at the time of this writing, then the API is a little different. This following line from version 3 d3.layout.treemap() In version 4 the line should be: d3.hierarchy(data) Here's a good tutorial on the different layout functions in D3's latest version. Hope that helps. Your layout function may vary depending on what kind of TreeMap you're trying to create. (Partition, vanilla TreeMap, etc.) http://d3indepth.com/layouts/

http://stackoverflow.com/comment/41298766
type: AnswerComment
comment on: http://stackoverflow.com/a/26316367
type: Comment
has text: why did you use elem instead of this?
score: 0

http://stackoverflow.com/comment/41323573
comment on: http://stackoverflow.com/a/26329820
has text: i want to give onclick in html
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26245088
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has body: I have this: &lt;input class="inline" id="imgInput" name='imgInput' type="file" ng-file-select="saveImage($files)" accept="image/*" data-ng-model="inputImage"&gt; It works in Mozilla and Chrome, but in Safari I can choose any kind of file. How can I get the input to accept only image files in Safari?
has comment: http://stackoverflow.com/comment/41169107
tagged with: safari
type: Question
has answer: http://stackoverflow.com/a/26245810
tagged with: javascript
has comment: http://stackoverflow.com/comment/41168830
score: 0
has title: How to allow input type=file to accept only images files in Safari
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41168888

http://stackoverflow.com/comment/41259897
has text: You're mixing up things. You're using MVC with a model generated server side and then MVVM on the client, then you have two different models and technologies in a single view. That's plain wrong. Use either MVVM or MVC; but don't mix them up!
type: Comment
comment on: http://stackoverflow.com/q/26283580
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41252764
has text: It should definitely be an array. Your current code gives a syntax error.
type: Comment
comment on: http://stackoverflow.com/q/26291008
score: 0
type: QuestionComment

http://stackoverflow.com/q/26221696
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26223796
has comment: http://stackoverflow.com/comment/41126577
type: UnansweredQuestion
has body: I have a chart that's displaying a flow of hashtags based on when they were posted. I want to have the x-axis display the time in an hourly fashion starting from 00:00 and with 1 hour in between display the entire cycle of 24 hours up to 23:00. Here's the problem, it only shows 00:00-22:00 and I can't for the life of me understand why. Here's the code: var Chart = (function () { function Chart() { var _this = this; this.data = { "TW": [174, 5, 278, 269, 282, 283, 271, 316, 251, 265, 273, 261, 265, 265, 45, 45, 60, 60, 46, 370, 428, 465, 404, 372], "IG": [266, 217, 221, 240, 220, 206, 193, 219, 186, 233, 213, 213, 243, 243, 109, 115, 128, 136, 196, 360, 483, 432, 382, 303], "GP": [31, 14, 13, 17, 14, 11, 8, 13, 12, 11, 20, 45, 22, 29, 17, 19, 27, 21, 18, 24, 37, 35, 20, 21], "total": 12009, "toptags": [{ "tag": "#paradisehotelSE", "count": 3600 }, { "tag": "#TV4", "count": 3240 }, { "tag": "#IdolSE", "count": 3126 }] }; this.load(function () { _this.googleplus = _this.getData('googleplus'); _this.twitter = _this.getData('twitter'); _this.instagram = _this.getData('instagram'); _this.init(); }); Chart.prototype.init = function () { var hour = 3600 * 1000; $('#graph').highcharts({ chart: { backgroundColor: 'none', type: 'spline', spacingBottom: 0, spacingTop: 0, spacingLeft: 1, spacingRight: 1, width: null, height: 270, animation: 2000 }, title: { text: '' }, subtitle: { text: '' }, legend: { enabled: false }, credits: { enabled: false }, xAxis: { labels: { y: 12, align: 'left', style: { color: 'white', fontWeight: 'normal', fontFamily: 'Open Sans' } }, showLastLabel: false, tickmarkPlacement: 'on', tickPosition: 'inside', tickWidth: 0, tickPixelInterval: 60, lineWidth: 2, lineColor: 'rgba(255,255,255,0.6)', maxPadding: 0, minPadding: 0, gridLineWidth: 0, offset: 20, startOnTick: true, type: 'datetime', dateTimeLabelFormats: { day: '%H:%M' } }, yAxis: { minorTickPosition: 'inside', gridLineColor: 'rgba(255,255,255,0.3)', gridLineWidth: 0, title: { enabled: false, text:…
has comment: http://stackoverflow.com/comment/41128284
type: Question
tagged with: highcharts
has title: Highcharts 24 hour clock
tagged with: javascript
score: 0

http://stackoverflow.com/a/26202388
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41089016
has comment: http://stackoverflow.com/comment/41093630
upvote count: 2
has body: var parser = new DOMParser(); var parsed = parser.parseFromString(yourXMLStringLoadedViaAjax, 'text/xml'); var textfieldConetent = parsed.querySelector('textfield').innerHTML;
type: Answer
answers question: http://stackoverflow.com/q/26202343

http://stackoverflow.com/comment/41309692
type: Comment
has text: Do you mind making a jsfiddle so I can see the code in action? (And hopefully better understand what you want)
comment on: http://stackoverflow.com/q/26322374
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41233461
type: Comment
type: QuestionComment
has text: All my js files are included at the bottom of my code to make it load faster
comment on: http://stackoverflow.com/q/26280708
score: 0

http://stackoverflow.com/a/26342057
has comment: http://stackoverflow.com/comment/41347337
has comment: http://stackoverflow.com/comment/41347042
accepted answer of: http://stackoverflow.com/q/26341871
answers question: http://stackoverflow.com/q/26341871
has body: You need to reference right.js as well. See jsfiddle. http://cdn.rightjs.org/right.js
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41347486
score: 2
downvote count: 0
upvote count: 2
type: Answer

node.js
tags question: http://stackoverflow.com/q/26269743
tags question: http://stackoverflow.com/q/26338811
tags question: http://stackoverflow.com/q/26278800
tags question: http://stackoverflow.com/q/26213230
tags question: http://stackoverflow.com/q/26262890
tags question: http://stackoverflow.com/q/26250176
tags question: http://stackoverflow.com/q/26206900
tags question: http://stackoverflow.com/q/26197235
tags question: http://stackoverflow.com/q/26318179
tags question: http://stackoverflow.com/q/26208741
tags question: http://stackoverflow.com/q/26316792
tags question: http://stackoverflow.com/q/26221607
tags question: http://stackoverflow.com/q/26324169
tags question: http://stackoverflow.com/q/26218935
tags question: http://stackoverflow.com/q/26319250
tags question: http://stackoverflow.com/q/26209295
tags question: http://stackoverflow.com/q/26216588
tags question: http://stackoverflow.com/q/26223339
tags question: http://stackoverflow.com/q/26241010
tags question: http://stackoverflow.com/q/26207690
tags question: http://stackoverflow.com/q/26198157
tags question: http://stackoverflow.com/q/26270064
tags question: http://stackoverflow.com/q/26309107
tags question: http://stackoverflow.com/q/26279422
tags question: http://stackoverflow.com/q/26273550
tags question: http://stackoverflow.com/q/26289467
tags question: http://stackoverflow.com/q/26297337
tags question: http://stackoverflow.com/q/26275854
tags question: http://stackoverflow.com/q/26339593
tags question: http://stackoverflow.com/q/26232429
tags question: http://stackoverflow.com/q/26344294
tags question: http://stackoverflow.com/q/26289359
tags question: http://stackoverflow.com/q/26213255
tags question: http://stackoverflow.com/q/26264446
tags question: http://stackoverflow.com/q/26195551
tags question: http://stackoverflow.com/q/26240114
tags question: http://stackoverflow.com/q/26268615
tags question: http://stackoverflow.com/q/26222305
tags question: http://stackoverflow.com/q/26250758
tags question: http://stackoverflow.com/q/26343765
tags question: http://stackoverflow.com/q/26266469
tags question: http://stackoverflow.com/q/26247001
tags question: http://stackoverflow.com/q/26313573
tags question: http://stackoverflow.com/q/26301757
tags question: http://stackoverflow.com/q/26263284
tags question: http://stackoverflow.com/q/26206086
tags question: http://stackoverflow.com/q/26304263
tags question: http://stackoverflow.com/q/26326705
tags question: http://stackoverflow.com/q/26287859
tags question: http://stackoverflow.com/q/26197259
tags question: http://stackoverflow.com/q/26205877
tags question: http://stackoverflow.com/q/26208664
tags question: http://stackoverflow.com/q/26206156
tags question: http://stackoverflow.com/q/26217681
tags question: http://stackoverflow.com/q/26268651
tags question: http://stackoverflow.com/q/26288589
tags question: http://stackoverflow.com/q/26347326
tags question: http://stackoverflow.com/q/26312526
tags question: http://stackoverflow.com/q/26206068
tags question: http://stackoverflow.com/q/26334873
tags question: http://stackoverflow.com/q/26212384
tags question: http://stackoverflow.com/q/26245834
tags question: http://stackoverflow.com/q/26311600
tags question: http://stackoverflow.com/q/26314740
tags question: http://stackoverflow.com/q/26278077
tags question: http://stackoverflow.com/q/26287983
tags question: http://stackoverflow.com/q/26326027
tags question: http://stackoverflow.com/q/26314735
tags question: http://stackoverflow.com/q/26319633
tags question: http://stackoverflow.com/q/26302898
tags question: http://stackoverflow.com/q/26324837
tags question: http://stackoverflow.com/q/26243785
tags question: http://stackoverflow.com/q/26295169
tags question: http://stackoverflow.com/q/26243323
tags question: http://stackoverflow.com/q/26279331
tags question: http://stackoverflow.com/q/26300229
tags question: http://stackoverflow.com/q/26350068
tags question: http://stackoverflow.com/q/26328037
tags question: http://stackoverflow.com/q/26285061
tags question: http://stackoverflow.com/q/26227505

http://stackoverflow.com/comment/41229137
score: 0
has text: why do you say is atypical? For example, how do you let the user dynamically add fields to a form? (assuming each field correspond to a directive), and of course if you have a limited set of directives, hiding/showing could do the trick, but that's not the idea of the question.
type: AnswerComment
comment on: http://stackoverflow.com/a/26270851
type: Comment

http://stackoverflow.com/a/26234362
upvote count: 2
score: 2
has body: pass the value which needs to be set as parameter in .val() : $("#idSelect").val('0');
downvote count: 0
answers question: http://stackoverflow.com/q/26234342
type: Answer

http://stackoverflow.com/comment/41228844
score: 0
comment on: http://stackoverflow.com/a/26277875
type: Comment
has text: Hello what I want is that on the onchange event of select filter it will query again to the DB. I think $_POST[] cannot achieve it
type: AnswerComment

http://stackoverflow.com/a/26209080
score: 3
upvote count: 3
has body: Have you tried using JQuery? try this $('input[type=radio][name=sex]').change(function() { if (this.value == 'female') { $("#AgeId").prop("readonly",true); } else{ $("#AgeId").prop("readonly",false); } });
downvote count: 0
has comment: http://stackoverflow.com/comment/41101398
type: Answer
answers question: http://stackoverflow.com/q/26208992
has comment: http://stackoverflow.com/comment/41101050

tomcat
tags question: http://stackoverflow.com/q/26330646
tag name: tomcat
type: Tag

http://stackoverflow.com/comment/44351090
has text: drsjb80 and @paa can you guys please go to this bugzilla topic and post details on how to replicate. I tested this, i created two test cases (at bugzilla topic). I couldn't reproduce the bug. It actually seems window has the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1121322
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26222092
score: 0

http://stackoverflow.com/a/26199646
has comment: http://stackoverflow.com/comment/41083884
downvote count: 0
has body: You are not waiting on the callback for hset I would change it so it uses a callback. this.createPage = function (page, callback) { incrCount(function (err, results) { if (err) { callback(err); } else { page.id = results; self.updatePage(page, function(err) { callback(err, {id: results}); }); } }); }; this.updatePage = function (page, callback) { client.hset("pages", page.id, JSON.stringify(page), callback); }; Then change your code to see if it makes any difference var dao = new Dao(port, address); dao.createPage({testpage: "testcontent"}, function(err, page) { if (err) { return console.log(err) } dao.getPages(printResults); }); The problem with the below code is getPages may be called before the incr and hset are done, so it returns no pages. dao.createPage({testpage: "testcontent"}); dao.getPages(printResults);
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26198812

http://stackoverflow.com/q/26283721
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41239401
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27400201
upvote count: 5
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41239212
answer count: 1
has title: Angular js IE11 Bug - Invalid argument
favorite count: 0
has comment: http://stackoverflow.com/comment/41239134
has comment: http://stackoverflow.com/comment/51847569
has body: I have a bug in my angular project only happens in IE, see issue below: Error: Invalid argument. at interpolateFnWatchAction (http://localhost:51051/scripts/angular.js:6898:19) at Scope.prototype.$digest (http://localhost:51051/scripts/angular.js:12395:23) at Scope.prototype.$apply (http://localhost:51051/scripts/angular.js:12660:13) at done (http://localhost:51051/scripts/angular.js:8272:34) at completeRequest (http://localhost:51051/scripts/angular.js:8477:7) at xhr.onreadystatechange (http://localhost:51051/scripts/angular.js:8416:11) I have got some placeholders on some of the pages, I have tried removing them but the issue still happing. Any ideas? Thanks

http://stackoverflow.com/comment/41188327
score: 0
has text: no it is not coming under breakpint. what should I do?
comment on: http://stackoverflow.com/q/26255017
type: QuestionComment
type: Comment

http://stackoverflow.com/a/50574759
has body: This is IFrame Click me
type: Answer
score: 3
answers question: http://stackoverflow.com/q/26285955
downvote count: 0
has comment: http://stackoverflow.com/comment/88159838
upvote count: 3

http://stackoverflow.com/comment/41288871
type: Comment
type: QuestionComment
score: 2
has text: You *could* but it doesn't really solve the problem, because anyone could just pop open the console and view the index.js source. Ideally, you would make the API call on the server side, and then pass the results up to the browser.
comment on: http://stackoverflow.com/q/26310813

http://stackoverflow.com/q/26271839
has title: Pulling the Lat and Long from a URL
score: 0
has body: I have URL's that look like this: var results['GoogleLink'] = http://maps.google.com/?q=33.6745%2C%20-117.167%20(%22Menifee+Valley+Farmers+Market%22) From this, I want: 33.6745%2C%20-117.167%20 I tried this (crappy non-working trial) var expression = '/\/?q=\/(.*)/[1]'; var regex = new RegExp(expression); var original = results['GoogleLink']; How can I parse this string and return the part I want?
accepted answer: http://stackoverflow.com/a/26272142
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26272089
type: Question
has answer: http://stackoverflow.com/a/26272089
answer count: 2
has answer: http://stackoverflow.com/a/26272142
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26341941
answer count: 1
tagged with: webrtc
has title: Getting virtual IP address of thin client in Javascript
type: UnansweredQuestion
has body: Don't know whether it is doable. We are currently using terminal server and thin clients in our network and planning to get each of its virtual IP addresses using Javascript to handle an application that runs on each thin clients. It is currently now returning all the virtual IPs that are assigned for each thin clients. Is there any way that I can get only the assigned virtual IP address for one particular thin client? Below is the code which returns all virtual IP address Please let me know if anything is unclear. Thanks in advance
has comment: http://stackoverflow.com/comment/41345948
has comment: http://stackoverflow.com/comment/41347214
has comment: http://stackoverflow.com/comment/41347051
has comment: http://stackoverflow.com/comment/41346012
has answer: http://stackoverflow.com/a/26342641
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41346112
has comment: http://stackoverflow.com/comment/41345906
score: 0

http://stackoverflow.com/comment/41276164
type: Comment
has text: Sounds good! I will alter my code to use class instead. Thank you again!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26302192

http://stackoverflow.com/a/26196971
answers question: http://stackoverflow.com/q/26196947
type: Answer
upvote count: 0
has body: you can, but you have to make tags with &lt;script text...&gt;&lt;/script&gt; I dont see a problem why wouldnt call it, but it would ruin organization. So better make seperate file and include it in html page.
downvote count: 2
score: -2

http://stackoverflow.com/q/26315234
tagged with: boonex-dolphin
has title: How do I install HTML5 Video.js into Boonex Dolphin?
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28059685
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: video
type: AnsweredQuestion
has body: currently I am trying to use the Video.js Source Code to change the current video player on my website that uses Boonex Dolphin, in essense I want to replace the flash player it uses and switch to HTML5, Dolphin uses modules and in those modules they point to specific files. I don't know which files weather or no if they are HTML files or PHP files or where in those files what I need to change, I have a general idea though. I just need to be put in the correct direction. Thanks if someone reply's, sorry if I this is the wrong place to ask or if it already has been asked ( I searched first).
type: Question
accepted answer: http://stackoverflow.com/a/28059685

http://stackoverflow.com/q/26224034
tagged with: requirejs
tagged with: r.js
type: AnsweredQuestion
has body: I'm trying to understand the benefits of the popular r.js. It seems to... concatenate a list of manually selected JavaScript files uglify/minimize that combined code do some similar stuff for CSS files (combine them) Also, (what it makes it different from generic combine/minify tools) it seems to... convert Node-style require() modules to AMD style modules name anonymous modules (eg. define(['dependency'], function(){...}) offer some support for loader plugins, e.g. inline CSS files It does not seem to... analyze and automatically resolve dependencies found in files (like, include file foo.js into the package just because r.js finds a define(["foo"], ...) Is this correct, or did I miss something?
has comment: http://stackoverflow.com/comment/41137914
tagged with: javascript
tagged with: amd
has answer: http://stackoverflow.com/a/26225783
accepted answer: http://stackoverflow.com/a/26225783
has comment: http://stackoverflow.com/comment/41129992
type: Question
has comment: http://stackoverflow.com/comment/41129912
score: 5
answer count: 1
has title: What does r.js really do?
favorite count: 0
has comment: http://stackoverflow.com/comment/54827587
has comment: http://stackoverflow.com/comment/41129706
has comment: http://stackoverflow.com/comment/41129737
upvote count: 5
downvote count: 0

http://stackoverflow.com/comment/41125593
has text: Yes, I got the `queries` array retrieved from the `localStorage` using `console.log(angular.fromJson(localStorage.queries));`, both the times it showed only the last element added to the `queries` array.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26221861

http://stackoverflow.com/a/26270189
answers question: http://stackoverflow.com/q/26270071
score: 0
type: Answer
has body: Usually we need to call function in some place for the code inside it to get executed. But Immediately-invoked function are different. which means you need not call this function anywhere for it to get executed. it would get executed on its on.Adding (); at the end makes it to get executed immediately.

http://stackoverflow.com/q/26213503
has answer: http://stackoverflow.com/a/32073663
score: 1
tagged with: node.js
has title: Sails js Undeclared Variable: NaN when modelling associations
has comment: http://stackoverflow.com/comment/41649018
type: UnansweredQuestion
has body: I have two Models in Sails - Users and Absences. A User has many records of Absences so i'm trying to do a One to Many association. They look like this: User.js in attributes: id: { type: 'integer', unique: true, primaryKey: true, columnName: 'idx' }, absences: { collection: 'absence', via: 'idxuser' } Absence.js in attributes: id: { type: 'integer', unique: true, primaryKey: true, columnName: 'idx' }, idxuser: { model: 'user' } But when I call a user record I get this error: Error (E_UNKNOWN) :: Encountered an unexpected error ER_SP_UNDECLARED_VAR: Undeclared variable: NaN and the stack trace references the sails-mysql module. I'm using: sails 0.10.5 sails-mysql 0.10.6 node 0.10.25
upvote count: 1
tagged with: sails.js
tagged with: mysql
tagged with: waterline
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 1

http://stackoverflow.com/q/26212348
answer count: 1
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: multithreading
tagged with: animation
has body: I have recently learned about requestAnimationFrame and how it can be used to schedule animation code in sync with the browser's internal draw loop. But I am still a bit unclear about how the browser handles this type of scheduling. Will it interrupt my scripts if necessary to perform animations? Consider the following bit of javascript code: function doStuff() { var animated = false; var animation = function() { // perform animation animated = true; } requestAnimationFrame(animation); // perform more operations here // Q: is animated guaranteed to be false here?? } I know that Javascript is essentially single-threaded so my gut feeling is that under no circumstances should animation() have been called already when we reach the last line of doStuff(). But hopefully someone here can give a more informed answer.
has answer: http://stackoverflow.com/a/26212465
upvote count: 1
has title: Can my javascript function be interrupted by an animation frame
tagged with: requestanimationframe
accepted answer: http://stackoverflow.com/a/26212465
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/q/26332173
has comment: http://stackoverflow.com/comment/41328188
has answer: http://stackoverflow.com/a/26332269
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/26332237
possible better answer: http://stackoverflow.com/a/26332212
has comment: http://stackoverflow.com/comment/41328712
has comment: http://stackoverflow.com/comment/41328013
tagged with: javascript
has comment: http://stackoverflow.com/comment/41328054
tagged with: prototype
upvote count: 2
has body: var log = function (e, clear) { if (clear === true) { this.clear(); } console.log(e); }; log.prototype = { clear: function () { console.clear(); } }; i'm calling like this. log('hi', true); it says clear is undefined. I also tried log.clear(); but same undefined.
answer count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/41328057
has comment: http://stackoverflow.com/comment/41328026
accepted answer: http://stackoverflow.com/a/26332269
favorite count: 0
has comment: http://stackoverflow.com/comment/41328205
has answer: http://stackoverflow.com/a/26332212
linked to: http://stackoverflow.com/q/16063394
has title: call a javascript prototype object method from main class

http://stackoverflow.com/comment/41107803
type: QuestionComment
comment on: http://stackoverflow.com/q/26212691
has text: It depends a bit upon what environment the openreport.js script was written for (browser, node, etc...). You can execute javascript scripts on Unix using something like node.js.
score: 0
type: Comment

http://stackoverflow.com/q/26348822
score: 0
has answer: http://stackoverflow.com/a/29243400
has comment: http://stackoverflow.com/comment/41364715
answer count: 1
tagged with: meteor
linked to: http://stackoverflow.com/q/3326650
type: UnansweredQuestion
type: Question
tagged with: internet-explorer
tagged with: javascript
has title: Meteor: Fixing console is undefined in Internet Explorer
has body: I tried fixing the error as has been suggested in other SO answers, but I continue to get the error. Any ideas why? I tried using the following fix from here: 'console' is undefined error for Internet Explorer and sticking it in a Meteor.startup in a client-side js file, but it didn't work. Meteor.startup(function () { /** * Protect window.console method calls, e.g. console is not defined on IE * unless dev tools are open, and IE doesn't define console.debug */ (function() { if (!window.console) { window.console = {}; } // union of Chrome, FF, IE, and Safari console methods var m = [ "log", "info", "warn", "error", "debug", "trace", "dir", "group", "groupCollapsed", "groupEnd", "time", "timeEnd", "profile", "profileEnd", "dirxml", "assert", "count", "markTimeline", "timeStamp", "clear" ]; // define undefined methods as noops to prevent errors for (var i = 0; i < m.length; i++) { if (!window.console[m[i]]) { window.console[m[i]] = function() {}; } } })(); }); Should I be sticking this code somewhere else?

openid-connect
tags question: http://stackoverflow.com/q/26259709
tag name: openid-connect
type: Tag

ajax
tags question: http://stackoverflow.com/q/26240813
tags question: http://stackoverflow.com/q/26246666
tags question: http://stackoverflow.com/q/26330910
tags question: http://stackoverflow.com/q/26278352
tags question: http://stackoverflow.com/q/26212799
tags question: http://stackoverflow.com/q/26320432
tags question: http://stackoverflow.com/q/26299262
tags question: http://stackoverflow.com/q/26240333
tags question: http://stackoverflow.com/q/26274854
tags question: http://stackoverflow.com/q/26285461
tags question: http://stackoverflow.com/q/26205796
tags question: http://stackoverflow.com/q/26237925
tags question: http://stackoverflow.com/q/26326836
tags question: http://stackoverflow.com/q/26288837
tags question: http://stackoverflow.com/q/26284385
tags question: http://stackoverflow.com/q/26268160
tags question: http://stackoverflow.com/q/26329321
tags question: http://stackoverflow.com/q/26233127
tags question: http://stackoverflow.com/q/26344185
tags question: http://stackoverflow.com/q/26267960
tags question: http://stackoverflow.com/q/26202309
tags question: http://stackoverflow.com/q/26247809
tags question: http://stackoverflow.com/q/26228813
tags question: http://stackoverflow.com/q/26318458
tags question: http://stackoverflow.com/q/26346238
tags question: http://stackoverflow.com/q/26232588
tags question: http://stackoverflow.com/q/26265139
tags question: http://stackoverflow.com/q/26220006
tags question: http://stackoverflow.com/q/26209956
tags question: http://stackoverflow.com/q/26279427
tags question: http://stackoverflow.com/q/26285594
tags question: http://stackoverflow.com/q/26319180
tags question: http://stackoverflow.com/q/26220717
tags question: http://stackoverflow.com/q/26313551
tags question: http://stackoverflow.com/q/26292591
tags question: http://stackoverflow.com/q/26330593
tags question: http://stackoverflow.com/q/26225271
tags question: http://stackoverflow.com/q/26198595
tags question: http://stackoverflow.com/q/26302935
tags question: http://stackoverflow.com/q/26258621
tags question: http://stackoverflow.com/q/26227225
type: Tag
tags question: http://stackoverflow.com/q/26199948
tags question: http://stackoverflow.com/q/26250696
tags question: http://stackoverflow.com/q/26294203
tags question: http://stackoverflow.com/q/26316858
tags question: http://stackoverflow.com/q/26345522
tags question: http://stackoverflow.com/q/26316294
tags question: http://stackoverflow.com/q/26244999
tags question: http://stackoverflow.com/q/26199712
tags question: http://stackoverflow.com/q/26223361
tags question: http://stackoverflow.com/q/26204427
tags question: http://stackoverflow.com/q/26339481
tags question: http://stackoverflow.com/q/26201039
tags question: http://stackoverflow.com/q/26226779
tags question: http://stackoverflow.com/q/26318044
tags question: http://stackoverflow.com/q/26333522
tags question: http://stackoverflow.com/q/26322165
tags question: http://stackoverflow.com/q/26347802
tags question: http://stackoverflow.com/q/26276881
tags question: http://stackoverflow.com/q/26259235
tags question: http://stackoverflow.com/q/26267369
tags question: http://stackoverflow.com/q/26242527
tags question: http://stackoverflow.com/q/26228700
tags question: http://stackoverflow.com/q/26349474
tags question: http://stackoverflow.com/q/26252620
tags question: http://stackoverflow.com/q/26226248
tags question: http://stackoverflow.com/q/26229992
tags question: http://stackoverflow.com/q/26266734
tags question: http://stackoverflow.com/q/26234235
tags question: http://stackoverflow.com/q/26197968
tags question: http://stackoverflow.com/q/26239955
tags question: http://stackoverflow.com/q/26273833
tags question: http://stackoverflow.com/q/26270959
tags question: http://stackoverflow.com/q/26348004
tags question: http://stackoverflow.com/q/26255102
tags question: http://stackoverflow.com/q/26344939
tags question: http://stackoverflow.com/q/26307545
tags question: http://stackoverflow.com/q/26259943
tags question: http://stackoverflow.com/q/26250441

http://stackoverflow.com/q/26205535
has comment: http://stackoverflow.com/comment/41094169
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26206542
tagged with: css
tagged with: cordova
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41094462
type: Question
has title: Increase checkbox size - Phonegap Android
tagged with: javascript
answer count: 1
has body: I'm developing a quiz app using Phonegap, thus HTML, JavaScript & CSS - no other frameworks. My issue is that the checkboxes appear very small on Android devices. I tried setting the width & height of input[type=checkbox] to 2em in my CSS and this works in Chrome and the emulator, but not on actual devices (tested using a Samsung S4 Mini & Asus TF101). The checkboxes are used inside an unordered list - here's the HTML: Answer A Answer B And here's the relevant CSS: body { -webkit-touch-callout: none; -webkit-text-size-adjust: none; -webkit-user-select: none; font-family: arial; background-color:white; height: 100%; width: 100%; padding: 0; margin: 0; font-size: medium; font-size: 1.5em; } .savvy_app { position: absolute; overflow: auto; margin: 0; padding: 10px 5px 0 5px; top: 73px; bottom: 2px; max-width: 100%; min-width: 98%; } input[type=checkbox] { width: 2em; height: 2em; } .challenge ul { list-style-type: none; padding-left: 10px; } .challenge ul li, .results ul li { font-family: georgia; font-weight: normal; position: relative; border: none; margin-bottom: 5px; padding-bottom: 0; } .challenge label, .results label { display: block; padding-left: 50px; padding-top: 5px; } .challenge input, .results input { display: inline; margin-left: -50px; position: absolute; } What am I missing?

http://stackoverflow.com/comment/41235072
has text: @SterlingArcher happens! :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26281468

http://stackoverflow.com/q/26315100
has answer: http://stackoverflow.com/a/26315194
accepted answer: http://stackoverflow.com/a/26315194
type: Question
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41296268
favorite count: 0
has title: JAVASCRIPT : Parameter Passed Is "Not Defined"
score: 0
has comment: http://stackoverflow.com/comment/41296277
answer count: 1
has comment: http://stackoverflow.com/comment/41296128
tagged with: php
downvote count: 1
type: AnsweredQuestion
has body: I'm creating a page that should read data from the database, display it as a table, and allow row-wise editing of the entries (using AJAX calls). Here are brief code snippets where the problem comes - Javascript: function editParam(bname, button) { alert(bname); //this part doesn't happen, the error on console comes up before it tr = button.parentNode; while (tr && tr.nodeName.toUpperCase() !== "TR" && tr.nodeName.toUpperCase() !== "BODY") { tr = tr.parentNode; } if (!tr || tr.nodeName.toUpperCase() !== "TR") { return; } //some more code } PHP: //get $row_users['Name'] while ($row_users = mysqli_fetch_array($results)) { echo " //some Edit "; } My data in the column Name is like "B1", "C2", etc. Error onclick of button : B1 is not defined. While running the code for other text or numbers, it worked fine. So I understand that my problem has to do with the datatype. However, I do not know how resolve the same. Any suggestions would be much appreciated, thanks!

http://stackoverflow.com/a/26295025
has body: I believe the correct syntax is .prop('checked', true); For whatever you are trying to do. For example: $('tr:first-child td input[type=radio]').each(function(){ $(this).prop('checked', true); });
answers question: http://stackoverflow.com/q/26294952
score: 0
type: Answer

http://stackoverflow.com/q/26263262
score: -1
has body: What I am attempting to do is add and remove textboxes from a table when they are/are not needed. The function needs to execute when a user types into a textbox. The page loads with several textboxes that have this function as an even listener. The code has been giving me trouble so I put a break point (GC developer tool) at the beginning of the function and typed in a textbox. What happens is on the line: input.addEventListener("keypress", updateTextBox(TableName, input.id)); execution returns to the beginning of the of the function!? function updateTextBox(TableName, element) { var numCells = document.getElementById(TableName).rows.length - 1; var lastTxt = document.getElementById(TableName + numCells); var curNum = element.id.replace(/^\D+/g, ''); if (curNum != numCells &amp;&amp; element.text == "" &amp;&amp; lastTxt.text == "") { document.getElementById(TableName).deleteRow(numCells); } else if (element.text != "" &amp;&amp; lastTxt.text != "") { var input = document.createElement("input"); input.type = "text"; nextNum = numCells + 2; input.id = TableName + nextNum; input.addEventListener("keypress", updateTextBox(TableName, input.id)); newRow = document.getElementById(TableName).insertRow(); newCell = newRow.insertCell(); newCell.appendChild(input); } }
has title: eventlistener fires when I add it in javascript
accepted answer: http://stackoverflow.com/a/26263277
answer count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26263277
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/a/26308783
score: 1
upvote count: 1
downvote count: 0
has body: This is just a matter of timing. You are trying to add the grid when you add the record to the store and it takes a little time for the two things to be in sync. You should try putting your code on the rowinserted event handler of the grid.getView() . For your code to work the way you have it right now, simply change it to: store = new Ext.data.ArrayStore({ autoDestroy: true, storeId: 'myStore', idIndex: 0, fields: [ { name: 'group', type: 'string' } ], data: [], listeners: { add: function(t, records, index) { Ext.defer(function() { grid.startEditing(index, 0); },10); } } }); Doing this will give enough time for the info between the store and the grid to be in sync.
type: Answer
answers question: http://stackoverflow.com/q/26239056

http://stackoverflow.com/comment/41105968
has text: Whoops, sorry. I meant 'write code' of course. However, "a few years later" sounds like a long time, and as I said it won't be backwards compatible with then older browsers. So if you wish to support the Chinese market... Jokes.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26211412
score: 0

http://stackoverflow.com/comment/41168709
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26242423
score: 0
has text: Label can be applied in many different ways, the OP's way is still valid HTML.

http://stackoverflow.com/comment/41270114
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26278500
has text: @Alvaro I've just explained the reason of problem. Making hacks for IE is impossible task in some cases. Depending on things you need, you can select different ways. For example, use `position:fixed` to prevent scrolling when scrollbar dragged in IE for main content and set wrapper's height = main content's height (to show scrollbar) after page loaded. Or use `overflow:hidden` and write your own custom scrollbar that cannot be dragged.

http://stackoverflow.com/q/26232723
upvote count: 20
has comment: http://stackoverflow.com/comment/41181673
downvote count: 0
tagged with: javascript
has body: Maybe somebody can help me with a little problem. I am pretty new in the field of web programming, but I have programming experience. I would like to develop a small website that uses angularjs and ui-grid. Unfortunately the filtering is not working from external input fields. Could somebody please tell me where my programming bug is? The code can be found here: http://plnkr.co/edit/fiA666OzpBqpTrCiuXER?p=preview var myDummyData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; var myDummyData2 = [{name: "aTest", age: 50}, {name: "bTest1", age: 43}, {name: "cTest2", age: 27}, {name: "dTest3", age: 29}, {name: "eTest4", age: 34}]; $scope.filterOptions = { filterText: '' }; $scope.gridOpts = { data: myDummyData, enableFiltering: true, columnDefs: [ {name: 'Name', field: 'name', enableFiltering: true , filter: { term: $scope.filterOptions.filterText //DOES NOT WORK... BUT WHY } }, {name: 'Price', field: 'age'} ] }; $scope.updateData = function(newValue){ //console.log($scope.gridOpts.data); console.log($scope.gridOpts.columnDefs[0].filter); $scope.gridOpts.columnDefs[0].filter = {term: newValue}; console.log("Scope nameid set " + $scope.gridOpts.columnDefs[0].filter.term); //is set but no update //$scope.$apply(); //not possible gives error! WHY?? //$scope.gridOpts.data = myDummyData; //for testing works }; $scope.swapData = function () { if ($scope.gridOpts.data === myDummyData) { $scope.gridOpts.data = myDummyData2; } else { $scope.gridOpts.data = myDummyData; } }; //DOES NOT WORK BUT WHY // $scope.$watch('filterOptions.filterText', function (newValue, oldValue) { // if ($scope.filterOptions.filterText) { // $scope.filteringText = newValue; // $scope.updateData(newValue); // } // }); The idea is to have a navigation bar that contains a search field. Later I want to filter depending on rangesliders on further columns. However not even the standard string filtering works in my example…
answer count: 3
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/30724360
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/71396312
tagged with: angular-ui-grid
has title: Angularjs ui-grid Filter from text input field
has answer: http://stackoverflow.com/a/28509534
type: Question
score: 20

http://stackoverflow.com/comment/41151966
score: 0
has text: The goal of the data is to have the chapters information entered into excel then saved as a text file. I want to read that text file, iterate over it, and build my chapters information object in JavaScript which would allow me to display chapter titles, descriptions, and such.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26224387

http://stackoverflow.com/q/26235862
has answer: http://stackoverflow.com/a/26236043
accepted answer: http://stackoverflow.com/a/26236043
has comment: http://stackoverflow.com/comment/41151497
has comment: http://stackoverflow.com/comment/41153045
score: 0
has comment: http://stackoverflow.com/comment/41154112
has comment: http://stackoverflow.com/comment/41151467
answer count: 2
possible better answer: http://stackoverflow.com/a/26236285
has comment: http://stackoverflow.com/comment/41151600
has body: I have this xsl file: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/scenario"> <xsl:value-of select="./greeting"/> Name: <xsl:value-of select="@name"/> Description: <xsl:value-of select="@description"/> <xsl:for-each select="./*"> <xsl:apply-templates select="."/> </xsl:for-each> </xsl:template> <xsl:template match="scenario"> <xsl:value-of select="./greeting"/> Name: <xsl:value-of select="@name"/> Description: <xsl:value-of select="@description"/> <xsl:for-each select="./*"> <xsl:apply-templates select="."/> </xsl:for-each> </xsl:template> </xsl:stylesheet> The output for Javascript and JS file import part in firefox is this: I have no idea why the parser assumes all the tags are children of the first tag!!! I should mention that the scripts are trying to enable details tag in firefox and IE. I copied them from this url. This sample works in my computer. EDIT 1: I have changed line <xsl:output method="html"/> into <xsl:output method="html" omit-xml-declaration="yes/>; but it did not affect the rendered HTML file. Secondly I've added <xsl:comment/> between empty script tags; this try rendered tags as I wanted: But There is a problem yet; the scripts does not work. EDIT 2: Well, I finally get that working; there was a problem in addressing js files. I also added some styles into the tag as below: And I have added in the first line after . The arrow signs are not showing in the page. Is there anything wrong with the character encoding or what? EDIT 3: I also tried ; nothing changed.
has title: Import JS files and Javascript in XSLT
has comment: http://stackoverflow.com/comment/41152168
tagged with: http://stackoverflow.com/tag/xml
linked to: http://stackoverflow.com/q/5265202
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41152014
has comment: http://stackoverflow.com/comment/41152853
has comment: http://stackoverflow.com/comment/41152594
tagged with: xslt
type: Question
has comment: http://stackoverflow.com/comment/41151882
has answer: http://stackoverflow.com/a/26236285
tagged with: javascript

http://stackoverflow.com/a/26220436
upvote count: 2
has comment: http://stackoverflow.com/comment/41122672
has body: The value of a checkbox never changes (by itself). If the checkbox is not checked its value simply won't be sent to the server. So at the server side you should check whether one_by_one is included in the request and set the value accordingly (e.g. set 0 if it doesn't exist or the value of one_by_one if it does).
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26220352
has comment: http://stackoverflow.com/comment/41122871
score: 2

http://stackoverflow.com/q/26273735
score: 1
upvote count: 1
has title: How to link a WSDL file in a SOAP request in JavaScript?
type: Question
accepted answer: http://stackoverflow.com/a/26274033
tagged with: javascript
has body: The WSDL describes features of how to access and retrieve information from a site. I want to make a SOAP request in JavaScript and need to link to this file. I have the link to the WSDL file. But where and how do I link the WSDL file in my code?
tagged with: wsdl
answer count: 1
downvote count: 0
favorite count: 0
tagged with: soap
has answer: http://stackoverflow.com/a/26274033
type: AnsweredQuestion

http://stackoverflow.com/a/26280247
upvote count: 3
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26280154
answers question: http://stackoverflow.com/q/26280154
type: AcceptedAnswer
has body: To delete element from array, be it primitive value or object, you still use splice. To find element index you would use indexOf. It possible because: indexOf compares searchElement to elements of the Array using strict equality (the same method used by the ===, or triple-equals, operator). So combined together arr.splice(arr.indexOf(sub), 1); Take a look at this demo: var arr = [{a: 1, b: 2}, {c: 3, d: 4}] var sub = arr[1]; alert('Before: ' + JSON.stringify(arr)); arr.splice(arr.indexOf(sub), 1); alert('After: ' + JSON.stringify(arr));

http://stackoverflow.com/a/26288545
accepted answer of: http://stackoverflow.com/q/26226706
answers question: http://stackoverflow.com/q/26226706
score: 0
type: AcceptedAnswer
type: Answer
has body: So, it turns out I was pretty close, but just needed to do things a bit differently. What I ended up doing to solve it was iterate over every key, value of the args object parameter (which I get from arguments[0] in this case) detect if value is an object if so, assign the value of args[key] to an IIFE that returns a JSON representation of the object value. The IIFE turns out to be necessary because it maintains the value of value even when we change scope. Here's my completed and working Conditions class: var Conditions = function(){ var args = arguments[0]; //if we didn't call Conditions() with 'new', this next bit handles that if (!(this instanceof Conditions)){ return new Conditions(args); } //default value for 'args' if we don't have an arguments object if (!_.isObject(args)){ args = {}; } _.each(args, function(val, key, obj){ //detect where value is object if (_.isObject(val)){ //replace these values with objectToJSON(value) args[key] = (function(obj){ return(JSON.stringify(obj)) })(val); } }); return args; };

http://stackoverflow.com/comment/41125276
has text: Click toggle is deprecated and removed.
type: QuestionComment
comment on: http://stackoverflow.com/q/26221894
score: 0
type: Comment

http://stackoverflow.com/comment/41311177
type: AnswerComment
comment on: http://stackoverflow.com/a/26319756
score: 0
type: Comment
has text: it doesn't work for . I am hosting it on http://localhost:3000/ and the page that I want is on /register

http://stackoverflow.com/q/26269541
type: Question
has body: Scenario: I have been working with a jquery script that I've found that allows me show/hide the content to with Jquery:dotdotdot for multiple nested, floated columns. Problem: Now, when expanded, the floated content is overlapping the bottom border of the div.feature and the div.featureWrap container. I have already tried to force the div element to contain floats with overflow:hidden, but...no luck. Desired Result: I would like the selected div.feature and the div.featureWrap container to expand/collapse respectively. I'm sure it is something simple, but...I'm new to working with JS. Is it something that needs to happen with the destroy? I see div.css('max-height','')... Any help would be appreciated! See the jsfiddle:http://jsfiddle.net/cpardon/tt5htr3s/11/ Jquery: $(function () { $(".desc").dotdotdot({ ellipsis: '...', after: 'a.more', wrap: 'word', fallbackToLetter: true, callback: dotdotdotCallback, watch: 'window', height: null }); $(".desc").on('click', 'a', function () { if ($(this).text() == "More") { var div = $(this).closest('.desc'); div.trigger('destroy').find('a.more').hide(); div.css('max-height', ''); $("a.less", div).show(); } else { $(this).hide(); $(this).closest('.desc').css("max-height", "60px").dotdotdot({ after: "a.more", callback: dotdotdotCallback }); } }); function dotdotdotCallback(isTruncated, originalContent) { if (!isTruncated) { $("a", this).remove(); } } }); CSS: .left {float:left;} .clearboth {clear:both;} #featureWrap {width:100%;} #featureWrap .feature {width:100px;margin:0 5px;border:1px solid #CCC;padding:7px;} #featureWrap .feature .title {color:#777;padding:12px 0;font-size:20px;} #featureWrap .feature .desc {font-size:12px;line-height:19px;color:#555;max-height:60px;} #featureWrap .feature .desc a {color: rgb(224, 86, 40);text-decoration: none;} #featureWrap .feature .desc a:hover {color: #666;text-decoration: none;} #featureWrap .feature .desc a.less {display: none;}
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26269850
accepted answer: http://stackoverflow.com/a/26269850
upvote count: 1
favorite count: 0
has title: JQ:dotdotdot :: Expand parent (height) with floating child
downvote count: 0
tagged with: css
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/26312472
accepted answer: http://stackoverflow.com/a/26312554
has answer: http://stackoverflow.com/a/26312541
answer count: 2
tagged with: compatibility
downvote count: 0
possible better answer: http://stackoverflow.com/a/26312541
tagged with: javascript
has comment: http://stackoverflow.com/comment/41291683
has comment: http://stackoverflow.com/comment/41291640
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to detect browser types and IE compatibility from user agent and redirect accordingly. It works only in IE but not in Firefox and Chrome. I am still looking around the solution and cannot figure out yet. Testing Output UserAgent.js if (typeof jQuery == 'undefined') { document.write("\ \<\/script>"); } // Create new object var UserAgent = { init: function () { // Get the user agent string var ua = navigator.userAgent; this.compatibilityMode = false; this.firefox = ua.toLowerCase().indexOf("firefox") > -1; this.chrome = ua.toLowerCase().indexOf("chrome") > -1 if (ua.indexOf("MSIE 7.0") > -1) { this.compatibilityMode = true; } } }; // Initialize the object ieUserAgent.init();
has answer: http://stackoverflow.com/a/26312554
has title: Browser Detection and Compatibility Checking with Java Script
type: AnsweredQuestion
tagged with: browser-detection
upvote count: 1
type: Question
score: 1

http://stackoverflow.com/q/26296924
downvote count: 2
has comment: http://stackoverflow.com/comment/41263199
has comment: http://stackoverflow.com/comment/41263022
has answer: http://stackoverflow.com/a/26297275
has comment: http://stackoverflow.com/comment/41263108
type: Question
has answer: http://stackoverflow.com/a/26297260
has comment: http://stackoverflow.com/comment/41263735
has title: finding out the correct css path
has comment: http://stackoverflow.com/comment/41263233
linked to: http://stackoverflow.com/q/13354578
upvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am using a plugin call fullPage.js and I am wondering if I could use jquery to change the bullets of navigation on the right. So this is the HTML code of the navigation bar I am trying out and wondering how do I reach because this is the place to change the bullet to something I want to. I want to use ionicons.css icons. So for example, I tried doing this. $("#fp-nav#home span").addClass("icon ion-home"); This piece of code is not working and I am wondering did I get the path correctly?
has comment: http://stackoverflow.com/comment/41263021
favorite count: 0
has comment: http://stackoverflow.com/comment/41263065
has answer: http://stackoverflow.com/a/26297011
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: fullpage.js
score: -2
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41263147

http://stackoverflow.com/comment/41232967
type: QuestionComment
has text: You stop submit event with return false. So it does nothing, as expected. You have to put an Ajax post request to submit the form without refreshing, because right now, it just does nothing.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26280006

http://stackoverflow.com/q/26282488
downvote count: 4
possible better answer: http://stackoverflow.com/a/26282632
has answer: http://stackoverflow.com/a/26282636
has body: I was wondering how can i disable and enable a checkbox base on option value : this is my code : lavorato ferie malattia Permesso if user select (lavorato) checkbox == enable else disable .
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -4
accepted answer: http://stackoverflow.com/a/26282636
has title: How to disable / enable checkbox base on select (option) value
favorite count: 0
tagged with: checkbox
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26282632
has comment: http://stackoverflow.com/comment/41236702
type: Question
answer count: 2

http://stackoverflow.com/q/26289058
has body: Inside of an html table I have a button that performs an update (the update functionality is removed because it doesn't matter). Upon completion of the update, a bootstrap label is shown and then hidden to show the update was completed. I am using jQuery's fadeIn and fadeOut to show/hide the label. I would like the label to be aligned with the top of the button. I thought I had it working correctly, but, I noticed that the label is only aligned correctly the first time I click the update button. Strangely, after the first time, the label appears below the button. Demonstration Fiddle I don't see how/why this is happening. Why doesn't the updated label appear to the right of the button every time? UPDATE: Interestingly, changing this line $("#updatedLabel").fadeOut(300); to $("#updatedLabel").css('display', 'none'); fixes the problem, though it is less pretty.
type: UnansweredQuestion
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/26289193
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: jQuery fadeOut and fadeIn seemingly not consistent
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/41318310
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26327067
type: AnswerComment
has text: so it is up to the repo to fix their tests. thank you :)

http://stackoverflow.com/q/26343363
score: 1
favorite count: 0
has title: Keyup to Manipulate div
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41348662
has comment: http://stackoverflow.com/comment/41348500
upvote count: 1
has answer: http://stackoverflow.com/a/26343476
has answer: http://stackoverflow.com/a/26343729
tagged with: keyup
type: Question
linked to: http://stackoverflow.com/q/4471582
has comment: http://stackoverflow.com/comment/41351999
has comment: http://stackoverflow.com/comment/41348481
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26343577
answer count: 3
has body: Haven't post in quite a while. Anyway I was searching about my subject and I got this. $(window).keyup(function(e) { if (e.which === 8) { $('.ilol'). fadeOut(); } }); It's working perfectly fine. But when I change the window to a class or id it doesn't respond anymore.
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26302942
tagged with: javascript
has comment: http://stackoverflow.com/comment/41277701
answer count: 1
tagged with: shell
favorite count: 0
tagged with: wsh
has answer: http://stackoverflow.com/a/27924451
type: UnansweredQuestion
upvote count: 1
tagged with: putty
has title: Javascript to load putty to a specific ssh host
has comment: http://stackoverflow.com/comment/41274691
score: 1
has comment: http://stackoverflow.com/comment/41274871
type: Question
has body: I am trying to create a website that has links and depending on those links it will load putty with an ssh connection to a specific host. ( this is to be used internally and ie 6) so far i have ignore the host Connection 1
downvote count: 0

http://stackoverflow.com/a/26336153
answers question: http://stackoverflow.com/q/26333997
score: 0
has body: The resize event only fires when it's bound to the window (except for IE, where you can bind it to any HTML element). Here, more about that. Checkout http://marcj.github.io/css-element-queries/ for an efficient solution.
type: Answer

http://stackoverflow.com/comment/41233556
has text: var data = '@Json.Encode(ViewBag.Report)' when I tried it it throws an error page with message: "A circular reference was detected while serializing an object of type 'Application.Database.ACCIDENT_REPORTS'." what does it mean I saw it before :S
comment on: http://stackoverflow.com/a/26279913
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41253945
has text: @jfriend00—yes, you're right, I just hadn't seen it in ed 3 before. :-)
score: 0
comment on: http://stackoverflow.com/a/26291206
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26274967
has comment: http://stackoverflow.com/comment/41222772
tagged with: jquery
has title: Run function, disable scroll, but enable on callback
possible better answer: http://stackoverflow.com/a/26275093
accepted answer: http://stackoverflow.com/a/26275141
has answer: http://stackoverflow.com/a/26275093
has comment: http://stackoverflow.com/comment/41222841
has answer: http://stackoverflow.com/a/26275201
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26275141
score: 0
answer count: 3
has body: I want to make a infinite scroll page, but I have a problem. My loadElements works with $.get, like this: loadElements: function() { // fades out page $.get(//..).done(function() {// fades in page}); } And scrolling: $(window).scroll(function() { Functions.loadElements(); }); What I want is to run Functions.loadElements(); once on scroll, wait for the // fades in page, then reenable scrolling again. I tried bind/unbind, but with no success. How can I achieve this? EDIT: I tried using bind and unbind like this: $(window).scroll(function() { Functions.loadElements(); $(window).unbind('scroll'); } and in loadElements: loadElements: function() { // fades out page $.get(//..).done(function() {// fades in page; $(window).bind('scroll'); }); } But it didn't work.

http://stackoverflow.com/comment/117370696
type: Comment
comment on: http://stackoverflow.com/a/46098585
has text: cheers @Ivan! that's exactly what was looking for
type: AnswerComment
score: 0

http://stackoverflow.com/q/26351330
type: Question
linked to: http://stackoverflow.com/q/216542
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26351512
answer count: 3
has body: I tried using the IP address of the users's computer but I realized that the public Ip address of all computer is same in a particular network. But I want to display different images to different users in my college network.There is no login info of user, so what can I use to uniquely identify a user or a user's computer in javascript. Thanks
has comment: http://stackoverflow.com/comment/41362874
has title: I have 7 images. I want to display different images to different users randomly using javascript. But once it is displayed, it should not change
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26351363
has comment: http://stackoverflow.com/comment/41362908
has comment: http://stackoverflow.com/comment/41363263
has answer: http://stackoverflow.com/a/26351387

http://stackoverflow.com/comment/41185478
comment on: http://stackoverflow.com/q/26254601
score: 0
has text: if event gets fired 2 times then the node will start processing the same request 2 times. You can prevent this on client side by `disabling` the form submit button or some other techniques.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41335657
type: AnswerComment
score: 0
has text: Thanks, unfortunately the result is the same
type: Comment
comment on: http://stackoverflow.com/a/26336030

http://stackoverflow.com/a/26199283
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41099474
accepted answer of: http://stackoverflow.com/q/26199174
has comment: http://stackoverflow.com/comment/41083465
type: Answer
has body: So what you are saying is that you have a document like this: { "_id": ObjectId("5430b55d214047b8ee55d40b"), "children": [ { "_id": ObjectID("16e7f7baa05c3a9d751363"), "title": "Testing", "sort": 2, "active": false } } } Or something similar, but at least with an array of children like that. As long as you are happy to update "all" if the elements in the "child" entry with the values in your variable object then there is nothing wrong with this: db.category.update( { "_id": ObjectId("5430b55d214047b8ee55d40b"), "children._id": child._id }, { "$set": { "children.$": child } ) And that will replace the entire element in position. If you are worried about replacing the entire content where you might have something like this: { "_id": ObjectId("5430b55d214047b8ee55d40b"), "children": [ { "_id": ObjectID("16e7f7baa05c3a9d751363"), "title": "Testing", "sort": 2, "active": false, "created": ISODate("2014-10-03T03:09:20.609Z") } } } Then you can process the keys of the object to construct your $set statement: var update = { "$set": {} }; for ( var k in child ) { if ( k != "_id" ) update["$set"]["children.$."+k] = child[k]; } db.category.update( { "_id": ObjectId("5430b55d214047b8ee55d40b"), "children._id": child._id }, update ); Which will process the update in place but does not overwrite the "created" field that was not supplied. Also note your quotes '' around the ObjectId value there, but I'm hoping that is just a typo, otherwise you need to eval() the string to get a valid object. The single array elements here are just and example. It is the positional $ operator syntax with the matching element in the query that matters here. There is no difference for a single array element or hundreds. Just as long as you are only updating one element of the array.
has comment: http://stackoverflow.com/comment/41083318
has comment: http://stackoverflow.com/comment/41083115
has comment: http://stackoverflow.com/comment/41083455
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41083006
has comment: http://stackoverflow.com/comment/41082992
answers question: http://stackoverflow.com/q/26199174
has comment: http://stackoverflow.com/comment/41083539

http://stackoverflow.com/a/26218055
downvote count: 0
has body: You can tap into global AJAX events to show/hide your loading gif on every AJAX call: $.ajax({ beforeSend: function(){ // show loading gif }, complete: function(){ // hide loading gif } }); see: https://api.jquery.com/Ajax_Events/
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41117799
score: 1
answers question: http://stackoverflow.com/q/26217487
has comment: http://stackoverflow.com/comment/41117843

http://stackoverflow.com/q/26272590
type: Question
has answer: http://stackoverflow.com/a/26273622
has title: How to control highlighted cell with arrow keys
has answer: http://stackoverflow.com/a/26273208
tagged with: javascript
score: -1
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
downvote count: 2
tagged with: css
has body: I have HTML table When I click on it's cell (not header) this cell is highlighted in red. the rest cells in the same row are highlighted in pink color. I want to control this red cell using arrow keys. Here is my HTML code: Table Highlight Id Name Year Task

http://stackoverflow.com/comment/41092459
comment on: http://stackoverflow.com/a/26204636
type: AnswerComment
type: Comment
has text: Looking at the picture you put up... this won't work with the asterisk *... or ^ and $ for that matter. You would need to escape those characters from the input value before using the `replace` function
score: 1

http://stackoverflow.com/comment/74151858
comment on: http://stackoverflow.com/a/29823654
type: AnswerComment
type: Comment
has text: If you don't want to change your function name to lowercase, you can avoid the warning with a`/** * @returns {boolean} */` comment line above the function.
score: 2

http://stackoverflow.com/comment/41109635
score: 0
type: QuestionComment
type: Comment
has text: Thanks @ramiramilu your answer is looking more promising for what I am after, just not sure what I put in my javascript method to initiate the submit of the form?
comment on: http://stackoverflow.com/q/26212987

http://stackoverflow.com/comment/41152139
type: Comment
type: QuestionComment
has text: I meant JavaScript indeed, thank you !
score: 0
comment on: http://stackoverflow.com/q/26234848

http://stackoverflow.com/comment/41243011
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26285640
has text: How do you verify `google.maps` is loaded before execution of this script? google lib in `head`, this script before ` ` or ... ?
score: 0

http://stackoverflow.com/a/26241566
accepted answer of: http://stackoverflow.com/q/26241478
answers question: http://stackoverflow.com/q/26241478
score: 10
type: AcceptedAnswer
has body: It's perfectly acceptable to have numeric property names for objects in JavaScript. We can use this to our advantage to build a second object that maps everything in reverse. This will make lookups inexpensive. var reverseMap = {}; for(var propName in resourceMap) { var numsArr = resourceMap[propName]; numsArr.forEach(function(num){ reverseMap[num]=propName; }); } console.log(reverseMap[54]); //'d' http://jsfiddle.net/y11sbgbv/ Building the reverseMap can also be done more "functionally" (e.g. without using side-effects) as follows: var reverseMap2 = Object.keys(resourceMap).reduce((acc, propName) =&gt; resourceMap[propName].reduce((a, num) =&gt; { a[num] = propName; return a; }, acc), {});
upvote count: 10
type: Answer
downvote count: 0

hover
tags question: http://stackoverflow.com/q/26220445
tags question: http://stackoverflow.com/q/26337012
tags question: http://stackoverflow.com/q/26348717
tags question: http://stackoverflow.com/q/26216618
type: Tag
tags question: http://stackoverflow.com/q/26313426
tag name: hover

http://stackoverflow.com/q/26310693
tagged with: angular-promise
has title: Resolve promise immediately
type: Question
has comment: http://stackoverflow.com/comment/41289045
has comment: http://stackoverflow.com/comment/41288705
tagged with: javascript
has comment: http://stackoverflow.com/comment/41288742
score: 0
has body: Is it possible to resolve an angular promise immediately and effectively have the code behave like a synchronous call? I know this defeats the purpose of promises, but I want to do this for unit testing purposes. My testing shows that the then is called right away, but I am not sure if there is a potential timing issue here where the then is still considered asynch? function someService(){ var deferred = $q.defer(); deferred.resolve(myObj); return deferred.promise; } someService().then(function(obj){ //will this be executed right away just like it would if this was a synchronous call? // more code here under test }); var myVal = 10; Will the myVal assignment be executed before the then callback? Or can I trust that the then will always go right away?
answer count: 1
has comment: http://stackoverflow.com/comment/41288977
linked to: http://stackoverflow.com/q/16081586
has comment: http://stackoverflow.com/comment/41288741
has answer: http://stackoverflow.com/a/26310877
has comment: http://stackoverflow.com/comment/41289011
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/41234668
has text: Could you specify "not working"?
score: 1
comment on: http://stackoverflow.com/q/26281482
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26264125
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41203138
has body: In that context, eval("this."+type) should be equivalent to this[type]. Here's a JSBIN example.
answers question: http://stackoverflow.com/q/26264108
has comment: http://stackoverflow.com/comment/41203261
accepted answer of: http://stackoverflow.com/q/26264108
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42124973
type: Comment
comment on: http://stackoverflow.com/a/26331021
has text: @charlietfl Not sure I understand what you mean by "and create the ajax that has the done in your code". Can you put that a different way, maybe?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26302596
type: Answer
has body: You are making a seperate ajax request in the success function for some reason. The success function will already have the data passed to it, so simply remove the second ajax request: function getoffers(data) { //$.post( "getoffer.php?getjson", function( data ) { var data = JSON.parse(data); console.log(data); $.each(data, function(index, value){ output1 += '&lt;li data-id='+ value.offer_id +'&gt;&lt;a href="#""&gt;' + value.offer_title + '&lt;/a&gt;&lt;/li&gt;'; }); $('#offerlist').html(output1).listview().listview('refresh'); //}); } Also, as noted by @Paul Roub, your post data key does not match up with your php, either change the data in your ajax to: data: { site_id: site_id}, OR change your php to use the key site: $site = $_POST['site'];
accepted answer of: http://stackoverflow.com/q/26302532
answers question: http://stackoverflow.com/q/26302532
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41274148
score: 0

http://stackoverflow.com/a/30909514
accepted answer of: http://stackoverflow.com/q/26336934
type: Answer
answers question: http://stackoverflow.com/q/26336934
has body: Both will perform the same action the only difference is that the former will execute faster than the latter. That's why former is the preferred way.
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/49503265
downvote count: 0
has body: For a more recent answer, the current version of webpack (4.1.1) you can just set this in your webpack.config.js like such: const webpack = require('webpack'); module.exports = { entry: [ 'react-hot-loader/patch', './src/index.js' ], module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: ['babel-loader'] }, { test: /\.css$/, exclude: /node_modules/, use: ['style-loader','css-loader'] } ] }, resolve: { extensions: ['*', '.js', '.jsx'] }, output: { path: __dirname + '/dist', publicPath: '/', filename: 'bundle.js' }, plugins: [ new webpack.HotModuleReplacementPlugin() ], devServer: { contentBase: './dist', hot: true, historyApiFallback: true } }; The important part is historyApiFallback: true. No need to run a custom server, just use the cli: "scripts": { "start": "webpack-dev-server --config ./webpack.config.js --mode development" },
answers question: http://stackoverflow.com/q/26203725
type: Answer
score: 12
upvote count: 12

http://stackoverflow.com/comment/41288791
has text: fair enough, apologies. as far as i can tell no i do not have nested forms. Could it be because all of the forms generated have the same name?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26306715

http://stackoverflow.com/comment/41160928
score: 0
comment on: http://stackoverflow.com/q/26241129
type: Comment
type: QuestionComment
has text: what is name. should throw an error

http://stackoverflow.com/q/26313899
accepted answer: http://stackoverflow.com/a/26328373
tagged with: drupal-views
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26328373
has body: In my Drupal 7 site I have a view with two block displays. The only difference between both is one filter criteria -URL Aias-: one block shows content with "/html5" in its alias and the other shows "/flash" url aliased content Those blocks must be dispalyed only on certains pages. This logic is controlled by Context module based on the URL. In this way, the block will be showed if the URL is like "perm/type/man/*" At this URL I need to display one block or another depending on flash content is enabled or not at device level: if device support flash (like PC) the flash content must be dislayed. If device doesn't support flash (mobile), the html5 content will be shown. I found this js code to detect if flash is enabled on the device var hasFlash = false; try { var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); if (fo) { hasFlash = true; } } catch (e) { if (navigator.mimeTypes &amp;&amp; navigator.mimeTypes['application/x-shockwave-flash'] != undefined &amp;&amp; navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { hasFlash = true; } } but I don't know what to do with it nor where I must include the code. Can you help me?
tagged with: http://stackoverflow.com/tag/html
has title: Display one Drupal block or another if flash is enabled
type: AnsweredQuestion
type: Question
tagged with: drupal-7
tagged with: flash
tagged with: javascript

http://stackoverflow.com/a/26276073
has comment: http://stackoverflow.com/comment/41225358
upvote count: 1
answers question: http://stackoverflow.com/q/26276042
has comment: http://stackoverflow.com/comment/41225136
downvote count: 1
has comment: http://stackoverflow.com/comment/41225336
has comment: http://stackoverflow.com/comment/41225801
has comment: http://stackoverflow.com/comment/41225592
has comment: http://stackoverflow.com/comment/41225493
has comment: http://stackoverflow.com/comment/41225529
has comment: http://stackoverflow.com/comment/41225173
has body: You can use :eq() for this: $('.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable:eq(2)')
has comment: http://stackoverflow.com/comment/41225166
score: 0
has comment: http://stackoverflow.com/comment/41225761
has comment: http://stackoverflow.com/comment/41225285
type: Answer

http://stackoverflow.com/comment/41285728
score: 1
comment on: http://stackoverflow.com/a/26308673
type: AnswerComment
has text: Sure. May I ask what good it would do to you if I mark your answer as accepted? I'm new here.
type: Comment

http://stackoverflow.com/comment/41359842
type: QuestionComment
comment on: http://stackoverflow.com/q/26349547
score: 3
has text: You seem to have forgotten to include your JavaScript code in your question.
type: Comment

http://stackoverflow.com/q/26219996
score: 0
tagged with: user-feedback
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26251463
has body: The part of the website that I am working on is limited to HTML files only and my customer wants to add a "Was This Helpful - Yes / No " type of feedback message at the end of every help page. I found a lot of third party scripts but they are all on the fixed either on the left hand side or on the right hand side of the page and the input field is made using Lightbox. Is there a way to use these scripts and add the form inline something like a flash object or iframe embed code? ( Here I am talking about tools such us: webengage, Kampyle, UserVoice, GetSatisfaction or OpinionLab and so on ).
type: Question
answer count: 1
tagged with: embed
has title: Is there a way to customise Kampyle, UserVoice, GetSatisfaction or OpinionLab to display the form inline (e.g: not Lightbox)?

http://stackoverflow.com/q/26341395
downvote count: 2
tagged with: user-agent
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41368972
tagged with: phonegap-build
tagged with: http://stackoverflow.com/tag/html
tagged with: nexus-4
has answer: http://stackoverflow.com/a/26428313
accepted answer: http://stackoverflow.com/a/26428313
type: AnsweredQuestion
upvote count: 0
has body: I am making mobile application using phonegap build service. I've tested application on several tablets and smart phones and it is working well on every device except on Nexus 4 (android 4.4). On Nexus it doesn't call function specified in any onclick attribute written in html. My guess was that it had to do something with user agent string, so I've tried it in google chrome emulator using: Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari found on http://user-agent-string.info/list-of-ua/os-detail?os=Android+4.4+KitKat . I wasn't able to replicate the issue but I did find it again using user-agent-string from iPhone 5: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 I tried googling and didn't find anyone with similar problem... Anyone has any ideas what could it be? Thanks in advance!
type: Question
score: -2
has comment: http://stackoverflow.com/comment/41344905
tagged with: javascript
has comment: http://stackoverflow.com/comment/41368707
has title: onclick in html not working in ios 7_0 user agent

http://stackoverflow.com/q/26349922
answer count: 0
has comment: http://stackoverflow.com/comment/41360468
type: Question
tagged with: javascript
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/41360493
score: 0
tagged with: jquery
has body: I've dived into javascript & jquery for the first time and I'm having a little difficulty wrapping my head around a problem. fieldedit.php Close Edit editvalidator.js function submitEdit() { var formValidator = $('#edit_field_form').validate(); var success = false; try { formValidator.addMethod("validFieldName", function (value, element) { return false; }, jQuery.validator.format("INVALID.")); success = formValidator.form(); } catch(err) { alert("Error\n\n" + err); } } The formValidator.addMethod throws the error "TypeError: Undefined is not a function". I'm using jquery-1.9.1.min.js and jquery.validate.min. Any help would be greatly appreciated.
has title: Jquery, .addMethod, undefined is not a function
linked to: http://stackoverflow.com/q/241145
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41400941
duplicate of: http://stackoverflow.com/q/241145

http://stackoverflow.com/a/26199747
type: Answer
has body: Maybe your best option is to use querySelectorAll and negate undesired elements. Then replace the textContent instead innerHTML. By using innerHTML you risk breaking document tags. This is a cross-browser solution. var matches = document.querySelectorAll("*:not(html):not(head):not(script):not(meta):not(link)"); console.log(matches); [].forEach.call(matches, function(elem) { var text = ('innerText' in elem) ? 'innerText' : 'textContent'; elem[text] = elem[text].replace("this", "works"); }); http://jsfiddle.net/m6qhuesv/ Note 1: HTML, HEAD, META and LINK tags disallow modify textContext. Note 2: innerText is a proprietary IE thing (also works in chrome). The W3C defines textContent as the official property.
accepted answer of: http://stackoverflow.com/q/26199593
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26199593
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41084487

http://stackoverflow.com/q/26323886
tagged with: javascript
has comment: http://stackoverflow.com/comment/41312474
has answer: http://stackoverflow.com/a/26324003
tagged with: ajax
possible better answer: http://stackoverflow.com/a/26324071
has comment: http://stackoverflow.com/comment/41312440
score: 0
has body: I want to assign value to a class instance variable from within ajax success functions, code will explain better what I mean. var SomeClass = function() { this.someMethod = function() { $.ajax({ method: 'GET', url: 'http://example.com', success: function(resp) { var js = JSON.parse(resp); // I want to assign js object to SomeClass.response instance variable }; }); }; }; If I try this.response, it obviously doesn't work. If I assign this to some variable before I make ajax call, It doesn't work either. I mean this: var SomeClass = function() { this.someMethod = function() { // Asign this to self var self = this; $.ajax({ method: 'GET', url: 'http://example.com', success: function(resp) { var js = JSON.parse(resp); // I want to assign js object to SomeClass.response instance variable self.response = js; // However it doesn't work }; }); }; }; I'll appreciate your help!!!
has answer: http://stackoverflow.com/a/26324071
has comment: http://stackoverflow.com/comment/41312460
has title: How do i assign value to instance variable within ajax success function
accepted answer: http://stackoverflow.com/a/26324003
type: AnsweredQuestion
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41312421

http://stackoverflow.com/a/26216652
answers question: http://stackoverflow.com/q/26216565
has comment: http://stackoverflow.com/comment/41117186
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26216565
score: 3
has comment: http://stackoverflow.com/comment/41115641
type: AcceptedAnswer
downvote count: 0
has body: You can do it like this. Pickup Date: <input type="date" class="textbox" id="pick_date" name="pickup_date" onchange="cal()" Dropoff Date: Number of days:
type: Answer

http://stackoverflow.com/comment/41081074
comment on: http://stackoverflow.com/a/26198198
type: Comment
score: 0
has text: you should add an example code line to show what you mean
type: AnswerComment

http://stackoverflow.com/comment/41179179
has text: Also explains how to load only in ie
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26250894
type: Comment

http://stackoverflow.com/q/26303815
type: AnsweredQuestion
tagged with: authentication
type: Question
accepted answer: http://stackoverflow.com/a/26303910
tagged with: javascript
has body: Some webapps like Facebook and gmail, detects the first time we try to login for the first time in one machine. Assuming that a browser can't read machine name, and MAC ADDRESS. What kind of variables are they collection for doing this validation?
has title: Detect Different Machine using Browser
tagged with: security
tagged with: browser
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26303910

http://stackoverflow.com/comment/41235685
has text: AJAX -> wait() >> then().
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26263901

http://stackoverflow.com/a/29237919
type: Answer
answers question: http://stackoverflow.com/q/26304517
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/46728707
downvote count: 0
has body: I've been using npm install mocha-traceur mocha ./tests/* --compilers js:mocha-traceur and it's been working like a charm !

hosting
tags question: http://stackoverflow.com/q/26320941
type: Tag
tag name: hosting

http://stackoverflow.com/comment/41279094
comment on: http://stackoverflow.com/q/26305217
score: 0
type: Comment
type: QuestionComment
has text: The question above might have a _misleading_ title considering what you're trying to achieve, but the answer would work for you.

http://stackoverflow.com/a/26217393
score: 5
type: Answer
upvote count: 6
has body: You can use the hold method as follows reply.hold(); reply.view('your-view'); or even reply.view('your-view').hold(); reply.send(); the reply is held until you call the .send() method, hence: reply().header('cache-control', 'no-cache').hold(); ... reply().send(); is probably what you are looking for.
downvote count: 1
has comment: http://stackoverflow.com/comment/87381479
answers question: http://stackoverflow.com/q/26213255

http://stackoverflow.com/comment/41301456
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26295844
has text: Does `window.localStorage` work for you?

http://stackoverflow.com/comment/41272970
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26301490
has text: @Bergi, I improved my answer to include a solution following best practices. Please reconsider your downvote.

http://stackoverflow.com/comment/41288705
comment on: http://stackoverflow.com/q/26310693
type: Comment
type: QuestionComment
score: 0
has text: In my opinion this breaks the concept of correct unit testing by modifying code execution paths between unit tests and actual application execution. However... Without overriding the angular-promise implementation for `then` -> No, this will always behave asynchronously.

http://stackoverflow.com/a/26324541
score: 0
has comment: http://stackoverflow.com/comment/41314099
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26324383
has comment: http://stackoverflow.com/comment/41313777
has comment: http://stackoverflow.com/comment/41313984
has comment: http://stackoverflow.com/comment/41313752
has comment: http://stackoverflow.com/comment/41313719
has comment: http://stackoverflow.com/comment/41313844
has comment: http://stackoverflow.com/comment/41314254
has body: So, your fiddle is not working. Here is a working example http://jsfiddle.net/ujtdq0wr/2/ First of all, if you are working locally you need to add http to the link from google apis So from this TO this You can check if the bxslider script and css file are loaded on your page :) UPDATE Call bxSlider in the template file where you have the // navigation click actions on line 260. SO before them just copy the code below :) $('#bxslider').bxSlider({ mode: 'fade', captions: true });
type: Answer
accepted answer of: http://stackoverflow.com/q/26324383
has comment: http://stackoverflow.com/comment/41313671
has comment: http://stackoverflow.com/comment/41313644
has comment: http://stackoverflow.com/comment/41314385
has comment: http://stackoverflow.com/comment/41313935

http://stackoverflow.com/comment/41267166
comment on: http://stackoverflow.com/a/26299145
has text: How do I make the second drop down go back to default when its disabled? So If I enable the second drop down and select optionOne = A but then I select default in the first drop down, how do I make the second drop down go back to default and make it read only
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41081958
comment on: http://stackoverflow.com/q/26198650
has text: Have you tried it? What type of behavior do you get? Where is the html code? The css code? Possibly even a fiddle?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26235878
has answer: http://stackoverflow.com/a/33311860
tagged with: javascript
has comment: http://stackoverflow.com/comment/41151533
tagged with: jquery
has comment: http://stackoverflow.com/comment/41151976
favorite count: 0
has answer: http://stackoverflow.com/a/59807719
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41152641
upvote count: 12
downvote count: 0
has answer: http://stackoverflow.com/a/26237878
accepted answer: http://stackoverflow.com/a/26237878
type: AnsweredQuestion
has title: How to disable inertial scrolling on body for iOS browsers?
has answer: http://stackoverflow.com/a/26237026
possible better answer: http://stackoverflow.com/a/33311860
linked to: http://stackoverflow.com/q/15313570
has answer: http://stackoverflow.com/a/53192923
tagged with: mobile-safari
has body: I need to disable the inertial scrolling on the body element for iPad, but keep the ability to scroll the page without the inertia. I have been looking for some time but I haven't found any good solutions. Maybe I am just not looking for the right thing? Is there any hack or workaround that could make this possible?
type: Question
score: 12

ios
tags question: http://stackoverflow.com/q/26315098
tags question: http://stackoverflow.com/q/26262048
tags question: http://stackoverflow.com/q/26336487
type: Tag
tags question: http://stackoverflow.com/q/26227889
tags question: http://stackoverflow.com/q/26313173
tags question: http://stackoverflow.com/q/26306942
tags question: http://stackoverflow.com/q/26224658
tags question: http://stackoverflow.com/q/26205767
tags question: http://stackoverflow.com/q/26207652
tags question: http://stackoverflow.com/q/26275130
tags question: http://stackoverflow.com/q/26266161
tags question: http://stackoverflow.com/q/26240762
tags question: http://stackoverflow.com/q/26324964
tags question: http://stackoverflow.com/q/26226182
tags question: http://stackoverflow.com/q/26221966
tag name: ios
tags question: http://stackoverflow.com/q/26233012
tags question: http://stackoverflow.com/q/26307734
tags question: http://stackoverflow.com/q/26221323
tags question: http://stackoverflow.com/q/26344555
tags question: http://stackoverflow.com/q/26309238
tags question: http://stackoverflow.com/q/26352968
tags question: http://stackoverflow.com/q/26299702
tags question: http://stackoverflow.com/q/26257349
tags question: http://stackoverflow.com/q/26319994
tags question: http://stackoverflow.com/q/26269297
tags question: http://stackoverflow.com/q/26218178

http://stackoverflow.com/comment/41358054
comment on: http://stackoverflow.com/a/26348212
score: 0
type: AnswerComment
has text: you can modify protos to behave like other browsers without the risk that stems from creating your own brand-new property names waiting to conflict one day. since that name is already taken, you don't have to worry. IE8 supporte Object.defineProperty on Element protos (it's about the only place it actually works), so you can also avoid the pesky "you broke my for-in" complaints that have long been associated with modifying native object prototypes.
type: Comment

http://stackoverflow.com/q/26239460
score: 0
has comment: http://stackoverflow.com/comment/41157847
has comment: http://stackoverflow.com/comment/41157805
tagged with: drop-down-menu
has body: I have dropdown-menu-1 with medicine names from my database. what I need to happen is when I select a specific medicine from dropdown-menu-1, Dropdown-menu-2 automatically shows the quantity of that medicine from the database. I think my problem is how to do the query inside the javascript. Database: medicine A with a quantity of 5 medicine B with a quantity of 7 medicine C with a quantity of 10 if you click medicine a, the option in dropdown-menu-2 should be from 1 to 5, if medicine b, the option in dropdown-menu-2 should be from 1 to 7 and medicine c should be from 1 to 10. --> Dropdown-menu-1 --> Dropdown-menu-1 | Dropdown-menu-2 Here's my code: &lt;select id="one"&gt; &lt;?php while ($print = mysql_fetch_array($query3)){ echo "&lt;option value\"".$print['generic_name']." ".$print['brand_name']."\"&gt;".$print['generic_name']." ".$print['brand_name']."&lt;/option&gt;"; } ?&gt; &lt;/select&gt; &lt;select id="two"&gt;&lt;/select&gt; &lt;script type="text/javascript"&gt; $(function () { $("#one").change(function (e) { $("#two").empty(); &lt;?php $query4 = mysql_query("SELECT * FROM medicine, status WHERE medicine.med_id=status.med_id AND medicine.generic_name=")?&gt; var options = $("#one option").filter(function(e){ return $(this).attr("value") &gt; $("#one option:selected").val(); }).clone(); $("#two").append(options); }); }); &lt;/script&gt; -HTML RENDER- I was ready to post a picture of the html render in my post, I didn't know I needed 10 rep points to add an image to my post. I posted it on photobucket instead http://s1132.photobucket.com/user/klleww/media/post.png.html
has title: Change value of dropdown based on dropdown selection
tagged with: php
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41157975
type: Question
tagged with: database
tagged with: javascript
linked to: http://stackoverflow.com/q/18351921
has comment: http://stackoverflow.com/comment/41158845

http://stackoverflow.com/a/42446389
type: Answer
downvote count: 0
score: 7
has body: Do not use Thread.sleep as it will freeze your main thread, and not simulate setTimeout from JS. You need to create and start a new background thread to run your code without stoping the execution of the main thread. One example: new Thread() { @Override public void run() { try { this.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } // your code here } }.start();
answers question: http://stackoverflow.com/q/26311470
upvote count: 7

http://stackoverflow.com/comment/41250559
comment on: http://stackoverflow.com/a/26289746
type: AnswerComment
type: Comment
score: 0
has text: If he's using jquery then having to invoke the animation with javascript anyway why not just use $('#div1 p').fadeIn(2000); or .animate if you want an easing effect

http://stackoverflow.com/q/26266161
score: 0
tagged with: ios
answer count: 1
has title: Developing iOS apps in JavaScript - How far can it go?
tagged with: healthkit
accepted answer: http://stackoverflow.com/a/26267356
type: AnsweredQuestion
has body: I'm a JavaScript developer and I heard it is possible to develop iOS apps in JavaScript via some "mobile app frameworks", though I may lose access to some functionalities that are otherwise available to native apps. What are these functionalities, and what's the best mobile webapp solution as of now that enables the webapp to do as much a native app could? Does any of them offer access to the newest feautures in iOS 8.0, like HealthKit?
type: Question
has answer: http://stackoverflow.com/a/26267356
tagged with: javascript

http://stackoverflow.com/a/26334167
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41331904
answers question: http://stackoverflow.com/q/26334018
upvote count: 1
has body: $http config has a timeout property that you can set when making a request with $http. If you want to get something done at global level for all $http can look at this SO post How to set a global http timeout in AngularJs

http://stackoverflow.com/a/26272809
downvote count: 0
score: 1
type: Answer
has body: Try this : you can use array instead of three different variables and iterate through array after every 10 seconds. &lt;script type="text/javascript"&gt; var v = ["Your Text&lt;br/&gt;Hello","Your Text2&lt;br/&gt;Hello2","Your Text3&lt;br/&gt;Hello3"]; var i = 0; window.setInterval(function () { $("#dynamicMessage").html(v[i]); i++; if(i==3) i=0; }, 10000); &lt;/script&gt; DEMO
upvote count: 1
has comment: http://stackoverflow.com/comment/41222838
answers question: http://stackoverflow.com/q/26272739
has comment: http://stackoverflow.com/comment/41219225

http://stackoverflow.com/q/26326958
has comment: http://stackoverflow.com/comment/41400963
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41621999
has comment: http://stackoverflow.com/comment/41621804
tagged with: scroll
has comment: http://stackoverflow.com/comment/41621684
has answer: http://stackoverflow.com/a/26453611
type: Question
has comment: http://stackoverflow.com/comment/41471568
linked to: http://stackoverflow.com/q/17798091
downvote count: 0
has answer: http://stackoverflow.com/a/26454511
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41635000
has comment: http://stackoverflow.com/comment/41622834
linked to: http://stackoverflow.com/q/26798580
has answer: http://stackoverflow.com/a/26401672
has body: I noticed mousewheel event is happening multiple times in mac osx. Can be atributed to inertia feature. Is there a way to fix this behaviour? (self signed ssl no worries please!) https://sandbox.idev.ge/roomshotel/html5_v2/ I'm using scrollSections.js https://github.com/guins/jQuery.scrollSections And it uses mousewheel jquery plugin: https://github.com/brandonaaron/jquery-mousewheel I'm seeing a lot of people having the same issue: https://github.com/brandonaaron/jquery-mousewheel/issues/36 There are some solutions but none works with scrollSections plugin. Any ideas how to disable this inertia feature from JS? My attempted fix: // Fix for OSX inertia problem, jumping sections issue. if (isMac) { var fireEvent; var newDelta = deltaY; if (oldDelta != null) { //check to see if they differ directions if (oldDelta &lt; 0 &amp;&amp; newDelta &gt; 0) { fireEvent = true; } //check to see if they differ directions if (oldDelta &gt; 0 &amp;&amp; newDelta &lt; 0) { fireEvent = true; } //check to see if they are the same direction if (oldDelta &gt; 0 &amp;&amp; newDelta &gt; 0) { //check to see if the new is higher if (oldDelta &lt; newDelta) { fireEvent = true; } else { fireEvent = false; } } //check to see if they are the same direction if (oldDelta &lt; 0 &amp;&amp; newDelta &lt; 0) { //check to see if the new is lower if (oldDelta &gt; newDelta) { fireEvent = true; } else { fireEvent = false; } } } else { fireEvent = true; } oldDelta = newDelta; } else { fireEvent = true; } You can see fix implemented here: https://sandbox.idev.ge/roomshotel/html5_v2/ But it is a hit/miss.
accepted answer: http://stackoverflow.com/a/26514147
has title: stopping mousewheel event from happening twice in OSX
has comment: http://stackoverflow.com/comment/41621634
tagged with: macos
has comment: http://stackoverflow.com/comment/41585156
has comment: http://stackoverflow.com/comment/41582505
answer count: 4
upvote count: 11
favorite count: 0
has comment: http://stackoverflow.com/comment/41389000
has answer: http://stackoverflow.com/a/26514147
linked to: http://stackoverflow.com/q/2863547
possible better answer: http://stackoverflow.com/a/26454511
score: 11
has comment: http://stackoverflow.com/comment/41389831
has comment: http://stackoverflow.com/comment/41622014

http://stackoverflow.com/q/26296845
tagged with: javascript
tagged with: jquery
has body: I'm trying to implement a dynamic counter to add into my list after adding a new row on the top of my list. The code is not working properly because it count wrong for example if we have this list A B C and i will add the D instead of make it like this D A B C is do it like this D A B C Last i want to remove the last row if I add a new row on the bottom but is not working Does anyone knows why? Here is my code html a variable that holds the contents that I want to prepend $(".il_admin-"+id).prepend(html).slideDown("slow");​ var i = GetURLParameter("paged"); var count = (i*10)-10; jQuery(".il_admin li").each(function(i) { i = count + i; var text_attreibute = $(this).find(".il_admin_raw_count"); $(text_attreibute).html(i+1); }); var size= $('.il_admin li').size(); if (size &gt;10) { var last_row = $('.il_admin li').last().attr('class'); $(last_row).remove(); }
has comment: http://stackoverflow.com/comment/41262955
score: 0
has title: How I can add a counter after adding a new to my list using jquery
has answer: http://stackoverflow.com/a/26297038
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41266683
has comment: http://stackoverflow.com/comment/41263080
has answer: http://stackoverflow.com/a/26298985
has comment: http://stackoverflow.com/comment/41262996
type: Question
has comment: http://stackoverflow.com/comment/41263225
answer count: 2

http://stackoverflow.com/q/26332189
downvote count: 1
has body: I would like to a question for javascript with asp.net. There is a clear button and I try to change it as a javascript function. I guess that asp.net doesn't work as the html and the getElementsByTagName doesn't recognize asp:TextBox, I think. How I can work as the getElementsByTagName("asp:TextBox") to this code? <asp:Label ID="lblName" runat="server" Text="Name: "></asp:Label> <asp:TextBox ID="txtName" runat="server"></asp:TextBox> <asp:Label ID="lblAge" runat="server" Text="Age: "></asp:Label> <asp:TextBox ID="txtAge" runat="server"></asp:TextBox> <asp:Label ID="lblShoeSize" runat="server" Text="Shoe Size: "></asp:Label> <asp:TextBox ID="txtShoeSize" runat="server"></asp:TextBox> Edit: Thanks Sam, jfriend00 for your advise. there is the button call from html. I think I might be misunderstood the javascript. What I found that it might be document.getElementById('xxxx').getElementsByTagName('input'); not as a document.getElementsByClassName('xxxx').getElementsByTagName("input"); it is bit confusing. Thanks <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" width="70"/>
has comment: http://stackoverflow.com/comment/41328358
tagged with: javascript
has title: javascript getElementsByTagName with asp.net
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26332249
type: UnansweredQuestion

http://stackoverflow.com/a/26307208
answers question: http://stackoverflow.com/q/26307172
type: Answer
accepted answer of: http://stackoverflow.com/q/26307172
score: 2
has comment: http://stackoverflow.com/comment/41282292
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41282420
has comment: http://stackoverflow.com/comment/41282571
has body: This syntax: $('.used').click(function(){ binds all the current elements with the classname 'used'. Since the used class is added after the document is initially loaded, you need to bind it dynamically: $(document).click('.used',function(){ If possible, you should use the parent of .used as a selector instead of the document.

http://stackoverflow.com/a/26202677
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41094515
has comment: http://stackoverflow.com/comment/41093910
score: 1
has comment: http://stackoverflow.com/comment/41095134
has comment: http://stackoverflow.com/comment/41095001
has comment: http://stackoverflow.com/comment/41090818
has body: Several issues with your code : var page and $scope.page are two different variables; you use the former to select the page in your $http request but never increment it. That's why you always get page 1. your loop doesn't do what you want it to do : you replace your data a hundred times instead of appending the new data to the existing set, and you increment $scope.page a hundred times instead of once (but you don't use $scope.page so it doesn't do anything, especially since you put it back to 1 everytime you retrieve data). Try this code snippet instead : $scope.page = 1; var url = 'http://example.com/item/data/?param=item&amp;pagesize=100&amp;page=' + $scope.page; $http.get(url) .success(function(data, status, config, headers) { for (var i = 0; i &lt; data.items.length; i++) { $scope.totalTags.push(data.items[i]); } $scope.page += 1; $scope.loading = false; }) .error...//rest of the stuff
has comment: http://stackoverflow.com/comment/41095310
accepted answer of: http://stackoverflow.com/q/26200340
has comment: http://stackoverflow.com/comment/41093965
downvote count: 0
answers question: http://stackoverflow.com/q/26200340
has comment: http://stackoverflow.com/comment/41094069
has comment: http://stackoverflow.com/comment/41094754
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41093694
has comment: http://stackoverflow.com/comment/41094858
has comment: http://stackoverflow.com/comment/41095063
has comment: http://stackoverflow.com/comment/41094822

http://stackoverflow.com/comment/41298201
comment on: http://stackoverflow.com/q/26311951
score: 0
type: Comment
type: QuestionComment
has text: The ?= is coffeescript's 'existential' operator. Its javascript equivalent is: if (window.components == null) { window.components = {}; }

http://stackoverflow.com/comment/41206619
has text: I already tried it this way but ran into an error (updated my question and added the error log). I did not note the "Cannot switch to old mode now" before. I looked it up and found this post: [link](https://stackoverflow.com/a/20181116/4121003) - so it should work, but it isn't because a module is still using the old stream interface which is causing problems?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26261356
type: AnswerComment

laravel
tags question: http://stackoverflow.com/q/26254935
tags question: http://stackoverflow.com/q/26200982
tag name: laravel
tags question: http://stackoverflow.com/q/26266751
tags question: http://stackoverflow.com/q/26302389
tags question: http://stackoverflow.com/q/26299262
tags question: http://stackoverflow.com/q/26280943
type: Tag
tags question: http://stackoverflow.com/q/26320689

http://stackoverflow.com/q/26235513
score: 1
upvote count: 1
type: Question
has body: can somebody please explain me How Inheritance works in javascript (JS), i have gone through many Tutorials, but I'm not able to understand what it is achieving.. even after night and day no result.. what i have gone through is : console.log('Initialized..') function Animal() { this.species = "animal"; } Animal.prototype.category = function (){ alert(this.species); } function Dog(){ this.Animal(); } copyPrototype(Dog, Animal) var d = new Dog(); d.category(); Referenced Tutorial from http://www.sitepoint.com/javascript-inheritance/
has title: can somebody explain me how inheritance works in javascript
tagged with: javascript
tagged with: inheritance
has comment: http://stackoverflow.com/comment/41150335
has comment: http://stackoverflow.com/comment/41150509
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41150223
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41150859
has answer: http://stackoverflow.com/a/26235829
tagged with: oop
tagged with: prototypal-inheritance

http://stackoverflow.com/q/26309397
has body: So I just installed JSHint in Eclipse Kepler I loaded my .jshintrc file . How do I run jshint on my javascript files? I do not see a menu item nor a place to specify filenames, etc... Can someone help?
has answer: http://stackoverflow.com/a/31914773
tagged with: eclipse
tagged with: jshint
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/31914773
upvote count: 6
has answer: http://stackoverflow.com/a/26311421
score: 6
has title: JSHint and eclipse plugin
possible better answer: http://stackoverflow.com/a/26311421
type: AnsweredQuestion

http://stackoverflow.com/q/26351585
has answer: http://stackoverflow.com/a/26352360
type: UnansweredQuestion
has body: I've manage to create an aspx page that contains an image slider which derived from a javascript function, but when I copy the code to an (.asp) page, the image slider does not load properly. So I would like to ask if there's any difference in the method of calling javascript function in asp classic (.asp) and ASP.net (.aspx)? Thanks :) &lt;!--BANNER CODING --&gt; &lt;div id="banner_image"&gt; &lt;div id="slider-wrapper"&gt; &lt;div id="slider" class="nivoSlider"&gt; &lt;img src="images/home_1.jpg" alt="" /&gt; &lt;img src="images/home_2.jpg" alt="" /&gt; &lt;img src="images/1.png" alt="" /&gt; &lt;img src="images/2.png" alt="" /&gt; &lt;img src="images/hom_3.jpg" alt="" /&gt; &lt;img src="images/home_4.jpg" alt="" /&gt; &lt;/div&gt; &lt;!--close slider--&gt; &lt;br /&gt; &lt;/div&gt; &lt;!--close slider_wrapper--&gt; &lt;/div&gt; &lt;!--close banner_image--&gt;
type: Question
has comment: http://stackoverflow.com/comment/41369989
tagged with: javascript
tagged with: asp-classic
score: 0
has title: aspx & asp difference in calling javascript function
answer count: 1
tagged with: asp.net

http://stackoverflow.com/q/26289799
tagged with: scroll
type: Question
tagged with: javascript
has body: Check out this link: http://www.ffwdcam.com/beta/ For some reason when I load it the page always loads scrolled down to the "see it in action" section! I have no idea why this is happening! Please help!
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has title: Site keeps loading scrolled down instead of at the top of the page like it should
tagged with: css
has answer: http://stackoverflow.com/a/26290105
tagged with: loading
score: 0

http://stackoverflow.com/comment/41341657
type: Comment
comment on: http://stackoverflow.com/a/26339472
has text: better, but function search_handler() return empty array search_list, if second call search_handler() then fine.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26280055
has comment: http://stackoverflow.com/comment/41232004
has comment: http://stackoverflow.com/comment/41233685
favorite count: 0
has comment: http://stackoverflow.com/comment/41231994
tagged with: css
has comment: http://stackoverflow.com/comment/41232201
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26280985
type: Question
has title: When typing in input and if not email with @ and .com etc show error
has body: I'm making this login field that is supposed to be more automatic and not manual like normal fields. I'm trying to show errors while you type and enter your details, and not after you have pressed "submit" and checked if the details is correct. For example if you have not typed @ or .com/.no/.co.uk in an email field: make error message automaticlly appear. Or for example if you have typed only two letters and you need minium 6 letters: show error automaticlly appear.
has answer: http://stackoverflow.com/a/26280985
score: -1
downvote count: 2
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41232101

http://stackoverflow.com/a/26313822
accepted answer of: http://stackoverflow.com/q/26313788
type: Answer
answers question: http://stackoverflow.com/q/26313788
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: The tag system is quite easy to do with a jquery library. Check these out: http://aehlke.github.io/tag-it/ https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/ and so on ...

http://stackoverflow.com/q/26321311
score: 0
has title: Can't serialize and grab data from form using JavaScript and jQuery
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26321341
has body: I'm trying to create a simple form where I can add an item, hit submit and grab the data using serialize or .val() but I can't even console log anything once I press submit, what am I doing wrong? I would just like to be able to grab the data. HTML CODE: &lt;form &gt; &lt;input type="text"&gt; &lt;input type="submit"&gt; &lt;/form&gt; JAVASCRIPT CODE: $(function(){ $("submit").submit(function(){ var data = $("form").serialize(); console.log(data); }); });
type: UnansweredQuestion

angularjs
tags question: http://stackoverflow.com/q/26329825
tags question: http://stackoverflow.com/q/26240105
tags question: http://stackoverflow.com/q/26245697
tags question: http://stackoverflow.com/q/26287896
tags question: http://stackoverflow.com/q/26270154
tags question: http://stackoverflow.com/q/26286246
tags question: http://stackoverflow.com/q/26315098
tags question: http://stackoverflow.com/q/26271289
tags question: http://stackoverflow.com/q/26261238
tags question: http://stackoverflow.com/q/26253012
tags question: http://stackoverflow.com/q/26265854
tags question: http://stackoverflow.com/q/26302403
tags question: http://stackoverflow.com/q/26312456
tags question: http://stackoverflow.com/q/26335538
tags question: http://stackoverflow.com/q/26345611
tags question: http://stackoverflow.com/q/26316427
tags question: http://stackoverflow.com/q/26222786
tags question: http://stackoverflow.com/q/26276609
tags question: http://stackoverflow.com/q/26259313
tags question: http://stackoverflow.com/q/26336487
tags question: http://stackoverflow.com/q/26251750
tags question: http://stackoverflow.com/q/26226676
tags question: http://stackoverflow.com/q/26214501
tags question: http://stackoverflow.com/q/26255824
tags question: http://stackoverflow.com/q/26252212
tags question: http://stackoverflow.com/q/26247809
tags question: http://stackoverflow.com/q/26233949
tags question: http://stackoverflow.com/q/26259486
tags question: http://stackoverflow.com/q/26262699
tags question: http://stackoverflow.com/q/26345996
tags question: http://stackoverflow.com/q/26349588
tags question: http://stackoverflow.com/q/26238697
tags question: http://stackoverflow.com/q/26219357
tags question: http://stackoverflow.com/q/26291936
tags question: http://stackoverflow.com/q/26265689
tags question: http://stackoverflow.com/q/26319873
tags question: http://stackoverflow.com/q/26221784
tags question: http://stackoverflow.com/q/26261756
tags question: http://stackoverflow.com/q/26312879
tags question: http://stackoverflow.com/q/26294531
tags question: http://stackoverflow.com/q/26283967
tags question: http://stackoverflow.com/q/26297479
tags question: http://stackoverflow.com/q/26240765
tags question: http://stackoverflow.com/q/26352953
tags question: http://stackoverflow.com/q/26208091
tags question: http://stackoverflow.com/q/26271406
tags question: http://stackoverflow.com/q/26213627
tags question: http://stackoverflow.com/q/26257220
tags question: http://stackoverflow.com/q/26252822
tags question: http://stackoverflow.com/q/26260444
tags question: http://stackoverflow.com/q/26254298
tags question: http://stackoverflow.com/q/26211573
tags question: http://stackoverflow.com/q/26246037
tags question: http://stackoverflow.com/q/26244062
tags question: http://stackoverflow.com/q/26232709
tags question: http://stackoverflow.com/q/26237198
tags question: http://stackoverflow.com/q/26311838
tags question: http://stackoverflow.com/q/26297483
tags question: http://stackoverflow.com/q/26205293
tags question: http://stackoverflow.com/q/26275373
tags question: http://stackoverflow.com/q/26217123
tags question: http://stackoverflow.com/q/26277235
tags question: http://stackoverflow.com/q/26281080
tags question: http://stackoverflow.com/q/26236898
tags question: http://stackoverflow.com/q/26198638
tags question: http://stackoverflow.com/q/26222606
type: Tag
tags question: http://stackoverflow.com/q/26302001
tags question: http://stackoverflow.com/q/26328638
tags question: http://stackoverflow.com/q/26265847
tags question: http://stackoverflow.com/q/26245820
tags question: http://stackoverflow.com/q/26320794
tags question: http://stackoverflow.com/q/26238869
tags question: http://stackoverflow.com/q/26269972
tags question: http://stackoverflow.com/q/26340959
tags question: http://stackoverflow.com/q/26216769
tags question: http://stackoverflow.com/q/26239510
tags question: http://stackoverflow.com/q/26247769
tags question: http://stackoverflow.com/q/26217691
tags question: http://stackoverflow.com/q/26245611

http://stackoverflow.com/q/26314997
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41499407
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41334804
has comment: http://stackoverflow.com/comment/41458208
has comment: http://stackoverflow.com/comment/41457703
has answer: http://stackoverflow.com/a/30912853
has comment: http://stackoverflow.com/comment/41456550
favorite count: 0
has comment: http://stackoverflow.com/comment/41458438
type: UnansweredQuestion
tagged with: devexpress
has comment: http://stackoverflow.com/comment/41296175
has comment: http://stackoverflow.com/comment/42363315
score: 3
tagged with: devexpress-mvc
has comment: http://stackoverflow.com/comment/41565969
upvote count: 3
has title: DevExpress MVC GridView refresh
type: Question
has body: I need to refresh DevExpress GridView in the ajax success function after an operation. I am using gridName.Refresh() method but javascript is throwing "udefined is not a function" error. But when I write this method to Google Chrome Console window, it is working fine. What is the problem? In Addition my javascript codes are in the different JavaScript file, not among the html codes. This is my jquery ajax codes that in the seperated javascript file function sendToMethod(url) { $.ajax({ type: 'GET', url: url, contentType: 'application/html; charset=utf-8', datatype: 'html' }) .success(function (result) { onCloseClick(); gv_locations.UnselectRows();//gv_locations is not defined gv_locations.Refresh();//there is the same error here too }) .error(function (result) { }); } This is my GridViewPartial.cshtml file @Html.DevExpress().GridView(g =&gt; { g.Name = "gv_locations"; g.KeyFieldName = "PublicIP"; g.SettingsPager.PageSize = 21; g.Width = System.Web.UI.WebControls.Unit.Percentage(100); g.ClientSideEvents.SelectionChanged = "onGridSelectionChanged"; g.SettingsEditing.Mode = GridViewEditingMode.EditFormAndDisplayRow; g.CommandColumn.Visible = true; g.Settings.ShowGroupPanel = true; g.CommandColumn.ShowEditButton = true; g.CommandColumn.ShowDeleteButton = true; g.CommandColumn.ShowSelectCheckbox = true; g.SettingsBehavior.AllowFocusedRow = true; g.CallbackRouteValues = new { Controller = "Location", Action = "LocationGridViewPartial", id = ViewBag.Type }; g.SettingsEditing.UpdateRowRouteValues = new { Controller = "Location", Action = "LocationGridViewInlineUpdate" }; g.SettingsEditing.DeleteRowRouteValues = new { Controller = "Location", Action = "LocationGridViewInlineDelete" }; g.Columns.Add(column =&gt; { column.Caption = "Client"; column.FieldName = "ClientID"; column.EditFormSettings.Visible = DevExpress.Utils.DefaultBoolean.False; }); g.Columns.Add(column =&gt; { column.Caption = "IP"; column.FieldName = "PublicIP"; column.EditFormSettings.Visible = DevExpress.Uti…

http://stackoverflow.com/a/26331330
accepted answer of: http://stackoverflow.com/q/26330112
has body: You have to route all requests (expect your static ones) to index.html: app.use("/js", express.static(__dirname + "/public/js")); ... app.all('/*', function(req, res) { var html = fs.readFileSync('public/views/index.html', 'utf8'); res.send(html); });
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41390502
has comment: http://stackoverflow.com/comment/41361068
score: 2
answers question: http://stackoverflow.com/q/26330112

http://stackoverflow.com/a/26633732
type: Answer
accepted answer of: http://stackoverflow.com/q/26317874
has body: The solution was really easy. Located in the header, the javascript tries to access an object of the DOM that is not available. I moved the javascript before the closing body tag and it is working now.
answers question: http://stackoverflow.com/q/26317874
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26320421
has comment: http://stackoverflow.com/comment/41306068
accepted answer of: http://stackoverflow.com/q/26320149
has comment: http://stackoverflow.com/comment/41306118
has comment: http://stackoverflow.com/comment/41306197
answers question: http://stackoverflow.com/q/26320149
has body: To make sure the images have been loaded, start with a $(window).load event listener I'd also use Math.min to get the lowest image height $(window).on("load resize", function(event) { // find container var container = $(".com-background"); // get image heights in an array var heights = container.find("img").map(function(idx, elem) { return $(elem).height(); }).get(); // get the minimum height var minimum = Math.min.apply(null, heights); // set container height and overflow property container.height(minimum).css({overflow: "hidden"}); });
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/26213570
tagged with: three.js
score: 0
has comment: http://stackoverflow.com/comment/41216132
type: UnansweredQuestion
has title: three.js add name and id to loading model
answer count: 0
has comment: http://stackoverflow.com/comment/41122452
tagged with: javascript
has comment: http://stackoverflow.com/comment/41109906
has body: I am loading more than object into the scene, so i want to differentiate each models loaded by their name and id, so while load the models am adding the name and id as like below in my code var object = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(object_material)); model = new THREE.Object3D(); model.id="Myid"+file; model.name="Myname"+file; model.add(object); model.position.set(x,y,z); model.scale.set(obj_width,obj_height,obj_rotation); model.opacity =2; model.rotation.y = 600; model.duration = 12000; model.mirroredLoop = true; model.castShadow = true; model.receiveShadow = true; console.log(model); scene.add(model); on the console i can see the model name and id as like below Object { id="Myid746834", uuid="8AD0FF6C-83C9-4219-8CBB-C3B0E931416D", name="Myname746834", more...} 3d_tool...proid=3 (line 814) Object { id="Myid746834", uuid="3FA3A69A-A5C9-40DD-A564-37F622C68872", name="Myname746834", more...} Object { id="Myid746834", uuid="F46501A5-EDB6-453D-9871-568FE9EC8E6D", name="Myname746834", more...} 3d_tool...proid=3 (line 814) Object { id="Myid816595", uuid="BEA53331-A331-46F6-9D8C-3BDC9A77312B", name="Myname816595", more...} 3d_tool...proid=3 (line 814) Object { id="Myid215834", uuid="B84C740A-0D95-4C84-AA1E-578C2D6CDB1C", name="Myname215834", more...} so here the name and id is set into the objects i loaded, but after i want to get the this in onMouseDown to find the selected model and it's name,id, but there am not getting the assigned name,id of previously set into the objects instead of it am getting objects id :21 objects name: like this, meaning that id is differ from assigned and name it empty, any guess on this ?
has comment: http://stackoverflow.com/comment/41111397
has comment: http://stackoverflow.com/comment/41216626
type: Question

http://stackoverflow.com/comment/41218806
type: AnswerComment
has text: Thank you for the reply. This is what I had suspected, although I was hoping that wasn't the case. I'll play around with this encapsulation a bit.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26272487

http://stackoverflow.com/q/26238434
has answer: http://stackoverflow.com/a/26238478
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41155836
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4976344
has comment: http://stackoverflow.com/comment/41155855
has comment: http://stackoverflow.com/comment/41155824
has body: I am new to Javascript. I've heard that DOM is the most important aspect of Javascript, it's used all the time, DOM allows us to add all the interactivity to the webpages, blah blah blah... ...But I see DOM as nothing but a mere hierarchical representation of HTML elements. I don't get it why it's given so much importance. What am I missing? Also, I heard in a tutorial that DOM of a webpage is created when it loads on the browser. My question is, what creates it? Is it the rendering machine?
type: UnansweredQuestion
score: -3
downvote count: 3
has title: DOM in javascript
tagged with: dom
type: Question
duplicate of: http://stackoverflow.com/q/4976344
upvote count: 0

http://stackoverflow.com/q/26217676
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26218330
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41121168
has body: I have an MVC project which I have build as a SPA using knockoutjs and sammy. I put this script in the page head. &lt;script&gt; var startTime = (new Date()).getTime(); &lt;/script&gt; and at the end of the body, I put this: @Scripts.Render("~/Scripts/required") @Scripts.Render("~/Scripts/app/views") &lt;script&gt; $(function () { $(window).load(function () { var endTime = (new Date()).getTime(); var millisecondsLoading = endTime - startTime; // Put millisecondsLoading in a hidden form field // or Ajax it back to the server or whatever. alert(millisecondsLoading); }); }); &lt;/script&gt; The scripts that are being loaded are these: ' For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 Public Sub RegisterBundles(ByVal bundles As BundleCollection) bundles.Add(New StyleBundle("~/Content/css").Include( "~/Content/core.css")) bundles.Add(New ScriptBundle("~/Scripts/required").Include( "~/Scripts/jquery-1.9.0.min.js", "~/Scripts/json2.js", "~/Scripts/jquery.cookie.js", "~/Scripts/knockout-3.2.0.js", "~/Scripts/knockout.validation.js", "~/Scripts/sammy-0.7.5.js")) bundles.Add(New ScriptBundle("~/Scripts/app/views").Include( "~/Scripts/app/_common.js", "~/Scripts/app/_app.datamodel.js", "~/Scripts/app/_app.viewmodel.js", "~/Scripts/app/common.viewmodels.js", "~/Scripts/app/error.viewmodel.js", "~/Scripts/app/login.viewmodel.js", "~/Scripts/app/home.viewmodel.js", "~/Scripts/app/cut-lengths.viewmodel.js", "~/Scripts/app/move-stock.viewmodel.js", "~/Scripts/app/transfers.viewmodel.js", "~/Scripts/app/allocations.viewmodel.js", "~/Scripts/app/lot-enquiry.viewmodel.js", "~/Scripts/app/_run.js")) ' Set EnableOptimizations to false for debugging. For more information, ' visit http://go.microsoft.com/fwlink/?LinkId=301862 BundleTable.EnableOptimizations = True End Sub Now, if I run this using IE5 on my development machine I get an alert that is between 200 and 300 ms. This is good. But, when I run this on the scanner, it takes over 20000 ms (20 se…
tagged with: knockout.js
has title: Page load times using a Scanner (IE5)
type: Question
tagged with: asp.net-mvc
score: 0
has comment: http://stackoverflow.com/comment/41118228

syntax
tags question: http://stackoverflow.com/q/26199076
type: Tag
tags question: http://stackoverflow.com/q/26275287
tag name: syntax

http://stackoverflow.com/a/26207368
downvote count: 0
has body: Remove the commas by replacing them with an empty string, then you can parse the string. Remember the second parameter in the parseInt method that specifies the base, so that it doesn't use base 8 for zero padded values. var num = parseInt(str.replace(/,/g, ''), 10) + 1; If you want to put the changed number back formatted with commas, you can use: var s = num.toString(); for (var i = s.length - 3; i &gt; 0; i -= 3) { s = s.substr(0, i) + ',' + s.substr(i); } document.getElementById('elem').innerHTML = s;
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26207287
answers question: http://stackoverflow.com/q/26207287
type: AcceptedAnswer

http://stackoverflow.com/q/26212469
tagged with: menu
possible better answer: http://stackoverflow.com/a/26212485
has answer: http://stackoverflow.com/a/26212485
type: Question
has answer: http://stackoverflow.com/a/26212501
answer count: 2
tagged with: css
score: 0
has comment: http://stackoverflow.com/comment/41107355
accepted answer: http://stackoverflow.com/a/26212501
has body: I'm creating a menu that has submenus and when I hover on a menu that has a submenu it needs to display the submenus. When I hover my mouse over the menu, nothing happens. I know it's probably something small, but I can't seem to see it. My menu Home Products Product 1 My css .submenu { display: none; } My query $('.menu li').hover( function () { $('submenu').show(); }, function () { $('submenu').hide(); } );
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has title: jquery hover not displaying submenu

http://stackoverflow.com/comment/41135009
score: 0
type: Comment
type: QuestionComment
has text: The 10.10 is greater than 10.4 , but is returning true because it is comparing 10 > = 10 , and not with subversion .
comment on: http://stackoverflow.com/q/26226935

http://stackoverflow.com/comment/41219685
comment on: http://stackoverflow.com/q/26271993
score: 0
type: Comment
type: QuestionComment
has text: Yes. It is http://www.w3schools.com/ajax/ajax_xmlhttprequest_onreadystatechange.asp at the bottom of the page titled "Using a Callback Function". I tried their "Try it Yourself" button, and tried to put their 'var xmlhttp' inside the function, and it did not work on their site either. I redid my function to make sure all the onreadystatechanges were in loadXMLDoc rather than outside of it so that the xmlhttp variable could be accessed when it is local. Thankfully it worked. I am not sure why they say to do it that way on W3C Schools especially when the variable has to be global their way.

http://stackoverflow.com/comment/41190965
score: 0
type: Comment
type: QuestionComment
has text: @APerson - thanks for reply, it working but the data shown is not correct. Can you see the code, ReleaseStartDate and ReleaseDate dates comparison I am doing is correct or wrong.
comment on: http://stackoverflow.com/q/26257701

http://stackoverflow.com/comment/41094263
type: QuestionComment
comment on: http://stackoverflow.com/q/26204962
score: 0
has text: Is `place_childSelectValue` an array? If not, it needs to be. Also you shouldn't store descriptors in state, you should store the data. `successHandler: function(data){ this.setState({data: data}) }` and create the ` `s in render.
type: Comment

http://stackoverflow.com/comment/41119066
comment on: http://stackoverflow.com/q/26218641
has text: @KevinWorkman yes :)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41217737
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26271769
has text: So every promo code you generate.. you send it back to servers to check if it exists or not?

http://stackoverflow.com/q/26203295
tagged with: javascript
has comment: http://stackoverflow.com/comment/41171607
has body: I have a (largish) HTML5 canvas. Its rendering a pictures from a file, using context.drawImage() and this is quite fast. (Note that there are more than one picture on the same canvas). Now I need to perform some manipulations to the pixels on the canvas, basically I need to perform Alpha Blending which darkens certain areas of the picture. So instead I used this approach. //create an invisible canvas so that we don't do the actual rendering of the image var invisibleCanvas = document.createElement('canvas'); invisibleCanvas.width = myWidth; invisibleCanvas.height = myHeight; var invContext = invisibleCanvas.getContext('2d'); invContext.drawImage(imageObj, 0, 0, invisibleCanvas.width, invisibleCanvas.height); var imageData = invContext.getImageData(0, 0, invisibleCanvas.width, invisibleCanvas.height) var pixelComponents = imageData.data; var dkBlendingAmount = 0.5; for (var i = 0; i &lt; pixelComponents.length; i += 4) { //there are a few extra checks here to see if we should do the blending or not pixelComponents[i] = pixelComponents[i] * dkBlendingAmount; pixelComponents[i+1] = pixelComponents[i+1] * dkBlendingAmount; pixelComponents[i+2] = pixelComponents[i+2] * dkBlendingAmount; } //this is the real place where I want it context.putImageData(imageData, xOffset, yOffset); Is there a way to make this faster? Is there a way to get the image data directly from my imageObj rather than having to put it on a canvas, get the data, convert it and put it on another canvas?
tagged with: http://stackoverflow.com/tag/html
has title: Fastest way to change image pixels before rendering on an HTML5 canvas
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41092133
score: 0
tagged with: canvas

http://stackoverflow.com/a/26259515
score: 0
has body: Get the bounding rectangle for every element that may touch your rectangle. For each element, check whether the bounding rectangle and your rectangle intersect. If you have a huge number of elements, and you can make assumptions like 'the bounding rects of an element's child elements are always contained in the element's bounding rect', then there are some optimizations possible. Or when the elements are ordered in a certain way. But if any position is possible for any HTML element, as CSS allows, you need to check them all.
has comment: http://stackoverflow.com/comment/41194815
type: Answer
has comment: http://stackoverflow.com/comment/41241798
has comment: http://stackoverflow.com/comment/41246289
answers question: http://stackoverflow.com/q/26259412
has comment: http://stackoverflow.com/comment/41195426
has comment: http://stackoverflow.com/comment/41244322

http://stackoverflow.com/comment/41228560
type: QuestionComment
comment on: http://stackoverflow.com/q/26278247
has text: You need what now? A button that submit both forms?
type: Comment
score: 1

http://stackoverflow.com/comment/41339784
has text: Ah, so you're wanting to *update* a variable based on the value entered by the user in the HTML input control?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26338605

http://stackoverflow.com/a/26245125
has body: The script tags have to be in the body tags.
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41170043
answers question: http://stackoverflow.com/q/26244829
accepted answer of: http://stackoverflow.com/q/26244829

http://stackoverflow.com/comment/41101398
comment on: http://stackoverflow.com/a/26209080
has text: I only based it on his statement but putting an else statement is a better idea.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26233808
upvote count: 1
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41152763
type: Question
has body: In my MVC 4 application, I have been working with modal popups on various clicks with ajax.actionlinks as: @Ajax.ActionLink("Link", "ActionName", "ControllerName", new { Area = "..." }, new AjaxOptions { InsertionMode = InsertionMode.Replace, HttpMethod = "GET", LoadingElementId = "ajax-loader", UpdateTargetId = "new-entity", OnSuccess = "EntityModal", } and this works fine for me. Also I have been using bootstrap context menus as: { text: 'RightClickMe', href: 'javascript:test()',target: '_blank' } With this on right click on any element I will be getting one link as RightClickMe.Now on this click as mentioned above I am trying to call one jquery function test() as: function test() { return $.ajax({ url: "@Url.Content("~/Controller/Action")", data: { //some .... }, datatype : 'html', type: 'GET', success: function(data) { $("#new-entity").html(data); } }) } I tried with this and even lot of other found results but nothing worked for me Here, with this function I want to load the modal popup as it loads with ajax.actionlink . So can anyone please suggest me the way to do this i.e. I want to make some ajax calls and load the modal popups by using the script function or is there any other alternative to do this.I have been trying for hours and really got stuck at this point. Any help would be highly appreciated. Thanks in advance.
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41176897
score: 1
favorite count: 0
has title: Load Modal Popup with ajax calls in MVC 4
answer count: 0
has comment: http://stackoverflow.com/comment/41156470
type: UnansweredQuestion

http://stackoverflow.com/comment/41439460
type: AnswerComment
has text: @Nits ok, added a solution to that question. Hope that helps.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26333855

http://stackoverflow.com/q/26207555
tagged with: extjs3
has body: I have a requirement of not using radio buttons to track a 'Yes' or 'No' option in a dialog box. Instead use something like a prompt which will have Yes, No and Cancel as prompts. (No explicit Submit button unlike in the above case). Is there anyway to do this using extjs 3.3/3.4? I have been reading the documentation but do not see any support for prompts. Any help or ideas on this will be greatly appreciated. Thanks
type: Question
has answer: http://stackoverflow.com/a/26736499
answer count: 1
tagged with: javascript
has title: extjs 3.4 How to use prompts UI?
score: 0
tagged with: user-interface
type: UnansweredQuestion

http://stackoverflow.com/q/26267667
has title: how to listen for a mouse click in a javascript game
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: mouseclick-event
accepted answer: http://stackoverflow.com/a/26267717
has comment: http://stackoverflow.com/comment/41210045
has body: I'm designing a game in javascript and I have a function that goes like this: function handleKeys(mod) { if (37 in keysDown || 65 in keysDown) { //left player.x -= player.speed * mod; } if (38 in keysDown || 87 in keysDown) { //up player.y -= player.speed * mod; } if (39 in keysDown || 68 in keysDown) { //right player.x += player.speed * mod; } if (40 in keysDown || 83 in keysDown) { //down player.y += player.speed * mod; and I want to add another conditional that calls my shoot() function when I click the mouse. How can I write that conditional so that it resembles the code above, because every tutorial I've seen just tells me how to make clickable buttons and requires me to use addEventListener, which I don't think is right for what I'm trying to do.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41210099
type: Question
has answer: http://stackoverflow.com/a/26267717
tagged with: javascript
score: 0

http://stackoverflow.com/a/26307519
downvote count: 0
has comment: http://stackoverflow.com/comment/41283463
score: 1
upvote count: 1
type: AcceptedAnswer
has body: The simplest way is to ensure that most of your JS is written in non-templated .js files, rather than inline &lt;script&gt; blocks in your templated html.
accepted answer of: http://stackoverflow.com/q/26307441
type: Answer
answers question: http://stackoverflow.com/q/26307441

http://stackoverflow.com/comment/41306349
has text: I meant to use document.write. Thanks!
comment on: http://stackoverflow.com/a/26320427
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26596182
upvote count: 5
has body: AngularJS and browserify aren't, sadly, a great match. Certainly not like React and browserify, but I digress. What has worked for me is having each file as an AngularJS module (because each file is already a CommonJS module) and having the files export their AngularJS module name. So your example would look like this: app/ app.js follow/ controllers.js directives.js services.js index.js The app.js would look something like this: var angular = require('angular'); var app = angular.module('mnm', [ require('./follow') ]); // more code here angular.bootstrap(document.body, ['mnm']); The follow/index.js would look something like this: var angular = require('angular'); var app = angular.module('mnm.follow', [ require('./controllers'), require('./directives'), require('./services') ]); module.exports = app.name; The follow/controllers.js would look something like this: var angular = require('angular'); var app = angular.module('mnm.follow.controllers', [ require('./services'), // internal dependency 'ui.router' // external dependency from earlier require or &lt;script/&gt; // more dependencies ... ]); app.controller('FollowController', ['$scope', 'FollowService', function ...]); // more code here module.exports = app.name; And so on. The advantage of this approach is that you keep your dependencies as explicit as possible (i.e. inside the CommonJS module that actually needs them) and the one-to-one mapping between CommonJS module paths and AngularJS module names prevents nasty surprises. The most obvious problem with your approach is that you're keeping the actual dependencies that will be injected separate from the function that expects them, so if a function's dependencies change, you have to touch two files instead of one. This is a code smell (i.e. a bad thing). For testability either approach should work as Angular's module system is essentially a giant blob and importing two modules that both define the same name will override each other. EDIT (two years later): Som…
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26275888
type: Answer
has comment: http://stackoverflow.com/comment/65518901
answers question: http://stackoverflow.com/q/26275888
has comment: http://stackoverflow.com/comment/65494594
has comment: http://stackoverflow.com/comment/65559291
has comment: http://stackoverflow.com/comment/45056197

http://stackoverflow.com/comment/41124813
has text: But how do I read the property value? trying `.css("width")` did not work
comment on: http://stackoverflow.com/a/26221626
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26214838
type: Answer
answers question: http://stackoverflow.com/q/26214344
has body: I believe that redirect doesn't work because the Response for the page with the javascript is closed before the AJAX call is even made. Instead of using Response.Redirect you could send back a string containing the url and in your script use location.href to redirect.
score: 0

http://stackoverflow.com/comment/41217495
comment on: http://stackoverflow.com/a/26271669
type: AnswerComment
score: 0
has text: @Epsilon: i'm sorry did i miss something here.
type: Comment

http://stackoverflow.com/comment/69911559
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26347182
has text: `^` used to match start of a line, `[0-9\/\\]+` would match any num from 0 to 9 or `\/` a forward slash or `\\` a backward slash, one or more times (`+`).. starting `/` and ending `/` are regex delimiters.

http://stackoverflow.com/comment/41116545
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26217261
type: Comment
has text: `html body parentX parentY p { color: blue !important; }` is maybe little bit better. It is not so easy to accidentally override if you tell all parent elements. Anyway some later style might override it.

http://stackoverflow.com/comment/41225911
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26262027
has text: Spotted an error with this. When run add 2 new phone number fields. These are correctly named and numbered name="phone_number2" id="phone_number2" and name="phone_number3" id="phone_number3". If you remove Phone number 2, then Phone number 3's text is changed to 2 and id is changed to phone_number2, but the name is still phone_number3 which mean when submitted it will be against the phone name. anyway to get the name value correct as well ?
type: Comment

http://stackoverflow.com/q/26320845
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41306903
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Link to the code on JFiddle: http://jsfiddle.net/4v2n7wk9/1/ A Grid Button Example Menu Below I have been thoroughly stumped. I have a simple example above (not tags, not sure they'd work, they're merely organizational, the CSS is properly loaded from a seperate .css in the actual implementation, and of course is simply inserted sans- into the CSS field on JSFiddle). Nine divs, arranged in a simple three-by-three pattern, each an image. There are three types of IDs and three types of classes corresponding to rows and columns. This works as expected for the first column, providing console logs (inspect the result field*) of row and column for the first column. However, only columns are noted for the two columns to the right, as if they didn't have row IDs. I've been trying to wrap my head around this seemingly simple problem and simply can't. Help! Thanks. *In Chrome right click on JSFiddle's Result screen (lower-right hand of the four panes) and then click on Inspect Element, along with other information the window will have a console that records console.log() calls.
accepted answer: http://stackoverflow.com/a/26320888
has comment: http://stackoverflow.com/comment/41306979
has comment: http://stackoverflow.com/comment/41307022
has comment: http://stackoverflow.com/comment/41306950
type: Question
has title: How Can I Create a Coordinate Grid of Clickable Divs Using HTML, CSS, Javascript and If Useful JQuery?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41306912
has answer: http://stackoverflow.com/a/26320888
has comment: http://stackoverflow.com/comment/41306939
has comment: http://stackoverflow.com/comment/41306993
has comment: http://stackoverflow.com/comment/41306982
has comment: http://stackoverflow.com/comment/41306945

http://stackoverflow.com/q/26279049
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26279065
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Capture event when we out from text box
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26279355
has answer: http://stackoverflow.com/a/26279355
has body: I have 3 input text box. &lt;input type="text" id="textbox1" /&gt; &lt;input type="text" id="textbox2" /&gt; &lt;input type="text" id="textbox3" /&gt; I want to capture that text box value when I out from that. For example I entering 'stackoverflow' in textbox2, now I click on textbox3, So now I want to capture textbox2 value. If I didn't click on textbox3 and click somewhere on screen then also I want to capture textbox2 value. In short I want to capture that box text value by which I out after entering data. I tried with keyUp and change event but both are not full fill my requirement.
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26279065

http://stackoverflow.com/comment/41635704
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26329451
has text: I did downvoted question by the reason that it's certainly not contain enough information and during 9 days OP didn't provide full information.
score: 0

http://stackoverflow.com/q/26223821
has title: Multiple instance of this Accordion on the same page
accepted answer: http://stackoverflow.com/a/26223904
upvote count: 2
tagged with: css
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41129293
type: Question
has answer: http://stackoverflow.com/a/26223904
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41129075
downvote count: 0
answer count: 1
favorite count: 0
has body: I've been trying to have multiple instance of this accordion on the same page. Here is a link to the fiddle jsfiddle.net/r817L7rv/ The second accordion is the same as first one duplicated with different heading text or content. Below is the code. See the fiddle External Resources for dependencies. (function($) { // cache some values var cache = { idx_expanded : -1, // the index of the current expanded slice sliceH : 0, // the default slice's height current : 0, // controls the current slider position totalSlices : 0 // total number of slices }, aux = { // triggered when we click a slice. If the slice is expanded, // we close it, otherwise we open it.. selectSlice : function( $el, $slices, $navNext, $navPrev, settings ) { return $.Deferred( function( dfd ) { var expanded = $el.data('expanded'), pos = $el.data('position'), itemHeight, othersHeight, $others = $slices.not( $el ); // if it's opened.. if( expanded ) { $el.data( 'expanded', false ); cache.idx_expanded = -1; // the default values of each slices's height itemHeight = cache.sliceH; othersHeight= cache.sliceH; // hide the content div $el.find('.va-content','.za-content').hide(); // control the navigation buttons visibility if( aux.canSlideUp( $slices, settings ) ) $navPrev.fadeIn(); else $navPrev.fadeOut(); if( aux.canSlideDown( $slices, settings ) ) $navNext.fadeIn(); else $navNext.fadeOut(); } // if it's closed.. else { $el.data( 'expanded', true ); cache.idx_expanded = $el.index(); $others.data( 'expanded', false ); // the current slice's height itemHeight = settings.expandedHeight; // the height the other slices will have othersHeight= Math.ceil( ( settings.accordionH - settings.expandedHeight ) / ( settings.visibleSlices - 1 ) ); // control the navigation buttons visibility if( cache.idx_expanded &gt; 0 ) $navPrev.fadeIn(); else $navPrev.fadeOut(); if( cache.idx_expanded &lt; cache.totalSlices - 1 ) $navNext.fadeIn(); else $navNext.fadeOut(); } // the animation parameters for the clicked slice var animPar…

http://stackoverflow.com/q/26292877
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41255995
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41255884
has title: Angular app throws error
accepted answer: http://stackoverflow.com/a/26293276
type: Question
tagged with: javascript
score: 0
has body: My code is like this Line # ITCLS Item # Line Quantity# Ship Quantity PickQuantity Quantity in Plt Allready Packed {{data.itemId}} {{data.itcls}} {{data.itemId}} Line Quantity# Ship Quantity PickQuantity Allready Packed Next Pallet Remove Pallet (function () { angular.module('myApp', []).controller('MainCtrl', function ($scope) { var counter = 0; $scope.pacakageElement = [{ name: counter, show: true, Data: [{ name: 'item 1', itemId: '284307', itemCode: '', description: 'Bicycle parts - frame', quantity: '100', handlingUnit: 'CTN', weight: '613.04', class: '', lenght: '102', width: '42', height: '61', flag: 'P' }, { name: 'item 2', itemId: '284308', itemCode: '', description: 'Bicycle parts - fork', quantity: '200', handlingUnit: 'CTN', weight: '242.99', class: '', lenght: '75', width: '34', height: '18', flag: 'P' }] }]; $scope.newPackageItem = function (packageElement, $event) { var npackageElement = {}; angular.copy(packageElement, npackageElement); counter++; packageElement.show = false; npackageElement.name = counter; angular.forEach(npackageElement.Data, function (row) { if (row.quantity != row.newquantity || row.quantity != 0) { row.quantity = row.quantity - row.newquantity; } }); $scope.packageElement.push(npackageElement); }; }); }()); Here I am trying to duplicate my first dataset and do some calculations on it. Everything works fine except function newPackageItem. this function alone throws error TypeError: Cannot read property 'push' of undefined at Scope.$scope.newPackageItem Fiddle
answer count: 1
has answer: http://stackoverflow.com/a/26293276

http://stackoverflow.com/comment/41172137
has text: You should disable the buttons when your form submits from client side, once the page gets reloaded, the postback was already completed and the page has been returned already
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26246895
score: 0

http://stackoverflow.com/comment/41208295
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26266617
has text: Its being submitted to PDF, using a modified version of http://mpdf1.com/manual/index.php?tid=373 Yes there is a submit button. This is going to be for a contract form. Right now they are just using paper, and I am trying to make it digital for them. Hoping I can figure out the signature part

http://stackoverflow.com/q/26239853
has comment: http://stackoverflow.com/comment/41158495
has comment: http://stackoverflow.com/comment/41158684
tagged with: javascript
score: -1
tagged with: ajax
has answer: http://stackoverflow.com/a/26239933
accepted answer: http://stackoverflow.com/a/26239933
has comment: http://stackoverflow.com/comment/41179843
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41179691
answer count: 1
favorite count: 0
downvote count: 2
upvote count: 1
has body: Hi im doing a little exercise for my self with JSON and i'm trying to reatrieve data from an URL http://api.openweathermap.org/data/2.5/weather?q=miami the query has no Problem and the data comes back i can even write it into the html file with innerHTML. But if i want to acces keys of the JSON data it says its undefined. But if i give the Variable the JSON code with Formating it works and i can even acces the keys i dont get it. /* Here Goes Your Ajax Code */ var server; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari server = new XMLHttpRequest(); } else {// code for IE6, IE5 server = new ActiveXObject("Microsoft.XMLHTTP"); } var city = "Düsseldorf" var userInput = document.getElementById("userInput"); userInput.addEventListener("change", myFunction); var weatherUrl = "http://api.openweathermap.org/data/2.5/weather?q="+city; server.open("POST", weatherUrl , false); server.send(); var weather= JSON.parse(server.responseText); document.getElementById("errorMe").innerHTML = weather; city = weather.name; document.getElementById("city").innerHTML = city; function myFunction() { city = document.getElementById("userInput").value; weatherUrl = "http://api.openweathermap.org/data/2.5/weather?q="+city; server.open("POST", weatherUrl , false); server.send(); document.getElementById("myDiv").innerHTML = weather= JSON.parse(server.responseText); weather= JSON.parse(server.responseText); if(weather.cod == 404){ document.getElementById("myDiv").innerHTML = " You typet a city that does not Exist! "; }else{ document.getElementById("myDiv").innerHTML = weather; } }
has comment: http://stackoverflow.com/comment/41159050
duplicate of: http://stackoverflow.com/q/4935632
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/4935632
has title: Javascript reading JSON that comes from a url request
has comment: http://stackoverflow.com/comment/41179790
type: Question
has comment: http://stackoverflow.com/comment/41179816

http://stackoverflow.com/a/26306943
has comment: http://stackoverflow.com/comment/41281897
type: Answer
has comment: http://stackoverflow.com/comment/41281720
answers question: http://stackoverflow.com/q/26306745
has body: var csv=""; //this is the output file for(var i=0;i&lt;result.length;i++){//loop through output csv+=result[i]+"\n"; //append the text and a newline } window.open('data:text/csv;' + (window.btoa?'base64,'+btoa(csv):csv)); //open in a new window, chrome will automatically download since it is a csv.
has comment: http://stackoverflow.com/comment/41281783
score: 0
has comment: http://stackoverflow.com/comment/41281699

http://stackoverflow.com/comment/41335436
comment on: http://stackoverflow.com/a/26297741
type: AnswerComment
score: 0
type: Comment
has text: It's never been that way for as long as I've used Backbone/Underscore (2 years). Or maybe I just wasn't aware of that option. I learned it the other way and that is the version I've seen most often.

http://stackoverflow.com/comment/41344653
has text: It looks like MVC (?) takes care of the autom,atic de-serialization on the server side from JSON to a C# object and I just need to handle sending it back in pascalCase, which this seems to do. Beautiful. Thank you.
comment on: http://stackoverflow.com/a/26339997
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41148112
has text: I have included jquery ui with bower and I am loading it into my project with require.js
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26232805

http://stackoverflow.com/a/26218805
type: Answer
has comment: http://stackoverflow.com/comment/41119171
answers question: http://stackoverflow.com/q/26218687
has body: I suggest use Jquery &lt;input type=text id="somethingElse"&gt; &lt;input type=button id="something"&gt; $( "#something" ).click(function() { var currentMonth = (new Date).getMonth() + 1; $( "#somethingElse" ).val(currentMonth); });
has comment: http://stackoverflow.com/comment/41119096
score: 0
has comment: http://stackoverflow.com/comment/41123574

http://stackoverflow.com/a/26202265
has body: This should work. str.replace(/\n&gt;*\s*--\n.*\n.*/g, '') Results in: On date at 3:16 PM, Sir Voldemort wrote: &gt; Sweet Harry! &gt; Let's see what's gonna happen. &gt; &gt; &gt; On date at 3:11 PM, wrote: &gt; &gt;&gt; Awesome! &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; &gt; &gt; ********************************************** &gt; Quote “Efe iska?” ********************************************** ABCABCABC **********************************************
score: 1
accepted answer of: http://stackoverflow.com/q/26201722
answers question: http://stackoverflow.com/q/26201722
downvote count: 0
type: AcceptedAnswer
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41271425
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26300966
score: 0
has text: @MelanciaUK: The question needs a clear step-by-step to replicate the issue. To see the issue, click a project, and then without closing it, scroll down and click another. Then try to close the new one.

http://stackoverflow.com/q/26330441
accepted answer: http://stackoverflow.com/a/26337113
has comment: http://stackoverflow.com/comment/41326006
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41324875
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41325059
score: 1
has answer: http://stackoverflow.com/a/26337113
has title: Close ajax accordion with javascript
answer count: 2
has body: I have an ajax accordion on that I want to close after 5 seconds from the page loading. I'm trying to do this with javascript but having no luck. I'm trying to change the accordion control of SelectedIndex to a value that will collapse the accordion. SelectedIndex = 0 is open (default), and I'm trying to change it to 1 after the javascript timer runs out. $(document).ready(function () { // close the accordion after 5 seconds setTimeout(function () { document.getElementById('MainContent_Accordion1').SelectedIndex = 1; }, 5000); }); I'm not getting any errors on the java from the console, but the accordion isn't closing. Any thoughts?
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26331828
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26331828
tagged with: ajax
has comment: http://stackoverflow.com/comment/41324902
has comment: http://stackoverflow.com/comment/41326958

http://stackoverflow.com/comment/41274866
comment on: http://stackoverflow.com/q/26303113
score: 1
type: Comment
type: QuestionComment
has text: Can you post the code used to load the data?

http://stackoverflow.com/comment/41146146
has text: changeImage4 with changeImage5 arent differend IDs? so i connect classes with javascript? I want 2 things to be done when i click an image tochange other images and to reload the slider how i can do that?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26232385

http://stackoverflow.com/a/26361323
has comment: http://stackoverflow.com/comment/41398005
has comment: http://stackoverflow.com/comment/41382575
score: 2
accepted answer of: http://stackoverflow.com/q/26347201
has comment: http://stackoverflow.com/comment/41382109
answers question: http://stackoverflow.com/q/26347201
has comment: http://stackoverflow.com/comment/41381078
has body: According to the gist you have provided and your comments about the behavior of the tests as you manipulate them in various ways, the most probable cause of the issue is the fact that you are using the same id twice. Here is a line from beforeEach block: container = $('&lt;div id="container" /&gt;'); You create a div with id equal to "container". Now the problem lies here: $('body').append(container).append(sourceElement).append(destinationElement); container = $('#container'); After the first test everything is fine, because there is only a single "container" in the body. But as you run the second test, and consequently the beforeEach block again, another "container" is appended to the body. Now there are 2 div elements with the id "container", and the behavior of the query selector is undefined. A good solution would be to add an afterEach block in which you do cleanup after testing -- in this case removing the container. afterEach(function () { $('#container').remove(); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41382711
upvote count: 2
has comment: http://stackoverflow.com/comment/41388704
type: Answer

http://stackoverflow.com/comment/41082155
score: 0
comment on: http://stackoverflow.com/a/26198833
type: Comment
has text: That will not make any difference.
type: AnswerComment

http://stackoverflow.com/q/26211526
has comment: http://stackoverflow.com/comment/41106364
score: 2
has title: Find deleted element in Array
type: Question
has comment: http://stackoverflow.com/comment/41105825
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41105941
has answer: http://stackoverflow.com/a/26211693
favorite count: 0
has body: I need to find the first available deleted slot in the Array This works: var A = [1,2] A[0] = undefined console.log(A.indexOf(undefined)) But how about this?: var A = [1,2] delete A[0] console.log(A) console.log(A.indexOf(null)) ???
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/26267067
has body: I dont think Document.activeElement whill work in this case when focus should be moved with a click of a button. Each time the button is clicked it will get focus and the button is all that Document.ActiveElement will return. http://jsfiddle.net/uyd9ejam/ I would work with tabindex but if you really want a button to move the focus you can do like this with the help of class attribute. var tabindex = 0; function next(){ var tab = document.getElementsByClassName("td"); tab[tabindex].focus(); if(tabindex == tab.length -1){ tabindex = 0; } else{ tabindex ++; } }
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26265299
has comment: http://stackoverflow.com/comment/41237500
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26265299

http://stackoverflow.com/comment/41097148
comment on: http://stackoverflow.com/a/26199677
score: 0
type: AnswerComment
type: Comment
has text: Right off I see your test is using jQuery v2.1 and your page is using v1.9.1 with jQuery migrate 1.0.

http://stackoverflow.com/comment/41201787
score: 0
type: Comment
type: QuestionComment
has text: @Wes it's used to prove that the request is associated with a valid session. Your server-side framework knows what values correspond with valid sessions. The random numbers are large enough that they are effectively impossible to guess. This is all very basic "how secure sites work" information; don't try to invent your own security protocols.
comment on: http://stackoverflow.com/q/26263182

http://stackoverflow.com/q/26312990
tagged with: google-analytics
tagged with: javascript
has answer: http://stackoverflow.com/a/26331940
has comment: http://stackoverflow.com/comment/41293749
answer count: 1
tagged with: asynchronous
favorite count: 0
has body: When installing Google Analytics the latest version of their code (for Universal Analytics) is as follows: (function(i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-XXXXXXX-X', 'auto'); ga('send', 'pageview'); The first part of the code creates a &lt;script&gt; tag to load analytics.js, then the second part uses the ga() function to activate the script. My question is - if it takes some time to load analytics.js, how does the ga() function know to wait before being executed? Why doesn't ga() try to run before the script has loaded? I'd like to use a similar mechanism and hoped understanding Google's code better will help.
has title: How does Google Analytics JavaScript function load and run without async / race condition problems?
upvote count: 2
accepted answer: http://stackoverflow.com/a/26331940
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/23474151
downvote count: 1
type: Question

http://stackoverflow.com/comment/41362336
has text: I think the problem is in `processImage`. But I haven't really examined all the code, so I'm not sure of all that it's doing.
type: QuestionComment
comment on: http://stackoverflow.com/q/26350800
type: Comment
score: 0

http://stackoverflow.com/q/26285594
has comment: http://stackoverflow.com/comment/41245176
has comment: http://stackoverflow.com/comment/41243427
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41242797
has comment: http://stackoverflow.com/comment/41243209
has title: Why is a "self" reference required to call ajax from within a jQuery dialog?
tagged with: javascript
type: UnansweredQuestion
has body: The following jquery function opens a tutorial dialog if a specific pattern is detected. I recently added a "do not show again" checkbox, so the user can decide they don't want to see the popup anymore, which included an ajax call to set a session variable to store this setting. I had trouble getting the ajax call to work until I added a "this" reference. Does anyone know why the "this" is needed? #userDismiss should select the input with the corresponding ID, and I've confirmed that the ID is used nowhere else in the codebase for this project. The below code works, but I'm fairly new to jQuery and am interested in learning more about why it works as written. jQuery code fragment: $('#tutorial').dialog ({ show: "fade", title: "Helpful Hint", modal: false, close: function(event, ui) { if ($('#userDismiss', this).is(':checked')) { $.ajax ({ type: 'POST', url: '/ajax/do-not-show-again.php' }); } }, buttons: { Okay: function() { $(this).dialog('close'); } } }); and this is the php snippet containing the div used for the dialog in the above jquery code This is a tutorial message Don't show me this again
tagged with: jquery
has answer: http://stackoverflow.com/a/26285792
favorite count: 0
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/41245187
has comment: http://stackoverflow.com/comment/41242722
has comment: http://stackoverflow.com/comment/41242781
tagged with: php
has comment: http://stackoverflow.com/comment/41245129
score: 0

http://stackoverflow.com/comment/41128366
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26223276
score: 0
has text: There's nothing even resembling JSON here.

http://stackoverflow.com/comment/41353331
score: 0
type: Comment
has text: Also, thanks for letting me know about gn. It will came in handy, for sure .
type: AnswerComment
comment on: http://stackoverflow.com/a/26343308

http://stackoverflow.com/comment/41366060
score: 1
comment on: http://stackoverflow.com/a/26338553
has text: I want to know how to change the drop down value dynamically for choosing items per page.`pagesize` is dynamically changing. But drop down values are not able to change dynamically. that is `pagesizes` option
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26241270
downvote count: 0
has body: You can use DOMParser: var yourString = 'Some custom string: John. Start something'; var d = new DOMParser(); var dom = d.parseFromString(yourString, "text/html"); var a = dom.querySelector('a'); var linkText = a.innerText var linkHref = a.href;
type: Answer
answers question: http://stackoverflow.com/q/26241195
accepted answer of: http://stackoverflow.com/q/26241195
score: 3
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/a/26333842
answers question: http://stackoverflow.com/q/26282695
has comment: http://stackoverflow.com/comment/41336810
score: 0
has body: Don't know this is relevant, but I experienced an issue where radio button unselected after rebinding. Fixed once I replaced data-bind="if: with data-bind="visible:
type: Answer

http://stackoverflow.com/comment/41273296
score: 0
comment on: http://stackoverflow.com/a/26302271
type: AnswerComment
type: Comment
has text: Sounds like a good plan! Could you explain me a bit how to implement it with my example? I've been on W3schools but I am still a bit confused ... Thanks a lot!!

http://stackoverflow.com/comment/41143752
type: Comment
has text: "XMLHttpRequest cannot load file:///C:/Users/blah/Desktop/test/data.csv. Received an invalid response. Origin 'null' is therefore not allowed access."
score: 0
comment on: http://stackoverflow.com/q/26231490
type: QuestionComment

http://stackoverflow.com/q/26309127
has body: i am triyng to acces an elemet using its new atribute. HTML Element1 The script is $('.element').one("click", function() { $.getScript('/script.js'); }); $('#activated').click(function() { alert(1); }); Inside the script.js file : $('.element').attr("id", "activated"); The script.js adds the id #activated to the div, but .click() won't work using the new id. Can someone please tell me why?
has comment: http://stackoverflow.com/comment/41285998
answer count: 3
has comment: http://stackoverflow.com/comment/41285924
linked to: http://stackoverflow.com/q/26306067
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26309191
has title: Can't access element using its new id
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26309201
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26309191
possible better answer: http://stackoverflow.com/a/26309195
tagged with: javascript
has answer: http://stackoverflow.com/a/26309195

http://stackoverflow.com/a/26347417
answers question: http://stackoverflow.com/q/26347013
type: Answer
downvote count: 0
score: 1
has body: Ok it took me some time to understand the problem but here goes. First of all you have to put the class 'in' in your 'default' opened menu, probably #nav-collapse: &lt;div id="nav-collapse" class="collapse in"&gt; Now in the link that opens the search button you should write: &lt;a data-toggle="collapse" href="#search-collapse"&gt; in the link that goes back to the navigation menu use this code: &lt;a data-toggle="collapse" href="#nav-collapse"&gt; This assumes you have properly loaded jquery/bootstrap.js/bootstrap.css
upvote count: 1

http://stackoverflow.com/a/32098741
answers question: http://stackoverflow.com/q/26255872
score: 0
type: Answer
has body: You can upload your files during form submit. var submitFormData = true; $('#fileFieldId').fileupload({ dataType : 'json', autoUpload : false, add : function(e, imageData){ $("#yourFormId").on("subimt",function(){ if(sendData){ imageData.formData = $("#yourFormId").serializeArray(); submitFormData = false; } imageData.submit(); }); }, done: function(e,data){ submitFormData = true; } });

http://stackoverflow.com/comment/41114822
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26216565
has text: Pravish, why did you undo Bhushan Kawadkar's edit making it possible for people to see your HTML (and not change anything else)? It was a good edit, there was a good reason for it.
type: Comment

http://stackoverflow.com/comment/41344440
type: AnswerComment
comment on: http://stackoverflow.com/a/26341132
type: Comment
has text: This is a valid alternative approach, but it implies that there'll be some evaluating of these additional flags prior to reuse. Which also implies they'll have to be declared and set. If OP's experiencing performance issues with a simple splice then I think there are other considerations to make.
score: 0

http://stackoverflow.com/a/26330324
upvote count: 5
has comment: http://stackoverflow.com/comment/41359185
has comment: http://stackoverflow.com/comment/41358206
has body: You need to make use of pos1 and pos2. Currently, you're only changing the left property of each image by the amount of random movement per cycle. You need to either: add the random value to the present value of left or keep the total left value in the pos variables, and assign their values to the left property One-image example of where your code is wrong: left is 0 rand is 5 left is now 5 next rand is 10 left is now 10 and this is the error as it should be 5+10 Here's a simple example demonstrating what I mean: http://jsfiddle.net/6ja5fx1f/
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26330267
has comment: http://stackoverflow.com/comment/41357165
has comment: http://stackoverflow.com/comment/41356703

http://stackoverflow.com/comment/41359435
type: AnswerComment
comment on: http://stackoverflow.com/a/26348556
score: 0
type: Comment
has text: where should we write in an html code..when i write in the end,it shows script not used.please help

http://stackoverflow.com/comment/41255629
has text: @Regent, I've added another javascript function..By the time the page got redirected , the javascript will be triggered out of nowhere .. so it will redirect them to another page..
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26292618
score: 0

http://stackoverflow.com/comment/41325891
score: 0
type: AnswerComment
type: Comment
has text: Instance specific private variables. You can have private variables on the prototype: http://stackoverflow.com/a/21800194/1641941
comment on: http://stackoverflow.com/a/26329919

http://stackoverflow.com/comment/41128269
type: Comment
has text: script 1 and 2 works fine individual but when they are together one stops workin
comment on: http://stackoverflow.com/a/26218594
score: 0
type: AnswerComment

http://stackoverflow.com/a/26312383
has comment: http://stackoverflow.com/comment/41291495
downvote count: 0
has body: Make sure that you are not using smart quotes in your arrays. Try retyping the " character, even if it looks normal. Smart quotes are a very annoying issue for developers alike. Addition: The find and replace feature is very helpful with this.
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26312260
answers question: http://stackoverflow.com/q/26312260
type: AcceptedAnswer

http://stackoverflow.com/a/26211416
answers question: http://stackoverflow.com/q/26211337
score: 0
type: Answer
has body: here you go: DEMO $('input:button').click(function(){ var result=''; $('input:text').each(function(){ if(result==''){ result+=$(this).val(); } else{ result+='|'+$(this).val(); } }); $('#newText').html(result); });
accepted answer of: http://stackoverflow.com/q/26211337
type: AcceptedAnswer

http://stackoverflow.com/q/26275398
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/86428
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26276229
upvote count: 2
tagged with: iframe
has answer: http://stackoverflow.com/a/26275742
has comment: http://stackoverflow.com/comment/41223995
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41224161
has body: I have an input which has a dynamic value as it's editable. Either Onkeypress in textarea or after onclick event fired on clicking the btn id it should append the input value in another iframe which is to be dynamic because input is to be changeable. So without page load the iframe's script innerHTML should refresh. I've done something but it's not working. HTML &lt;textarea id="inpt" cols="30" rows="10"&gt;&lt;/textarea&gt; &lt;div&gt;&lt;input type="submit" value="append" id="btn" style="width:60px;height:20px;background:grey"&gt;&lt;/div&gt;&lt;br&gt; &lt;iframe id="fr" name="fr" style="width:300px;height:300px;"&gt;&lt;/iframe&gt; JS var _script = document.createElement('script'); _script.type = 'text/javascript'; var iFrame = document.getElementById('fr'), iFrameBody, t = document.getElementById("inpt"), btn = document.getElementById('btn'); function injectJS(content, val) { if ( iFrame.contentDocument ) { iFrameBody = iFrame.contentDocument.getElementsByTagName('body')[0]; } else if ( iFrame.contentWindow ) { iFrameBody = iFrame.contentWindow.document.getElementsByTagName('body')[0]; } iFrameBody.appendChild(content); content.innerHTML = val; console.log(iFrameBody); } //t.onkeypress = injectJS(_script, t.value); btn.onclick = injectJS(_script, t.value); And here's the working demo. http://jsfiddle.net/n5fdywb9/
has answer: http://stackoverflow.com/a/26276094
accepted answer: http://stackoverflow.com/a/26276094
has title: I want to dynamically append the script in an iframe after onclick or onkeypress event fired
type: Question
downvote count: 0
possible better answer: http://stackoverflow.com/a/26275742

http://stackoverflow.com/comment/41079244
type: Comment
type: QuestionComment
has text: Just an FYI, you don't need to use 'progress.css('width','0'+'%');', use 'progress.css('width','0%');' and if your targeting the .bar div, your variable should be 'var progress = $('.progress .bar');'. See my fiddle below using '$().animate();'
score: 0
comment on: http://stackoverflow.com/q/26196889

http://stackoverflow.com/comment/41098757
type: Comment
has text: There is no jquery involved here. Why bring a library in for something that css can take care of natively?
comment on: http://stackoverflow.com/a/26207802
type: AnswerComment
score: 0

http://stackoverflow.com/a/26223190
has body: The easiest answer to this is probably to wait for Mosquitto v1.4 to ship which has baked in Websocket support. If you can't wait for it to ship you can build from the development head stream which will get you what your looking for. You've not said what platform you are running the broker on, but these instructions should help on Linux: http://goochgooch.wordpress.com/2014/08/01/building-mosquitto-1-4/
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26222890
answers question: http://stackoverflow.com/q/26222890
has comment: http://stackoverflow.com/comment/41128716
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/comment/41337582
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26337011
has text: @Don Android 2.3 stock. And yes. i want to add a simple rtl to change the direction.
score: 0

http://stackoverflow.com/q/26272244
has comment: http://stackoverflow.com/comment/41218448
has body: I used ajax script and a partial view to post and retrieve a data without any postback or view flickering. Using the ajax script below would return the partialview with its content in a specified div element called "ajaxcom" as you can see on the script below. Now, I noticed that after the data("which is the partialview") is retrieve and displayed on the specified div element of a view, it seems that it's like a static or it became like read-only file because it doesn't respond anymore, in which I meant that, on that partialview I have some functionalities like button to click with corresponding jquery codes but it's not even firing or responding when you click any button on it. Is this normal scenario that if you want to display a partial view in a specified div element using ajax script would behave like this? If so, what are my options here if I still want to resume the functionalities within that partial view like I want to click a button on it? Any thoughts or suggestions? Thanks... Ajax Script: $.ajax({ url: '/AjaxComms/AjaxComments', type: "POST", data: dataObject, dataType: "json", success: function(result) { $.ajax({ url: '/AjaxComms/DisplayPartial', type: "GET", contentType: 'application/html; charset=utf-8', data: dataObject, dataType: "html", success: function (result) { $('#ajaxcom').html(result); // this is where I'm displaying my partial view } }) }, error: function (result) { alert(status); } }); PartialView: @model CRUD_AJAX.Models.CommentReplyModel @foreach (var item in Model.Comments ) { @Html.DisplayFor(modelItem => item.name) @Html.DisplayFor(modelItem => item.comment) @foreach (var item2 in Model.Replies.Where(r => r.Id == item.Id)) { @Html.DisplayFor(modelItem => item2.name) @Html.DisplayFor(modelItem=>item2.reply) } item.Id)" /> }
has comment: http://stackoverflow.com/comment/41219562
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41218182
score: 0
has comment: http://stackoverflow.com/comment/41219585
answer count: 1
has comment: http://stackoverflow.com/comment/41218927
has title: What has caused my partial view inside the div element of the view to become paralyze?
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/26273845
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/41218342
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41218565
has comment: http://stackoverflow.com/comment/41218207
has comment: http://stackoverflow.com/comment/41218416
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26273845
has comment: http://stackoverflow.com/comment/41218177
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41219106

http://stackoverflow.com/q/26335964
has comment: http://stackoverflow.com/comment/41385857
has comment: http://stackoverflow.com/comment/41357149
has title: If you assign Javascript to a button that is already issuing a redirect, does that script get executed?
type: UnansweredQuestion
tagged with: ruby-on-rails
answer count: 0
score: 0
type: Question
tagged with: erb
tagged with: javascript
tagged with: jquery
has body: Update I figured out that Turbolinks causes links within your application to load content asynchronously, so $(document).ready() only fires on the first page you visit. Therefore, adding jQuery turbolinks gem solves the page refresh part of this problem. The JS failing to execute on a different view though is still unresolved. I have a JS function that refuses to work correctly in a Rails 4 project where I am using Foundation 5. The JS seems syntactically fine and the way I am laying out my files seem fine too. However, The divs targeted in my function are behaving strangely. The more I looked into it, the more confused I got with how Javascript gets passed around in Rails so I thought I'd ask here. The setup is I have the JS function located in a scripts.js file which is located in app/assets/javascripts. My application.js file is including //= require_tree . which should include all my script files I believe. application.js //= require jquery //= require jquery.ui.all //= require jquery_ujs //= require turbolinks //= require foundation //= require_tree . $(function() { $(document).foundation(); }); scripts.js $(document).ready(function() { // Hide after div by default $('#after-review').hide(); $('.instruction #after-review').hide(); $(".form-actions.review-create .button").on("click", function() { alert("I am an alert box!"); $('#before-review').hide(); $('#after-review').show(); $('.instruction #after-review').show(); }); }); I am fairly confident that the function itself is syntactically fine. It's a simple one that just hides and shows two divs. Here is where it gets confusing for me though. When I visit the page where the $('#after-review').hide(); div is supposed to be hidden initially, it isn't hidden...until I refresh the page that is. For some reason the JS doesn't seem to hide the div on page load. Also, when I click the button that is supposed to trigger the event, nothing happens. The submit button redirects from the form, back to the show page like it…
tagged with: jquery-events
has comment: http://stackoverflow.com/comment/41386175

http://stackoverflow.com/q/26219812
has title: How to send PUT and DELETE when JavaScript is disable from your browsers?
has comment: http://stackoverflow.com/comment/41121169
answer count: 3
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: rest
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41121209
has answer: http://stackoverflow.com/a/26219941
has answer: http://stackoverflow.com/a/26220075
has body: How are you going to send REST's action words to the server if javascript is disable from your browser? Below is my simple test for sending RESTful verbs to the server. It tightly relies on ajax's type: 'GET', etc. jquery, $( document ).ready(function() { $(".rest-get").click(function(){ $.ajax({ type: 'GET', url: 'server.php', dataType: "json", // data type of response success: function(){ // } }); return false; }); $(".rest-post").click(function(){ $.ajax({ type: 'POST', url: 'server.php', dataType: "json", // data type of response success: function(){ // } }); return false; }); $(".rest-put").click(function(){ $.ajax({ type: 'PUT', url: 'server.php', dataType: "json", // data type of response success: function(){ // } }); return false; }); $(".rest-delete").click(function(){ $.ajax({ type: 'DELETE', url: 'server.php', dataType: "json", // data type of response success: function(){ // } }); return false; }); }); html, Get Post Put Delete php, <?php echo $_SERVER['REQUEST_METHOD'];?> // you get PUT, DELETE, GET, or POST I know we can send POST from html's form, ... But what about PUT and DELETE? If there is no way to send them from HTML's form, then your webservice or API would fail when the javascript is killed off the browsers then?
tagged with: php
has comment: http://stackoverflow.com/comment/41121211
possible better answer: http://stackoverflow.com/a/26219977
type: Question
accepted answer: http://stackoverflow.com/a/26219941
has answer: http://stackoverflow.com/a/26219977
has comment: http://stackoverflow.com/comment/41121232

http://stackoverflow.com/comment/41348861
type: Comment
comment on: http://stackoverflow.com/q/26343446
type: QuestionComment
has text: Yes, I just didn't fully mock the code, add the required style to label so it works in chrome, I've edited it.
score: 0

http://stackoverflow.com/comment/41153717
type: AnswerComment
score: 0
type: Comment
has text: can you make jsfiddle please?
comment on: http://stackoverflow.com/a/26227789

http://stackoverflow.com/a/26235116
has comment: http://stackoverflow.com/comment/41180788
has comment: http://stackoverflow.com/comment/41149327
score: 0
has body: top: 0%; left: 0%; height: 450px; width: 800px; border: solid 1px blue; background-color:rgba(255,255,255,0.5) !important; /* overrule other css statements */ margin:1; text-align:left; outline-style: none; display:none; overflow:hidden; zoom: 1; z-index:999999999999; If this does not work, you should check if another CSS statement is changing the background to the color white or #FFF. Check chrome and inspect the element for style
type: Answer
has comment: http://stackoverflow.com/comment/41149268
has comment: http://stackoverflow.com/comment/41149584
answers question: http://stackoverflow.com/q/26235012

http://stackoverflow.com/a/26213686
has body: You seem to be on the right path. But you are only checking for the first closing tag. Try checking for two closing tags with this regex: <[^>]+>[^>]+> This will match: Hello there i am an input string with html content . With your js it will look like: var StrippedString = OriginalString.replace(/<[^>]+>[^>]+>/g,""); I don't think you need to ignore the case in this situation as you aren't specifying any case for any character Edit: As user torazaburo pointed out, that expression will not work for nested tags. If you want a regular expression that will be able to work with nested tags, you need to begin using matching groups: <([A-z]+).+\/\1> The parenthesis are "matching group 1" and whatever is matched within the parenthesis is repeated when we recall the matching group with \1. This will match: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et imperdiet nisl, et scelerisque augue. It will also correctly match: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et imperdiet nisl, et scelerisque augue. Because the regex is looking for the last occurrence of the closing tag. Not simply the first one.
type: Answer
answers question: http://stackoverflow.com/q/26213587
has comment: http://stackoverflow.com/comment/41111142
has comment: http://stackoverflow.com/comment/41111454
score: 0
has comment: http://stackoverflow.com/comment/41109561
has comment: http://stackoverflow.com/comment/41110841

http://stackoverflow.com/comment/41204920
comment on: http://stackoverflow.com/q/26258125
has text: Oh okay, thanks. Is that an easy fix to my code above or would it need to be rewritten from scratch...?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26257013
has comment: http://stackoverflow.com/comment/41189901
accepted answer: http://stackoverflow.com/a/26258315
type: AnsweredQuestion
score: 1
has body: I have the following array to monitor the widgets to be initiated by an app I'm working on: widgets = [{ selector: ".table", init: function() {...} }, { selector: ".anothertable", init: function() {...} }] Each init function is invoking a plugin. When a plugin has finished its tasks it pushes the selector (e.g ".table") to another array called "readyWidgets" Now the question is this: How can I tell once all selectors nested under the primary widgets array are present in readyWidgets array? I'm kind of having a blackout, although I have a solution, I think there is a better one I'm missing. This is what I came up with: init: function() { // this will hold each widget selector // and look for it later in readyWidgets array var widgetsPending = [] // initialize each widget in widgets array // (only if the selector matches at least one element) this.widgets.forEach(function(widget) { $(widget.selector).length &amp;&amp; widgetsPending.push(widget.selector) &amp;&amp; widget.init() }, this) // use setInterval to check if all values in widgetsPending array // are present within this.readyWidgets var that = this var interval = setInterval(function() { // temporary just to make sure the interval is cleared console.log(that.readyWidgets) // if a value in widgetsPending is not found in // that.readyWidgets, pageReady will be marked false var pageReady = true widgetsPending.forEach(function(selector) { if (that.readyWidgets.indexOf(selector) == -1) { pageReady = false } }) // if widgetsReady is true, clear the interval pageReady &amp;&amp; clearInterval(interval) }, 300) } If you have any suggestions on how improve this, do tell :)
tagged with: loops
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41191135
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26258315
has comment: http://stackoverflow.com/comment/41190040
answer count: 1
has comment: http://stackoverflow.com/comment/41190646
has title: while vs setInterval
has comment: http://stackoverflow.com/comment/41189605
favorite count: 0
has comment: http://stackoverflow.com/comment/41189580

http://stackoverflow.com/q/26316041
has comment: http://stackoverflow.com/comment/41298146
score: -2
has answer: http://stackoverflow.com/a/26316307
has title: How to get data from a serialized array?
possible better answer: http://stackoverflow.com/a/26316113
tagged with: http://stackoverflow.com/tag/json
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/26316113
accepted answer: http://stackoverflow.com/a/26316307
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
upvote count: 0
has body: Please help me print values to the console and the keys for the field "nickname." Here is the serialized data array in JSON: [ {"fields": {"user_permissions": [], "nickname": "Иван Тургенев ёпта", "groups": [], "avatar": "", "gender": 1, "skype": "dfsdf", "other": "zzzz", "phone": "2014-0921"}, "model": "app_accounts.userprofile_deferred_avatar_date_joined_email_fic679ed35161c7ba80f007b4235db5148", "pk": 4}, {"fields": {"user_permissions": [], "nickname": "Антон Чех", "groups": [], "avatar": "", "gender": 2, "skype": "dfsdf", "other": "qqqqqq", "phone": "21"}, "model": "app_accounts.userprofile_deferred_avatar_date_joined_email_fic679ed35161c7ba80f007b4235db5148", "pk": 5} ] I want the result to be something like this: 0: zzzzzz 1: qqqqqq How can I do that?
has comment: http://stackoverflow.com/comment/41297998
favorite count: 0
has comment: http://stackoverflow.com/comment/41298264
type: Question

http://stackoverflow.com/q/26353247
has comment: http://stackoverflow.com/comment/41366339
linked to: http://stackoverflow.com/q/1759987
tagged with: firebug
tagged with: firefox
downvote count: 0
tagged with: javascript
has body: Is there any tool (preferably extension/add-on to any browser) that allows you to see all the value changes of the desired JS variable in real time? Previously I did something like this (in pure JS): var someVariable; var previousValueOfSomeVariable; var f = function() { if (previousValueOfSomeVariable != someVariable) { console.log(Date.now(), someVariable); previousValueOfSomeVariable = someVariable; } } var TO = setInterval(f, 100); It did the trick, but was, of course, inefficient (in reality the function was bigger, while it required object-copy function if variable was an object and further checks)... UPDATE I'm aware of console tools, but I'd like to see the history of changes, like: someVariable 0ms: undefined; 10ms: 5; 40ms: 'someothervalue'; 150ms: null etc. (Milliseconds are given for example purposes, not necessarily required). Maybe it can be done within the DevTools console, but I don't know how.
favorite count: 0
has comment: http://stackoverflow.com/comment/41366872
has answer: http://stackoverflow.com/a/37204467
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/76625954
has title: Debugging: Is it possible to see value of JS variable in real time?
upvote count: 6
answer count: 4
has answer: http://stackoverflow.com/a/26353753
tagged with: google-chrome
type: Question
tagged with: debugging
linked to: http://stackoverflow.com/q/1029241
has comment: http://stackoverflow.com/comment/41366538
score: 6
has answer: http://stackoverflow.com/a/55599220

http://stackoverflow.com/comment/50324042
score: 3
type: Comment
has text: @Qiming `push` returns the new array length so that won’t work. Also, `setState` is async and React can queue several state changes into a single render pass.
comment on: http://stackoverflow.com/a/26254086
type: AnswerComment

http://stackoverflow.com/comment/41341615
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26339526
has text: Read the question again. He doesn't want to scroll down on the current page. He wants to load a new html document that scrolls down based on the link that was used to open that html document.

http://stackoverflow.com/comment/41181857
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/26252519
has text: `$(this).attr('rel');`
type: Comment

http://stackoverflow.com/comment/41316713
has text: Your variant 2 doesn't work, there's no variable `val` and it doesn't seem to recurse into objects even after I add `var val = obj[k];`
type: Comment
comment on: http://stackoverflow.com/a/26305514
score: 0
type: AnswerComment

http://stackoverflow.com/a/26295389
has body: $.each(data,function(index,value){ //Make sure value is the string you want to attach by putting a debugger here; //Append code; $('#secondselect').append($("&lt;option&gt;&lt;/option&gt;") .attr("value",key) .text(value)); }); In the code posted by you $(document).ready(function($){ $('#firstselect').change(function(){ $.get("{{ url('api/dropdown')}}", { option: $(this).val() }, function(data) { $.each(data, function(key, value) { /**********************************************/ //Evaluate and make sure value is string debugger; console.log(value); /*************************************************/ $('#secondselect').append($("&lt;option&gt;&lt;/option&gt;") .attr("value",key) .text(value)); }); }); }); });
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26295180
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26295180

http://stackoverflow.com/comment/41356809
type: QuestionComment
has text: Dont you miss a `GROUP BY` in your SQL? The query might be valid with `HAVING` and without `GROUP BY` but does it really do what you want? Do you Need a `WHERE` instead? [see here](http://stackoverflow.com/questions/6924896/having-without-group-by) on that Topic, too)
comment on: http://stackoverflow.com/q/26345537
score: 0
type: Comment

http://stackoverflow.com/q/26199557
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41083498
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41083534
has title: Jquery Select2.js Does Not Work After Migration
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26199807
answer count: 1
has comment: http://stackoverflow.com/comment/41083729
tagged with: jquery
favorite count: 0
tagged with: jquery-select2
has comment: http://stackoverflow.com/comment/41083583
has body: I migrated my form from a file to another with different file location. I also have changed all reference paths on that new file. Unfortunately, the select2() function doesn't work anymore in $("#field1, #field2, #field3").select2(); To make sure if the path is right, I have tried to put alert('hello from select2.js'); And the alert function works when I open the form. And it makes me confused why the .select2() function does not work. Did I miss something? Please help and thanks for advance.

http://stackoverflow.com/a/40582454
has body: With lodash, this can be done using keyBy: var arr = [ { key: 'foo', val: 'bar' }, { key: 'hello', val: 'world' } ]; var result = _.keyBy(arr, o =&gt; o.key); console.log(result); // Object {foo: Object, hello: Object}
answers question: http://stackoverflow.com/q/26264956
downvote count: 2
upvote count: 49
score: 47
type: Answer
has comment: http://stackoverflow.com/comment/108521608

http://stackoverflow.com/comment/47947855
comment on: http://stackoverflow.com/a/26371130
has text: For those who want to download Selenium HQ, please check the latest here - http://www.seleniumhq.org/download/
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41096310
type: AnswerComment
comment on: http://stackoverflow.com/a/26206434
type: Comment
has text: I did use :nth-child(odd) before but this seems to only work with child if I'm not wrong!! because it has no affect on my code as its shown in my question!
score: 0

http://stackoverflow.com/comment/41092570
has text: @gummage you pass the function pointer as the callback. If you pass myfun(e) then the return value of the function is passed. Thats why the above example is not (function(e){...})(e) which would be equivalent to what you tried.
comment on: http://stackoverflow.com/a/26204140
score: 2
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26348327
has title: Javascript Regex: match text after pattern
answer count: 1
favorite count: 0
tagged with: regex
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41361990
has body: I have text of a form where there are paragraphs of text with urls interspersed. I would like to parse the string creating html links from the urls and using the following text as the descriptive link text i.e. possibly some text here http://www.somewebsite.com/some/path/somepage.html descriptive text which may or may not be present into descriptive text which may or may not be present This SO article, JS: Find URLs in Text, Make Links, is relevant to what I'm attempting to do but simply places the url as the text within the anchor element. I am successfully matching the url with var urlRE= new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?([^ ])+"); but am unsure how to perform the match afterwards. I came across this post Regex - Matching text AFTER certain characters which seems applicable. I've attempted to wrap my RE in /(?<=my url pattern here).+/ but get an error stating that there is an invalid group and that this results in an invalid RE. In that post J-Law mentions that Variable-length lookbehinds aren’t allowed Is this what I'm attempting to do? Since I'm already matching the url I feel like I could easily do some substring math to get the desired results. I'm just using this as an attempt to learn more about regex. Thanks
has answer: http://stackoverflow.com/a/26348406
accepted answer: http://stackoverflow.com/a/26348406
linked to: http://stackoverflow.com/q/13924274
type: Question
score: 3
has comment: http://stackoverflow.com/comment/41357780
tagged with: javascript
linked to: http://stackoverflow.com/q/19625183
upvote count: 3

http://stackoverflow.com/comment/41230794
type: Comment
comment on: http://stackoverflow.com/q/26278989
score: 0
type: QuestionComment
has text: I don't think you need the declare keyword. That is for wrapping JavaScript libraries in modules I believe. If you're writing your code in typescript you shouldn't need to "declare".

http://stackoverflow.com/comment/128868359
type: Comment
comment on: http://stackoverflow.com/a/26242643
type: AnswerComment
score: 0
has text: I know this is an old question, but how do you keep your namespace clean when doing that?

http://stackoverflow.com/comment/41324757
comment on: http://stackoverflow.com/q/26329060
has text: Look at [viewRender](http://fullcalendar.io/docs/display/viewRender/). Sounds like you know what to do
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26206057
favorite count: 0
has comment: http://stackoverflow.com/comment/41095907
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41096033
has comment: http://stackoverflow.com/comment/41095653
upvote count: 1
has comment: http://stackoverflow.com/comment/41096414
has comment: http://stackoverflow.com/comment/41095500
has comment: http://stackoverflow.com/comment/41096277
score: 1
has comment: http://stackoverflow.com/comment/41095354
has comment: http://stackoverflow.com/comment/41096139
type: Question
has comment: http://stackoverflow.com/comment/41096371
tagged with: javascript
tagged with: jquery
has title: attribute contains selector meta og not working
has comment: http://stackoverflow.com/comment/41096191
has comment: http://stackoverflow.com/comment/41095253
has comment: http://stackoverflow.com/comment/41095543
downvote count: 0
has body: i have a script to get the base url to use in meta tags and it doesn't seem to be working... 1st: My head looks like this... **** and my script is... function baseURL () { base = window.location.protocol+"//"+window.location.host+"/"; return base; }; $("meta[property='og:url']").attr("content", base+"/property/detail/ "); when i load the page, the og:url is still blank... CURRENT REVISIONS from shell.js: /*******************************/ /* GET BASE URL /*******************************/ function baseURL () { base = window.location.protocol+"//"+window.location.host+"/"; $("meta[property='og:url']").attr('content', base+'/property/detail/ ') return base; };baseURL(); console.log(base); html: A.A. Green Realty, Inc. - Wood Co. Real Estate Experts url of demo site: http://aagreen.dev.activemls.com

http://stackoverflow.com/a/26301946
type: Answer
has body: var r = /(^;#|;#(?=;#)|;#$)/; var s1 = ";#47;#Doe, Jane;#13;#Bronte, Charlotte"; var s2 = "1;#Smith, John;#;#13;#Bronte, Charlotte"; var s3 = "1;#Smith, John;#47;#Doe, Jane;#13;#"; console.log(s1.replace(r,"")); console.log(s2.replace(r,"")); console.log(s3.replace(r,"")); &lt;script src="https://getfirebug.com/firebug-lite-debug.js"&gt;&lt;/script&gt; This simply matched either: ^;# start of string followed by ;# ;#(?=;#) ;# followed by another ;# ;#$ ;# followed by end of string As others have suggested, it might be easier to just split the string into an array. You can join it back together again if you must have a string back: var s = "1;#Smith, John;#47;#Doe, Jane;#13;#Bronte, Charlotte"; var account = "1;#Smith, John"; // for example var search = account.split(";#"); var split = s.split(";#"); var i = split.indexOf(search[0]); // search by number first if (i!==-1 &amp;&amp; split[i+1] === search[1]) { // check the username matches too! split.splice(i,2); // we remove the matching elements console.log(split); // John Smith was removed } console.log(split.join(";#")); // If you must have a string after removing a user &lt;script src="https://getfirebug.com/firebug-lite-debug.js"&gt;&lt;/script&gt;
answers question: http://stackoverflow.com/q/26301726
score: 0

http://stackoverflow.com/a/26353536
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41366756
downvote count: 0
has body: If the aim is to hide and show bloc when your textarea is focus. Use a focusins/focusout event. $('#c_text').focusin(function() { $('#hidden_part').css('display','block'); }).focusout( function() { $('#hidden_part').css('display','none'); }); Avantage is simple, if you select your field with tab navigation, events are called.
answers question: http://stackoverflow.com/q/26353422
type: Answer

http://stackoverflow.com/a/26292779
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41256236
downvote count: 0
has body: You can try this : &lt;script src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { $('input[type=checkbox]').change(function(){ var chk = $(this).attr('rel'); if($(this).is(':checked')) { $('input[type=checkbox]').each(function(){ var chks = $(this).attr('rel'); if(chk != chks) { $(this).attr('disabled','true'); } }); } else { var temp =''; $('input[type=checkbox]').each(function(){ if($(this).is(':checked')) { temp = $(this).attr('rel'); return false; } }); $('input[type=checkbox]').each(function(){ if(temp != chk) { $(this).removeAttr('disabled'); } }); } }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41255777
answers question: http://stackoverflow.com/q/26292568
score: 1

http://stackoverflow.com/comment/41266601
has text: @RahulUkil Instead of increasing to a number between the current one and your max, just increase by a random number between 1 an d `(max-min) / steps`.
comment on: http://stackoverflow.com/q/26297997
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26213255
type: Question
has answer: http://stackoverflow.com/a/27442839
tagged with: handler
tagged with: hapi.js
tagged with: header
tagged with: javascript
favorite count: 0
has title: hapi set header before sending response
has answer: http://stackoverflow.com/a/26217850
has comment: http://stackoverflow.com/comment/87381505
upvote count: 10
has answer: http://stackoverflow.com/a/76023627
has answer: http://stackoverflow.com/a/26217393
has answer: http://stackoverflow.com/a/26216504
has body: In a hapi handler I try to set a header of my response earlier in the code before sending back a view. reply().header('cache-control', 'no-cache'); {....} reply.view('myView', myContext); Do you I have to use the hold method? In that case how do I reuse the response when rendering the view? Thanks for your help.
tagged with: node.js
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/50182096
score: 10
answer count: 6

http://stackoverflow.com/comment/41176153
type: AnswerComment
comment on: http://stackoverflow.com/a/26248875
has text: Hi @Vivek, Thank you for the recommended suggestion. It works but not completely. When the page is open, i see all the urls and images, but when i click on the images then all the urls disapear and only the url related to that image will be appeared. So what we need to do it to hide the whole urls before any click is done. Which I already have done through my CSS. Do you have any suggestion? Thank you very much.
type: Comment
score: 0

http://stackoverflow.com/q/26287745
tagged with: javascript
tagged with: colors
has comment: http://stackoverflow.com/comment/41247244
accepted answer: http://stackoverflow.com/a/26287841
has title: How can I generate a list of random shades of a particular color? (e.g. random shade of orange)
downvote count: 0
has comment: http://stackoverflow.com/comment/41247200
favorite count: 0
possible better answer: http://stackoverflow.com/a/26288204
score: 6
has answer: http://stackoverflow.com/a/26288204
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26287841
type: Question
tagged with: c#
answer count: 2
has body: Has anyone come across a way to choose a random shade of a particular color? Sounds silly at first, but what I'm trying to do is come up with an automated way to generate chart series colors, and those colors need to be branded. So it seems reasonable that there is a way to maybe generate a range of color values for a particular color range; I've some examples on the web but not the logic. So I'm looking for a way to say: generate a list of shades of Red, or Orange, or Green, etc. "Well, what constitutes a 'green' ?" Ok well maybe if I provide a hex value, the library/class could determine that it is a green and then generate a list of other greens, etc. So that way, before rendering the chart, I could say "This brand uses a color scheme that uses lots of blues, so randomly choose series colors that are types of blues." Does that make sense? This is in either C# or Javascript would be helpful. I'd rather understand how to build one myself, but if any libraries already exist out there, it would be helpful.

http://stackoverflow.com/q/26347302
type: Question
tagged with: javascript
has title: pdf viewer is not loading pdf file in safari browser
has comment: http://stackoverflow.com/comment/41355917
has comment: http://stackoverflow.com/comment/41355980
tagged with: pdf.js
type: UnansweredQuestion
has body: am unable to view pdf file using pdf.js in safari broswer and the viwer is working fine in chrome and mozilla ,when and trying to load pdf in safari its displaying error like PDF.js v1.0.473 (build: 1694cd8) Message: InvalidPDFException how to solve this error?and am using safari 5.1.7 and i have included compatibility.js and used the below script but its not working in safari browser &lt;script type="text/javascript"&gt; PDFJS.disableWorker = true; &lt;/script&gt;
answer count: 0
score: 0

http://stackoverflow.com/comment/41098078
score: 0
type: Comment
type: QuestionComment
has text: Percentages to hide bits of the image as the site narrows, rather than scale the image? Do you have an example please?
comment on: http://stackoverflow.com/q/26207279

http://stackoverflow.com/a/26268090
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26267684
has body: To rotate anything you can use context method - rotate(). We can't rotate line like object (like in SVG), but we can - redraw canvas with new rotated line. var canvas = document.getElementById("example"), ctx = example.getContext('2d'), canvasWidth = canvas.width, canvasHeight = canvas.height, p1 = {x:canvasWidth/2+50,y:canvasHeight/2}, p2 = {x:p1.x,y:p1.y+100}, middlePoint = {x:(p1.x+p2.x)/2,y:(p1.y+p2.y)/2}; function rotate(degree,rotatePoint,drFunc) { rotatePoint = rotatePoint || {x:canvasWidth/2,y:canvasHeight/2}; // Clear the canvas ctx.clearRect(0, 0, canvasWidth, canvasHeight); // Move registration point to the center of the canvas ctx.translate(rotatePoint.x, rotatePoint.y); // Rotate 1 degree ctx.rotate((Math.PI / 180)*degree); // Move registration point back to the top left corner of canvas ctx.translate(-rotatePoint.x, -rotatePoint.y); drFunc(); } function drFunc(){ ctx.beginPath(); ctx.strokeStyle = "black"; ctx.moveTo(p1.x, p1.y); ctx.lineTo(p2.x, p2.y); ctx.stroke(); ctx.closePath(); } rotate(1,middlePoint,drFunc); Fiddle

http://stackoverflow.com/a/26327640
upvote count: 1
has body: I'm sorry, can't help myself: you can use another client-side library instead of jQuery (like Prototype, YUI, MooTools, Underscore etc. etc. etc.) and instead of the server-side language PHP you could use ASP, JSP, ColdFusion etc. etc. etc. (I am trying to make a point with this tough..) Actually you could even do both client (you don't need jQuery on the client-side for this, in fact you're not using it now) and server-side (using node.js) in pure javascript. But what you really want to do (skipping learning a server-side language and SQL) is probably nowhere supported (I wrote probably because.. well.. almost everything is possible.. if you (can) code it). From a more realistic real-world point-of-view: Most hosts will support the PHP/MySQL combo by default.. Finding a 'regular' and 'cost-effective' host and an 'easy' migration plan (to just about any other average host), I'd highly recommend just biting the bullet and start toying with PHP and some SQL.
downvote count: 0
answers question: http://stackoverflow.com/q/26327022
type: Answer
score: 1

http://stackoverflow.com/comment/41124824
comment on: http://stackoverflow.com/a/26221247
type: Comment
score: 0
type: AnswerComment
has text: yes, but with different div's. Example: hh mm:ss

http://stackoverflow.com/q/26238703
has body: I'm trying to mimic the function on this url: https://www.healthcare.gov/find-premium-estimates/ I've provided a link and the code to what I have so far. I'm trying to create the same feature of the site like when you click an answer to the provided questions it then slides you down to the next question... One issue I'm having with my jsfiddle example is if you click "No" on Question 2 it won't show the hidden div but, if you click "Yes" on the same question it then works... This also happens to question 3 if you click the "Don't Know". Here is what I have: http://jsfiddle.net/0vc9ep17/34/ Here is the HTML Question 1 Answer 1 Answer 2 Question 2 Yes No Question 3 maybe Don't know Question 4 maybe Don't know Here is the Javascript jQuery(document).ready(function () { jQuery('input[type="radio"]').click(function () { if (jQuery(this).attr("value") == "answer1") { jQuery(".answer1").show("slow"); jQuery(".answer1and2").show("slow"); } if (jQuery(this).attr("value") == "answer2") { jQuery(".answer2").show("slow"); jQuery(".answer1and2").show("slow"); } if (jQuery(this).attr("value") == "answer3") { jQuery(".answer3").show("slow"); jQuery(".answer4").show("slow"); jQuery(".answer1and2").show("slow"); } if (jQuery(this).attr("value") == "answer5") { jQuery(".answer1and2").show("slow"); jQuery(".answer3").show("slow"); jQuery(".answer4").show("slow"); jQuery(".answer5").show("slow"); } }); }); Here is the CSS .hide { display: none; } Thanks for any help!
tagged with: javascript
has answer: http://stackoverflow.com/a/26238961
answer count: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41157940
possible better answer: http://stackoverflow.com/a/26238961
has comment: http://stackoverflow.com/comment/41157379
favorite count: 0
has answer: http://stackoverflow.com/a/26240087
accepted answer: http://stackoverflow.com/a/26240087
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has title: Radio button clicked to slide & show hidden div & pass a value
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41156829

http://stackoverflow.com/q/26343243
has answer: http://stackoverflow.com/a/26418251
tagged with: mustache
tagged with: handlebars.js
possible better answer: http://stackoverflow.com/a/26418251
type: AnsweredQuestion
has body: Is it possible to only display surrounding HTML around a Handlebar (or Mustache) variable if it is not empty (or not null, etc)? For instance, given the following context and template: var data = {field1:123,field2:123,field3:'',field4:123}; field1: {{field1}} field2: {{field2}} field3: {{field3}} field4: {{field4}} The following would be displayed: field1: 123 field2: 123 field4: 123
has answer: http://stackoverflow.com/a/26344360
type: Question
score: 0
answer count: 2
has title: Display surrounding HTML only if Handlebar variable is given
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26344360
tagged with: templates

http://stackoverflow.com/comment/41396146
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26329060
has text: @RichardHermanson, seems like a right thing to do. Could be some problems with timezones though.

http://stackoverflow.com/q/26251990
tagged with: jestjs
type: AnsweredQuestion
downvote count: 0
score: 7
has body: When writing tests for React components, you have to render them into the DOM in order to make assertions about their correctness. For example, if you want to test that a certain class is added to a node given a certain state, you have to render into a DOM node, then inspect that DOM node via the normal DOM API. The thing is, considering React maintains a virtual DOM into which it renders, why can't we just assert on the virtual DOM once the component is rendered? That seems to me like a very good reason to have something like the virtual DOM. Have I missed something?
tagged with: dom
has comment: http://stackoverflow.com/comment/41189520
tagged with: unit-testing
has title: Why does React require jsdom for testing?
type: Question
has answer: http://stackoverflow.com/a/26265371
accepted answer: http://stackoverflow.com/a/26265371
tagged with: javascript
tagged with: reactjs
upvote count: 7
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/41364527
comment on: http://stackoverflow.com/a/26333855
score: 0
type: AnswerComment
has text: No its not solved completely but its closer to what I want. I still did not get the dynamic part completely.
type: Comment

http://stackoverflow.com/comment/41209914
has text: If your page isn't posting back under any other conditions/scenario, you could just re-enable the button inside of a `If Page.IsPostBack Then ... End If` inside of your Page_Load handler. Or maybe I am wrong..
comment on: http://stackoverflow.com/q/26267508
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26346205
tagged with: javascript
has title: Trouble adding Slick Carasel from kenwheeler to Foundation template
score: 0
has answer: http://stackoverflow.com/a/32362863
tagged with: zurb-foundation
answer count: 1
has body: I am having trouble adding the Slick Carousel to my foundation template. I followed the instructions from here: http://kenwheeler.github.io/slick/ and read the answeres to the question here: Problems with using Kenwheeler slick carousel, and made the requested changes. But, my carousel is still not working. I put the Slick folder referenced in my local folder. Here is my HTML: **** | Welcome your content your content your content
tagged with: carousel
tagged with: slick.js
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/26237700
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41154310
has comment: http://stackoverflow.com/comment/41156992
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41155059
has comment: http://stackoverflow.com/comment/41154557
type: Question
has title: Trying to use window.onbeforeunload to trigger function
has body: In a webpage I am creating I want to disconnect from a connection automatically upon the closing of the page, yet it refuses to work. The disconnect function exists in an external .js file that is correctly referenced in the head. &lt;script&gt; window.onbeforeunload = disconnect; &lt;/script&gt; I previously changed it from "disconnect();" to "disconnect;". There was no change in result. Any help would be appreciated.
tagged with: function
tagged with: javascript
has answer: http://stackoverflow.com/a/26238213
score: 0

http://stackoverflow.com/comment/41297295
comment on: http://stackoverflow.com/a/26315545
has text: I can't make this work. Can you please show me a working example using JSFiddle? Note that I cannot adjust the body tag of the page, however, I can add "disabled" to the submit button, and all Javascript must be inserted inside the body tag. So just above the form.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41346870
score: 0
type: AnswerComment
type: Comment
has text: so from how I see this here, this just eliminates the process of needing the second function to generate the object in general, and builds the array of objects just right there?
comment on: http://stackoverflow.com/a/26341794

http://stackoverflow.com/comment/41367352
type: Comment
comment on: http://stackoverflow.com/q/26353649
has text: You can also use websockets with PHP, no need for Node.js if you can't run it.
score: 0
type: QuestionComment

http://stackoverflow.com/a/26312012
score: 0
upvote count: 1
downvote count: 1
has body: var names = ['Lee' , 'Cooper']; var arr = []; arr.push({selection:names}); result = JSON.stringify(arr);
has comment: http://stackoverflow.com/comment/41290934
has comment: http://stackoverflow.com/comment/41290851
type: Answer
answers question: http://stackoverflow.com/q/26311812

http://stackoverflow.com/comment/41125104
comment on: http://stackoverflow.com/a/26221684
score: 0
type: AnswerComment
type: Comment
has text: Tx Karl so simple yet i didn't see it. Your stitch solution looks like a winner ;)

http://stackoverflow.com/comment/41217792
type: Comment
comment on: http://stackoverflow.com/a/26271941
score: 0
type: AnswerComment
has text: No matter from where the values come...after receiving the value, store it in a variable and use the variable in the above syntax. Only exclude the double quotes when populating values from variables

http://stackoverflow.com/a/26335214
has body: You should use JSON.stringify() The JSON.stringify() method converts a value to JSON, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified. Example var newObjcet = { mobilePageAds: 1 }; alert(JSON.stringify(newObjcet)); You can create object like var text = { website: { userId : userId, status : status siteName: siteName, sizeMaster : [ { entry_id: entry_id, adType : { entry_id: entry_id, } }, { entry_id: entry_id, adType : { entry_id: entry_id, } } ] } }
answers question: http://stackoverflow.com/q/26335192
upvote count: 2
has comment: http://stackoverflow.com/comment/41333754
downvote count: 0
has comment: http://stackoverflow.com/comment/41333801
has comment: http://stackoverflow.com/comment/41333931
has comment: http://stackoverflow.com/comment/41334102
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41333783

http://stackoverflow.com/comment/41315357
has text: @torazaburo I feel that my question is clearly stated above, the history discussion is completely irrelevant (although it could also have helped me)
comment on: http://stackoverflow.com/q/26324097
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26289386
has body: You should be able to compile to JS using openfl, replacing packages flash.display... with openfl.display... should not be necessary but may help you figuring the problem or will eventually work as it should. Also make sure you use the command "openfl test html5" in your application.xml folder to compile, if you don't have this file, then grab it from any openfl example, what it does is calling the haxe compiler with the proper arguments and configurations for the openfl project.
has comment: http://stackoverflow.com/comment/41263390
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41292228
has comment: http://stackoverflow.com/comment/41250946
score: 1
answers question: http://stackoverflow.com/q/26287945
downvote count: 0

http://stackoverflow.com/comment/41183611
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26253085
type: Comment
has text: This is not a static resource - rather an API call to a server. But I would expect that the waiting time to be long (before the server would answer) and when the server answers, the reception itself should as quick as the first call.

http://stackoverflow.com/a/26297392
accepted answer of: http://stackoverflow.com/q/26292292
type: Answer
has body: Here is the form where you can got the answer of your thing... this is one way of doing it...!!! &lt;?php $form=$this-&gt;beginWidget('CActiveForm', array( 'id'=&gt;'customer-form-guest', 'enableClientValidation'=&gt;true, 'clientOptions'=&gt;array( 'validateOnSubmit'=&gt;true, 'afterValidate' =&gt; 'js:function(form, data, hasError) { if(hasError) { alert("There are errors in form inputs please resolve it."); } else { var r = confirm("Are you sure y7ou want to do this ..?"); if(r == true) { return true; } else { return false; } } }' ), 'htmlOptions'=&gt;array('role'=&gt;"form")));
score: 0
answers question: http://stackoverflow.com/q/26292292
type: AcceptedAnswer

http://stackoverflow.com/comment/41313381
has text: instance1 will have a reference to the initial prototype object through \_\_proto\_\_ property. So, when you change the prototype object, instance1 already has the old reference. instance2.__proto__ gets a reference to the new prototype object.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26324395
score: 3

http://stackoverflow.com/comment/41120706
has text: how can this be different? they still have the same name but a different one now
comment on: http://stackoverflow.com/a/26219475
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26404289
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26300499
has body: Ok, so I finally found the answer: It turned out that the elements were hiding under other elements. That is why it worked in phone layout.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26300499

http://stackoverflow.com/comment/41289916
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26311225
score: 0
has text: Could you please add a link where you have used this code? Seems like css is creating a problem

http://stackoverflow.com/comment/41172161
type: AnswerComment
type: Comment
has text: "All JS engines that someone tested with a specific example" is by no means a generic reason. In general, you cannot rely on this, and you should not - especially when answering a newbie question.
score: 1
comment on: http://stackoverflow.com/a/26246038

http://stackoverflow.com/q/26278352
has comment: http://stackoverflow.com/comment/41228743
type: Question
has title: jQuery AJAX vs. XMLHttpRequest
tagged with: cakephp
tagged with: javascript
has comment: http://stackoverflow.com/comment/41228978
has comment: http://stackoverflow.com/comment/41229029
has body: Searching for an answer for this question I got as a result that follwing code works fine: xhr = new XMLHttpRequest(); xhr.onreadystatechange=function() { if (xhr.readyState==4 &amp;&amp; xhr.status==200) { response = JSON.parse(xhr.responseText); if(typeof response =='object') { $('#modal-spinner-seo-update').hide('slow'); jQuery.each(result, function(field, message) { $('#seo-'+field).next('div.error-message').html(message).fadeIn('fast'); }); } else { $('#modal-spinner-seo-update').hide('slow', function() { $("#seo-widget-message-success").fadeIn('slow').delay(2000).fadeOut('slow'); }); } return false; } }; xhr.open('GET','/metas/saveMetas?model='+model+'&amp;f_key='+f_key+'&amp;pagetitle='+pagetitle+'&amp;keywords='+keywords+'&amp;description='+description+'&amp;niceurl='+niceurl, true ); xhr.send(); but this jQuery Version does not work. So can anyone spot the mistake? Is there any? The jQuery AJAX version works fine on my localhost but the server it does not, but return an 403 Forbidden Error. It is a cakePHP project. So I hope someone ca tell me whats wrong or what setting is missing. $.ajax({ url: '/metas/saveMetas', data: { "model": model, "f_key": f_key, "pagetitle": pagetitle, "keywords": keywords, "description": description, "niceurl": niceurl }, dataType: 'json', complete: function(){ return false; }, success: function(result) { if(typeof result =='object') { $('#modal-spinner-seo-update').hide('slow'); jQuery.each(result, function(field, message) { $('#seo-'+field).next('div.error-message').html(message).fadeIn('fast'); }); } else { $('#modal-spinner-seo-update').hide('slow', function() { $("#seo-widget-message-success").fadeIn('slow').delay(2000).fadeOut('slow'); }); } return false; } });
score: 0
has comment: http://stackoverflow.com/comment/41228986
answer count: 1
tagged with: jquery
tagged with: ajax
linked to: http://stackoverflow.com/q/26228813
tagged with: php
has comment: http://stackoverflow.com/comment/41228826
has answer: http://stackoverflow.com/a/26278468
accepted answer: http://stackoverflow.com/a/26278468
type: AnsweredQuestion

http://stackoverflow.com/a/26249534
answers question: http://stackoverflow.com/q/26249138
accepted answer of: http://stackoverflow.com/q/26249138
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: You need an id attribute and data-setup for each video. https://github.com/videojs/video.js/blob/stable/docs/guides/setup.md#step-2-add-an-html5-video-tag-to-your-page
upvote count: 1

http://stackoverflow.com/q/26269433
has body: Pretty much, my question is simple, and I did search for a similar question before posting this. I would like to know how to make Javascript code repeatedly execute while the page is open, rather than the code running once and being done or only responding to event handlers. I pretty much want the Javascript equivilant of: $(document).ready(function() { }); But I do not want to use Jquery because it is less efficient. I want to check an === condition every single frame.
type: UnansweredQuestion
has title: Check Javascript Condition Every Frame
has comment: http://stackoverflow.com/comment/41214471
type: Question
has answer: http://stackoverflow.com/a/79311446
has answer: http://stackoverflow.com/a/26269502
tagged with: javascript
has comment: http://stackoverflow.com/comment/41213231
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26269529
has comment: http://stackoverflow.com/comment/41213414
has comment: http://stackoverflow.com/comment/41213246

http://stackoverflow.com/q/26262502
has comment: http://stackoverflow.com/comment/41200174
tagged with: css
has body: I am trying to fill a div with images and size the images to fit just right in their place. The problem is that when the image is not loaded, the dimensions x , y cannot be sampled from the element. This is what I am trying to do after looking up some examples on stack overflow. It does not work... $.each(data.data.children, function(i,item){ // Some images come in with a busted link. Hence the IF statement... if (item.data.url.indexOf(".jpg")&gt;0){ var imgTitle = item.data.title; imgTitle = imgTitle; $('&lt;div id="c'+i+'"&gt;&lt;/div&gt;').attr("class", "imgDiv").appendTo("#photos"); $("&lt;img/&gt;").attr("src", item.data.url).attr("id", "pic"+i).attr("class", "pics").appendTo("#c"+i); .load(function(){ $(this).fadein("slow"); if (iWidth&gt;iHeight){ $('#pic'+i).width(270); $('#pic'+i).height(parseInt(270-imgTitle.length/3)); } }); $("&lt;p&gt;"+imgTitle+"&lt;/p&gt;").attr("id", "p"+i).appendTo("#c"+i); $("&lt;img/&gt;").attr("src", "images/RedX2.png").attr("class", "xit").appendTo("#c"+i); var mImg = $('#pic'+i)[0]; } }); Alternatively, is there a way to do proportional fitting of an image inside the padding space proportionally? TIA DK
has answer: http://stackoverflow.com/a/26262691
linked to: http://stackoverflow.com/q/3029422
has comment: http://stackoverflow.com/comment/41200331
type: AnsweredQuestion
has title: Fire function after each image is loaded
has comment: http://stackoverflow.com/comment/41200813
has comment: http://stackoverflow.com/comment/41200237
tagged with: image
type: Question
accepted answer: http://stackoverflow.com/a/26262691
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41200827
tagged with: jquery
has comment: http://stackoverflow.com/comment/41202228
score: 0
has comment: http://stackoverflow.com/comment/41201158
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41307383
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26321028
score: 1
has text: See this: http://stackoverflow.com/questions/7375120/why-is-arr-faster-than-arr-new-array

http://stackoverflow.com/comment/41252244
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26290701
type: Comment
has text: You could create a script tag and add it after the div element.

http://stackoverflow.com/a/26279355
answers question: http://stackoverflow.com/q/26279049
score: 0
has body: You can get value of textbox using this: $(document).ready(function() { $('[id^=textbox]').blur(function(){ var value = $(this).val(); console.log(value); });
type: Answer

memory-leaks
tags question: http://stackoverflow.com/q/26239782
tags question: http://stackoverflow.com/q/26343724
tags question: http://stackoverflow.com/q/26252296
tags question: http://stackoverflow.com/q/26239205
type: Tag
tags question: http://stackoverflow.com/q/26197968
tag name: memory-leaks
tags question: http://stackoverflow.com/q/26336514

http://stackoverflow.com/a/26245318
answers question: http://stackoverflow.com/q/26244982
score: 0
has comment: http://stackoverflow.com/comment/41169440
has body: You are close...Take a look at this example: var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var $canvas = $("#canvas"); var canvasOffset = $canvas.offset(); var offsetX = canvasOffset.left; var offsetY = canvasOffset.top; var radianAngle = 0; var cx = 225; var cy = 125; var radius = 50; // image loader var imageURLs = []; var imagesOK = 0; var imgs = []; imageURLs.push("https://dl.dropboxusercontent.com/u/139992952/multple/cars.png"); imageURLs.push("https://dl.dropboxusercontent.com/u/139992952/multple/plane.png"); imageURLs.push("https://dl.dropboxusercontent.com/u/139992952/multple/cars1.png"); imageURLs.push("https://dl.dropboxusercontent.com/u/139992952/multple/plane1.png"); loadAllImages(start); function loadAllImages(callback) { for (var i = 0; i < imageURLs.length; i++) { var img = new Image(); imgs.push(img); img.onload = function() { imagesOK++; if (imagesOK >= imageURLs.length) { callback(); } }; img.onerror = function() { alert("image load failed"); } img.crossOrigin = "anonymous"; img.src = imageURLs[i]; } } var imagesY = 20; var targets = []; var selectedTarget = -1; function start() { var n = imgs.length / 2; for (var i = 0; i < n; i++) { var target = imgs[i + n]; ctx.drawImage(target, 15, imagesY); targets.push({ x: 15, y: imagesY, width: target.width, height: target.height, image: imgs[i] }); imagesY += target.height + 10; } } function handleMouseDown(e) { e.preventDefault(); x = parseInt(e.clientX - offsetX); y = parseInt(e.clientY - offsetY); for (var i = 0; i < targets.length; i++) { var t = targets[i]; if (x >= t.x && x <= t.x + t.width && y >= t.y && y <= t.y + t.height) { selectedTarget = i; draw(x, y); } } } function handleMouseMove(e) { if (selectedTarget < 0) { return; } e.preventDefault(); mouseX = parseInt(e.clientX - offsetX); mouseY = parseInt(e.clientY - offsetY); draw(mouseX, mouseY); } function draw(mouseX, mouseY) { var dx = mouseX - cx; var dy = mouseY - cy; var radianAngle = Math.atan2(dy, dx); …
type: Answer
has comment: http://stackoverflow.com/comment/41174498

http://stackoverflow.com/q/26265707
score: 1
type: Question
has body: I've a function A which accepts at run-time another function B as parameter and calls it. The problem is the function B needs some parameters, but I don't know how to pass the function B, with parameters, to the the function A. Example: function callerFunction(c) { alert("The caller is calling the function!"); c(c.arguments); }; var a = "hello"; function thisOne(d) { d = "I changed my way"; alert(d); }; callerFunction( /* I NEED TO PASS THE 'thisOne' with the parameter/variable 'a' here, and then call it inside 'callerFunction' */);
has title: Assign a function with custom parameters without calling the funcion
upvote count: 1
has answer: http://stackoverflow.com/a/26265729
accepted answer: http://stackoverflow.com/a/26265729
answer count: 1
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26217049
has title: How to open a browser tab and track it's activities using javascript?
type: Question
has comment: http://stackoverflow.com/comment/41115694
has comment: http://stackoverflow.com/comment/41115768
tagged with: javascript
tagged with: jquery
has body: I have a page in which i have created a JavaScript function where, and i have saved 10 URLs in an array. Now i want to have a onclick event on some button, which when clicked should call a function in which we pass that URLs array as parameter. What i want is, the function should be able to open a new tab in the current browser, visit each of the URL one by one for 2 minutes and return progress like Which one is being visited, how many already visited etc to it's parent page? Is it possible? I'm not able to frame a logic of how this can be achieved, may be using JavaScript or jQuery? Please suggest. Regards
score: 0
has answer: http://stackoverflow.com/a/26217787
answer count: 1
has comment: http://stackoverflow.com/comment/41115826
type: UnansweredQuestion

http://stackoverflow.com/a/26211028
has comment: http://stackoverflow.com/comment/41257423
type: Answer
has comment: http://stackoverflow.com/comment/41105455
has comment: http://stackoverflow.com/comment/41105346
score: 1
has comment: http://stackoverflow.com/comment/41104862
upvote count: 1
answers question: http://stackoverflow.com/q/26210904
has comment: http://stackoverflow.com/comment/42714670
downvote count: 0
has body: i guess the better way is to do like below , Intialize an array variable var markers= new Array(); &lt;c:forEach var="s" items="${list.rows}"&gt; markers.push(${s.latitude}) markers.push(${s.longitude}) &lt;/c:forEach&gt; And push it into the array using .push method . make it simple using EL

http://stackoverflow.com/comment/41287480
type: Comment
comment on: http://stackoverflow.com/a/26285066
has text: Ok. I didn't realize it was saving the variable values as it kept executing the left side of the or operator. Is it creating a closure from not finishing the statement? Or just in getting backed up in line in the call stack? Or both?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26231490
tagged with: javascript
tagged with: jquery
tagged with: html-table
score: 0
has comment: http://stackoverflow.com/comment/41143752
answer count: 1
has title: CSVToTable not working
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41143280
has comment: http://stackoverflow.com/comment/41144111
has answer: http://stackoverflow.com/a/26231653
tagged with: import-from-csv
type: Question
has body: I am currently using this plugin http://code.google.com/p/jquerycsvtotable/, but for some reason can't convert my CSV to a html table. I followed the documentation provided, but it just sticks on "Loading CSV Data...", can someone help me out please?

cookies
tags question: http://stackoverflow.com/q/26272812
tags question: http://stackoverflow.com/q/26233989
tags question: http://stackoverflow.com/q/26321368
tags question: http://stackoverflow.com/q/26229860
type: Tag
tags question: http://stackoverflow.com/q/26253276
tags question: http://stackoverflow.com/q/26295544
tags question: http://stackoverflow.com/q/26283976
tags question: http://stackoverflow.com/q/26281034
tags question: http://stackoverflow.com/q/26333243
tag name: cookies
tags question: http://stackoverflow.com/q/26254935
tags question: http://stackoverflow.com/q/26325483
tags question: http://stackoverflow.com/q/26293720
tags question: http://stackoverflow.com/q/26240476
tags question: http://stackoverflow.com/q/26337424
tags question: http://stackoverflow.com/q/26239891
tags question: http://stackoverflow.com/q/26340275
tags question: http://stackoverflow.com/q/26325177
tags question: http://stackoverflow.com/q/26253310
tags question: http://stackoverflow.com/q/26295762
tags question: http://stackoverflow.com/q/26288261

http://stackoverflow.com/a/26223606
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26223490
answers question: http://stackoverflow.com/q/26223490
type: Answer
upvote count: 1
score: 1
has body: Don't use editMode as scope variable. Use it as todo's object field (todo.editMode). Set it to true for new todo object.

http://stackoverflow.com/a/26335995
has body: fireEvent is a really old method which is only supported on Internet Explorer versions 8 and lower. You should instead use dispatchEvent if you want to handle up-to-date browsers. Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent(). You have to create the Event manually though - you can't just call dispatchEvent('onclick'). I've pulled the first bit of the following code from this answer. var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); function enemyTurn() { document.getElementById('yourGrid00').dispatchEvent(evt); } JSFiddle demo.
downvote count: 0
has comment: http://stackoverflow.com/comment/41335290
score: 5
answers question: http://stackoverflow.com/q/26335963
has comment: http://stackoverflow.com/comment/41335403
upvote count: 5
has comment: http://stackoverflow.com/comment/41335297
type: Answer

http://stackoverflow.com/a/26198642
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26198516
has body: To provide data (via php) to your WebApp, you should build a REST-Service (in php simply a new php file), perform the database requests in the php file and give the data as JSON String back to the client. So in your client App you can make a AJAX request to get your data and parse the responseText with JSON.parse(responsetext) to a javascript object. Now you can access the data in the object. For building webapps with databindings you should have a look on AngularJS. Angular is using a very interesting model to build nice Apps without thinking to much about DOM. Best regards Dustin P.S.: You should also have a look on nodeJS. It's much faster than php and you can code javascript on client and serverside. Furthermore it has a bunch of features like Socket.IO where php cannot hold.
answers question: http://stackoverflow.com/q/26198516
type: AcceptedAnswer

http://stackoverflow.com/comment/41334475
score: 0
type: Comment
has text: Ok, I changed the function name to deleteEmployee but still nothing happens.
comment on: http://stackoverflow.com/a/26335614
type: AnswerComment

http://stackoverflow.com/comment/41326551
type: QuestionComment
has text: @dandavis - I think I understand partially. I believe I would want to get the x/y of the center of each span and "draw a line" between the two, however I'm not sure how I would determine the intercept.
score: 0
comment on: http://stackoverflow.com/q/26331217
type: Comment

http://stackoverflow.com/comment/41263794
has text: "_is there a way to keep the table after destroy (without dataTable initialisation)?_"? What do you mean? The original table is kept upon fnDestroy, unless you pass true, `.fnDestroy(true)`.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26290615

http://stackoverflow.com/q/26213011
has answer: http://stackoverflow.com/a/26213167
tagged with: internet-explorer
has title: HTML5 Drag&Drop issue in Internet Explorer (dataTransfer property access not possible)
tagged with: javascript
score: 25
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/28740710
tagged with: jquery
favorite count: 0
tagged with: drag-and-drop
type: Question
possible better answer: http://stackoverflow.com/a/26660055
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26660055
has body: I'm trying to implement basic drag&amp;drop functionality with HTML5. It works totally fine in Chrome, but in IE10 I get an 0x8000ffff - JavaScript runtime error: Unexpected call to method or property access. error in the line setData. function handleDragStart(e) { e.dataTransfer.effectAllowed = 'move'; e.dataTransfer.setData("dropTarget", g.destination); } var cols = $("#" + g.source + " tbody &gt; tr"); [].forEach.call(cols, function (col) { col.addEventListener('dragstart', handleDragStart, false); }); What am I doing wrong?
has comment: http://stackoverflow.com/comment/78751419
upvote count: 25
accepted answer: http://stackoverflow.com/a/28740710
linked to: http://stackoverflow.com/q/12803235
answer count: 3

http://stackoverflow.com/comment/41431016
type: AnswerComment
comment on: http://stackoverflow.com/a/26323300
type: Comment
has text: Dear @GitaarLAB, Please help if you can find a solution for [related](http://stackoverflow.com/questions/26388689/how-to-upload-multiple-files-in-jquery-mobile-using-window-resolvelocalfilesyste)
score: 0

http://stackoverflow.com/comment/41205191
type: QuestionComment
comment on: http://stackoverflow.com/q/26265139
has text: @MarcB I think they want it the other way around, to use a php variable in JavaScript, which is just fine
score: 0
type: Comment

http://stackoverflow.com/comment/41224736
has text: Function is there please cehck `NewWindow()` in myjavascript.js
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26276046
type: Comment

http://stackoverflow.com/q/26293073
tagged with: javascript
has title: Checking for specific DOM element in Javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/26293145
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 2
has body: I have a slight problem in the code regarding the if condition check for DOM element, the requirement is that I should not allow 'BR' tag to pass function testclick(handler) { var nodeList = handler.childNodes; for (var item in nodeList) { if (typeof (nodeList[item].tagName) !== 'undefined') { if (typeof (nodeList[item].tagName !== 'BR')) { alert(nodeList[item].tagName); } } } } the working Jsfiddle is here http://jsfiddle.net/ganesh_vellanki/agana62d/6/ can some one suggest where I went wrong Thanks for time
accepted answer: http://stackoverflow.com/a/26293144
has comment: http://stackoverflow.com/comment/41256136
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26293144
type: Question
has answer: http://stackoverflow.com/a/26293126
possible better answer: http://stackoverflow.com/a/26293145
downvote count: 0

http://stackoverflow.com/comment/41119604
type: Comment
has text: PHP 101 - `'\n'` !== `"\n"`.... one is a The first is a literal `\ ` character followed by the letter `n`; the second is a newline character. Single quotes and double quotes make a big difference: [PHP Docs](http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26218829

http://stackoverflow.com/a/26267717
has body: Use mouse coordinates to tell where the shot is and use this as your html tag: You could also use the onclick on your canvas like:
answers question: http://stackoverflow.com/q/26267667
has comment: http://stackoverflow.com/comment/41211604
has comment: http://stackoverflow.com/comment/41210209
accepted answer of: http://stackoverflow.com/q/26267667
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/26332212
score: 1
has comment: http://stackoverflow.com/comment/41328170
type: Answer
has comment: http://stackoverflow.com/comment/41328107
upvote count: 1
has comment: http://stackoverflow.com/comment/41328161
has body: When you invoke a function, without new operator, this will refer the default global object (in browsers window object), where clear function is not defined. That is why you are getting this error. To make this refer an object created from the log constructor function, you need to call it like this. new log("Error", true); Now, JavaScript creates an Object and this will refer that newly created object. And when you do this.clear, it will first check if the current object has clear method, which it doesn't have. So, it will go up the prototype chain to find it in log's prototype and that function will be executed.
answers question: http://stackoverflow.com/q/26332173
downvote count: 0

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

http://stackoverflow.com/comment/41218761
type: QuestionComment
comment on: http://stackoverflow.com/q/26270750
has text: What @Pointy says makes no sense; see section 9 “The XHTML syntax” in W3C HTML5 PR.
score: 0
type: Comment

http://stackoverflow.com/a/26236113
has body: Use a negative lookahead, &gt; "12.34.56.78".replace(/\.(?![^.]*$)/g,"_") '12_34_56.78' &gt; "12.34.56.78.".replace(/\.(?![^.]*$)/g,"_") '12_34_56_78.'
has comment: http://stackoverflow.com/comment/41151401
has comment: http://stackoverflow.com/comment/41151392
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41151267
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26235906
has comment: http://stackoverflow.com/comment/41151815

http://stackoverflow.com/comment/41137628
has text: Just a reminder: the first **A** in AJAX stands for **Asynchronous**.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26228304

http://stackoverflow.com/a/26254874
has comment: http://stackoverflow.com/comment/41186813
answers question: http://stackoverflow.com/q/26254534
has comment: http://stackoverflow.com/comment/41186131
has body: hi **@Abishek** i have created a plunker with all code include **@dfsq** answer i think you want to this Angular code is this var appfi = angular.module('firstApp', []); appfi.controller('MainController', function($scope){ $scope.checks= [ {'name': 'sports'}, {'name': 'movies'}, {'name': 'Others'} ]; $scope.setcolor = function(chk) { $scope.selected = chk; }; $scope.isSelected = function(check) { return $scope.selected === check; }; } ); HTML code &lt;body ng-app="firstApp"&gt; &lt;h1&gt;Hello Plunker!&lt;/h1&gt; &lt;div ng-controller="MainController"&gt; &lt;ul class="list-holder"&gt; &lt;li ng-repeat="check in checks" ng-class="{active : isSelected(check)}"&gt; &lt;button ng-click="setcolor(check)"&gt;{{check.name}} &lt;/button&gt; &amp;nbsp; &lt;button ng-click="setcolor(check)"&gt;{{check.name}} &lt;/button&gt; &amp;nbsp; &lt;button ng-click="setcolor(check)"&gt;{{check.name}} &lt;/button&gt; &amp;nbsp; &lt;hr&gt; &lt;/li&gt; &lt;/ul&gt; &lt;hr&gt; &lt;/div&gt; &lt;/body&gt; Plunker
score: 0
type: Answer

terminal
tags question: http://stackoverflow.com/q/26301757
tag name: terminal
type: Tag

http://stackoverflow.com/q/26316787
tagged with: css
has title: On click on the arrow the flags animated shifted one position to the left or right
score: 2
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26317260
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm new in JS an jQuery. I need some help. I have next task. There are 6 flags on my site with left arrow on the left and right arrow on the right. When you click on the arrow flags animated shifted one position to the left or right. By moving the flags to the left to the right leaves a copy of the leftmost flag and vice versa. Here's the code: $(document).ready(function() { $(".arrow.left").click(function() { var position1 = $("#it").position(); $("#en").animate(position1); }); }); .slider { position: absolute; top: 135px; left: 150px; } .slider > div { display: inline-block; } .slides { width: 550px; height: 53px; position: relative; font-size: 70%; } .arrow { width: 16px; height: 15px; background: url(pictures/arrowsSprite.png) no-repeat; } .arrow.left { background-position: -16px 0; } .left:hover { background-position: 0 0; } .arrow.right { background-position: -32px 0; } .right:hover { background-position: -48px 0 } .slides > div span { min-width: 50px; position: absolute; display: inline-block; top: 25px; left: 15px; text-align: center; } #de, #es, #it, #en, #fr, #nl { position: absolute; color: #0094d9; } #de { top: 10px; } #es { top: 2px; left: 90px; } #it { left: 180px; } #en { left: 280px; } #fr { top: 2px; left: 373px; } #nl { top: 10px; left: 463px; } Немецкий Испанский Итальянский Английский Французский Голландский I understand, that for one changing position of one flag to another (for example "#en" to the position of "#it") I can do next: ` But I can't understand, how the position of "#en" can be change after next click to the position of "#es"? Then to the position of "#de" and so on.
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41200963
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26240365
has text: It worked! I couldn't express how grateful I am. Thanks so much!!

uikit
tag name: uikit
type: Tag
tags question: http://stackoverflow.com/q/26265745

http://stackoverflow.com/comment/41253987
score: 5
comment on: http://stackoverflow.com/q/26291810
type: QuestionComment
type: Comment
has text: Have you tried anything yet?...

http://stackoverflow.com/a/26316564
type: Answer
answers question: http://stackoverflow.com/q/26316536
has body: Try this, you just need to join the names too. function showArray() { var names = new Array("Bob ", "Alice ", "Ceaser ", "David"); names.sort(); document.getElementById("loop").innerHTML = names.join(" "); } showArray(); David Alice Bob Ceaser
has comment: http://stackoverflow.com/comment/41299334
has comment: http://stackoverflow.com/comment/41299200
has comment: http://stackoverflow.com/comment/41299151
downvote count: 0
score: 8
upvote count: 8

http://stackoverflow.com/q/26202962
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
type: AnsweredQuestion
has body: I'm building a web site with javascript. I have a leaflet map and some markers on it. I have a list and checkboxes on a div. I want to filter markers with checkboxes. But my onclick function can not reach marker's data. like this: function onclick() { //delete marker //i can not reach marker's data from here } function initializeMap() { //something function markers() { //my markers defined here function onclickIwant() { //something } } } I want to use onclickIwant function for checkbox onclick or reach marker's data from onclick function. How can I do? my html: title id1 id2 id3
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26203316
accepted answer: http://stackoverflow.com/a/26203316
has title: javascript - checkbox onclick function in another function

http://stackoverflow.com/comment/41188373
type: Comment
type: QuestionComment
has text: Whoa my bad! Deleted all cookies possible and went for an easier approach. It works now! :) Thanks @Steve! Will add a answer with solution.
comment on: http://stackoverflow.com/q/26254935
score: 0

http://stackoverflow.com/a/26196213
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26196182
has body: In most cases, you can just use the this keyword to get the object on which your function was called as a method upon. In your example: var user = { name: 'Example', age: 687, address: { firstLine: '20', secondLine: 'St Fake', thirdLine: 'Fakeland' }, logName: function(inputName, inputAge) { console.log(this.name); // ^^^^ console.log(this.age); // ^^^^ console.log(inputAge); console.log(inputName); } }; user.logName('Richard', 20); // method call on `user`, // so `this` will become the `user` in the function
score: 2
answers question: http://stackoverflow.com/q/26196182
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26296181
tagged with: google-chrome
type: Question
score: 4
has title: Simple message passing between 'background.js' to 'contentScript.js'
has body: I'm trying to apply the following flow : binding for keys in the background.js , when pressing them : Sending message from background.js -&gt; contentScript.js Sending response from contentScript.js -&gt; background.js Here is the menifit.json definitions: "background" : { "scripts" : ["background.js"], "persistent" : true }, "content_scripts": [ { "matches": ["*://*/*"], "js": ["contentScript.js"] } ], The binding part is working fine. Here is the code in background.js : chrome.runtime.sendMessage({greeting: "hello"}, function(response) { console.log(response.farewell); }); }); Here is the code in contentScript.js : chrome.runtime.onMessage.addListener(HandleMessage); function HandleMessage(request, sender, sendResponse) { if (request.greeting == "hello") { sendResponse({farewell: "goodbye"}); } }; This is the error that i'm getting: Error in event handler for (unknown): Cannot read property 'farewell' of undefined Stack trace: TypeError: Cannot read property 'farewell' of undefined at chrome-extension://fejkdlpdejnjkmaeadiclinbijnjoeei/background.js:64:26 at disconnectListener (extensions::messaging:338:9) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at EventImpl.dispatchToListener (extensions::event_bindings:397:22) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26) at EventImpl.dispatch_ (extensions::event_bindings:379:35) at EventImpl.dispatch (extensions::event_bindings:403:17) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at Event.publicClass.(anonymous function) [as dispatch] (extensions::utils:93:26) In case of changing console.log(response.farewell); to console.log("OK"); it is working fine , but that way i cant get the values from the contentScript.js What should i change ?
has answer: http://stackoverflow.com/a/26296331
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: google-chrome-extension
upvote count: 4
has answer: http://stackoverflow.com/a/26296690
accepted answer: http://stackoverflow.com/a/26296690
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26296331
downvote count: 0
has comment: http://stackoverflow.com/comment/41271058

http://stackoverflow.com/comment/41179614
score: 0
comment on: http://stackoverflow.com/q/26250916
type: Comment
type: QuestionComment
has text: @dfsq Thanks for your reply, but I cannot help myself out by referring to the link you gave.

http://stackoverflow.com/q/26204743
type: AnsweredQuestion
tagged with: alert
has answer: http://stackoverflow.com/a/26204912
type: Question
tagged with: javascript
has title: How do I initiate a javascript:alert box only if a certain word is typed into the input field?
has body: Type 'Spark' or 'Fire' to Attack. So this is my code so far I type anything in it gives me a text box saying the Enemy has whatever health, I would like to have it where only if you type spark or fire into the input field you get that text box and if you type something random like skdfslkfha nothing happens (unlike now :/)
score: 0
accepted answer: http://stackoverflow.com/a/26204912
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: textbox

timer
tags question: http://stackoverflow.com/q/26196358
tag name: timer
tags question: http://stackoverflow.com/q/26208250
tags question: http://stackoverflow.com/q/26311470
type: Tag
tags question: http://stackoverflow.com/q/26319846
tags question: http://stackoverflow.com/q/26300316
tags question: http://stackoverflow.com/q/26317480
tags question: http://stackoverflow.com/q/26207724
tags question: http://stackoverflow.com/q/26349281

http://stackoverflow.com/comment/41305962
type: Comment
type: QuestionComment
has text: The result of [`typeof`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) will always be a string. The comparison should be against `'undefined'` (with quotes) instead of the [global variable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).
score: 1
comment on: http://stackoverflow.com/q/26320386

http://stackoverflow.com/comment/41183245
type: QuestionComment
has text: Yes, thats absolutely correct. The + button I am struggling with brings up a list of existing Skill records which are in stored in a different table (predictably, the Skills table).
comment on: http://stackoverflow.com/q/26233827
score: 0
type: Comment

http://stackoverflow.com/comment/41270844
type: QuestionComment
comment on: http://stackoverflow.com/q/26284997
has text: You need to write AngularJS parts. Have a look here: http://beletsky.net/2013/11/simple-authentication-in-angular-dot-js-app.html
score: 0
type: Comment

http://stackoverflow.com/comment/130527755
has text: we need ajax for a complete and success callback. this doesn't answer it
type: Comment
comment on: http://stackoverflow.com/a/32436751
type: AnswerComment
score: 0

http://stackoverflow.com/q/26265689
score: 0
has answer: http://stackoverflow.com/a/26275511
answer count: 2
possible better answer: http://stackoverflow.com/a/26265766
has body: I want to use Angular within an existing non-Angular webapp, injecting the app into the page and binding to a particular div. Since the app might require multiple Angular apps to be bound to different divs (showing and hiding them as necessary), it seems I can't use ngApp and must do manual bootstrapping. However, this requires doing something ugly like below, where I have to define a boostrap function, which I call from the app I inject the Angular app into. Is there a way to avoid having to call doBootstrap in this scenario? I'd basically like to inject and start the app automatically. This doesn't happen on initial load, so document.ready style solutions aren't an option. Also, it would be great to avoid having to define an ng-controller on the div, but that's a lesser issue. angular.module('TestApp', []) .controller('TestAppController', ['$scope', function ($scope) { document.getElementById('myDiv').innerText = 'testing'; }]); var doBootstrap = function() { angular.bootstrap(document.getElementById('myDiv'), ['TestApp']); };
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26275511
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: Automatically bootstrap Angular app injected into web app
has answer: http://stackoverflow.com/a/26265766

http://stackoverflow.com/q/26239568
has comment: http://stackoverflow.com/comment/41158111
possible better answer: http://stackoverflow.com/a/26239706
has answer: http://stackoverflow.com/a/26239714
has answer: http://stackoverflow.com/a/26239706
tagged with: http://stackoverflow.com/tag/html
has title: Why is css height not working?
tagged with: css
has answer: http://stackoverflow.com/a/26240040
has comment: http://stackoverflow.com/comment/41158115
has comment: http://stackoverflow.com/comment/41157922
answer count: 4
has comment: http://stackoverflow.com/comment/41158557
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41158672
has comment: http://stackoverflow.com/comment/41158125
has comment: http://stackoverflow.com/comment/41158590
type: Question
has body: If I try to set the height of an element I can't get it working. I have tried doing it with css and jquery but both without result. This is the css I tried: #slider{ width:100%; height:100%; background-image: url(/img/background.jpg); background-size: 100%; } and this the Jquery code var screen_height = $(document).height(); $('#slider').css('Height', screen_height ); does somebody know how to fix this. This is not the first time I have this problem and normally I can fix it with Jquery but now even that doesn't work.
has answer: http://stackoverflow.com/a/26239717
has comment: http://stackoverflow.com/comment/41158263
accepted answer: http://stackoverflow.com/a/26240040
has comment: http://stackoverflow.com/comment/41157987
tagged with: javascript
has comment: http://stackoverflow.com/comment/41158469
tagged with: jquery
linked to: http://stackoverflow.com/q/6654958
has comment: http://stackoverflow.com/comment/41158410
score: 0
has comment: http://stackoverflow.com/comment/41157978
has comment: http://stackoverflow.com/comment/41158102
has comment: http://stackoverflow.com/comment/41157979

http://stackoverflow.com/a/26325602
has body: No, you cannot retrieve the function from the timer ID. If you wanted to do such a thing regularly, then redefine setInterval to capture the function: (function() { var oldSetInterval = setInterval; // remember the original setInterval setInterval = function(fn, msec) { // redefine setInterval var id = oldSetInterval(fn, msec); // call the real one setInterval.fns[id] = fn; // remember the fn in an array return id; }; setInterval.fns = []; // array attached to our setInterval // remembers functions by timer ID }()); Use this as in: var myId = setInterval(function() { alarm(); }, 300000); alert(setInterval.fns[myId])); // "function() { alarm(); }"
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26324097

http://stackoverflow.com/comment/41098010
score: 5
type: QuestionComment
has text: It's not clear what the problem is. You keep referring to running the code in PHP, but it's JavaScript code. Is that the problem? Are you trying to run JavaScript code as server-side PHP? Can you clarify?
type: Comment
comment on: http://stackoverflow.com/q/26207490

http://stackoverflow.com/comment/41360617
type: Comment
comment on: http://stackoverflow.com/a/26344134
has text: If you're not averse to using jQuery, you might look at jQuery's "chosen" plugin. It may do exactly what you want.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26279229
has comment: http://stackoverflow.com/comment/41248772
score: 0
has body: Have you controlled the css in the Developer Tool of the browser? Are the styles shown there? Otherwise i recommended this method: document.getElementById("hidden").css("vertical-align","super"); document.getElementById("hidden").css("font-size","75%); and document.getElementById("hidden").css("vertical-align","sub"); document.getElementById("hidden").css("font-size","75%);
answers question: http://stackoverflow.com/q/26278937
type: Answer
has comment: http://stackoverflow.com/comment/41256061

http://stackoverflow.com/comment/41237614
has text: Ive tried this, and about 5 others and they all just create 0kb .png files. I'll update my post with what I'm using.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26266765
type: AnswerComment

http://stackoverflow.com/q/26295840
tagged with: titanium-mobile
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26296262
type: Question
tagged with: javascript
tagged with: unicode
has title: Unicode Character 'BULLET' in Titanium App
accepted answer: http://stackoverflow.com/a/26296262
linked to: http://stackoverflow.com/q/13093126
tagged with: android
answer count: 1
has body: I have a problem with the BULLET character in my Android App developed with Titanium. I have this part of code: function getFormattedPizza() { var text = win.crust + ' pizza with:\n'; if (win.toppings.length == 0) { text += '&amp;bull; Plain (cheese pizza)\n'; } else { for (var i = 0; i &lt; win.toppings.length; i++) { text += '&amp;bull; ' + win.toppings[i] + '\n'; } } return text; } and in my app I see the string &amp;bull ; Plain (cheese pizza), not an unordered list. In that way I can show a dots list?
score: 0
tagged with: titanium

http://stackoverflow.com/a/26257347
accepted answer of: http://stackoverflow.com/q/26256986
type: AcceptedAnswer
score: 1
answers question: http://stackoverflow.com/q/26256986
type: Answer
has comment: http://stackoverflow.com/comment/41197339
upvote count: 1
has body: This could cause a circular reference within the JavaScript engine (because the parent lexical environment of innerFn includes outerVal, which includes innerFn), but it does not cause a circular reference that can be observed by JavaScript code. When outerFn runs, the function innerFn is defined. In JavaScript, a newly-defined function has access to all variables currently accessible in scope, so code inside of innerFn can access outerVar: function outerFn() { var outerVar = {}; function innerFn() { alert(outerVar); // totally fine } return innerFn; } In ECMAScript terms, this is achieved because every function has a lexical environment used to resolve variable identifiers called Scope. A newly-defined function's Scope internal property is set to the lexical environment of its parent function. So, here, the Scope of innerFn is the lexical environment of outerFn, which contains a reference to outerFn. In ECMAScript terms, the circular reference path goes: innerFn innerFn's Scope (a lexical environment) innerFn's Scope's environment record the outerVar binding in innerFn's Scope's environment record the variable associated with the outerVar binding in innerFn's Scope's environment record this variable has innerFn as a property value However, since you can't access a function's Scope internal property from JavaScript code, you can't observe a circular reference from the code. Bonus info Note that a clever implementation will not actually store this circular reference in your code, because it sees that outerVar is never used in any of outerFn's child functions. The binding for outerVar can be safely forgotten entirely when outerFn ends. It is further interesting to note that this optimization is not possible with eval, because it's not possible to recognize whether innerFn will ever use outerVar: function outerFn() { var outerVar = {}; function innerFn(codeStr) { alert(eval(codeStr)); // will `codeStr` ever be "outerVar"? } return innerFn…
downvote count: 0

http://stackoverflow.com/a/26308834
type: Answer
accepted answer of: http://stackoverflow.com/q/26308353
score: 2
has body: on your view Json.Encode can convert your list to JSON array RAZOR @Html.Raw(Json.Encode(YourModel)) ASPX &lt;%=html.Raw(Json.Encode(YourModel)%&gt; - var data = &lt;%=html.Raw(Json.Encode(YourModel)%&gt;;
answers question: http://stackoverflow.com/q/26308353
has comment: http://stackoverflow.com/comment/41285878
downvote count: 0
has comment: http://stackoverflow.com/comment/41285775
type: AcceptedAnswer
upvote count: 2

http://stackoverflow.com/a/26272088
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26270661
upvote count: 1
has body: In javascript, objects and arrays are accessed using the . or [] operators. The following two lines does exactly the same thing: mySchemasList.schemas; mySchemasList['schemas']; Also, each member of an object or array act like a variable on its own. So you can assign values, objects or arrays to them: mySchemasList = {}; When a variable (or property) is declared but not assigned anything its value is undefined. So you can check simply by: if (mySchemasList === undefined) mySchemasList = {}; Alternatively you can use || short circuiting since undefined is considered false: mySchemasList = mySchemasList || {}; putting this all together, the following two examples does exactly the same thing. Example 1: var mySchemasList = { schemas : [] } Example 2: var mySchemasList = {}; mySchemasList.schemas = []; Now that you've created an array at mySchemasList.schemas you can start pushing other objects into it: mySchemasList.schemas.push(new SelectSchemaModel("A", false)); mySchemasList.schemas.push(new SelectSchemaModel("B", false)); mySchemasList.schemas.push(new SelectSchemaModel("C", false)); Wrapping it up in a for loop parsing the JSON data, you'd do this: var mydata = JSON.parse(ajax.responseText); for (var i=0; i&lt;mydata.length; i++) { mySchemasList.schemas.push(new SelectSchemaModel(mydata[i],false)); }

http://stackoverflow.com/comment/41281803
comment on: http://stackoverflow.com/a/26299934
has text: this almost works and is elegant. place `var phpDate` before `$("#mydate").datepicker{` and change it to `var phpDate = new Date("<?php echo $default_date;?>");`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41334102
has text: {"website":{"userId":"1","status":"2" ,"siteName":"qualispace.com","hostName":"vertoz.com","iabCategoreisId":"1",,"domainBlockId":"1","allowPubRedirection":"1","hostNameValidation":"1","pricingTypeId":"1","pricingTypeValue":"2","frequencyCap":"2","createdDate":"123456789","updatedDate":"123456789","createdId":"1","updatedId":"1","mobileFooterAds":"1","mobilePageAds":"1","mobileApp":"1","pagead":"1","footerad":"1","marginad":"1"},"publications":{"entry_id":"1","sizeMaster":[{"entry_id":"1","adType":{"entry_id":"1"}},{"entry_id":"1","adType":{"entry_id":"1"}}]}}
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26335214
type: Comment

http://stackoverflow.com/a/26224532
score: 1
has comment: http://stackoverflow.com/comment/41131414
upvote count: 1
has comment: http://stackoverflow.com/comment/41131665
type: Answer
has body: var a = ['1', '2', '3', '4'] combine(a,a); function combine(srcArr, oldArr) { var newArr = []; while(oldArr[0].length &lt; srcArr.length) for(i=0; i&lt;srcArr.length; i++) { for(j=0; j&lt;oldArr.length; j++) { newArr.push(oldArr[j] + srcArr[i]); } } combine(srcArr, newArr); } } This is a recursive algorithm that is initiated by the starting array and an identical seed array. On each function call, a new array is created by adding each member of the starting array to each member of the seed array. The new array becomes the seed array for the next function call. You can see the recursion in action by inserting the code line alert(newArr); on a line before the if
downvote count: 0
answers question: http://stackoverflow.com/q/26223244
has comment: http://stackoverflow.com/comment/41131801

http://stackoverflow.com/q/26335530
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26337431
has comment: http://stackoverflow.com/comment/41335429
tagged with: javascript
tagged with: jquery
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41337150
favorite count: 0
has comment: http://stackoverflow.com/comment/41335474
accepted answer: http://stackoverflow.com/a/26337431
has title: Chrome Extension Replace word in current textarea
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41335992
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/77062973
has comment: http://stackoverflow.com/comment/41335771
upvote count: 5
has body: I'm trying to make a chrome extension that replaces the last word typed in the current &lt;textarea&gt; when the user makes a certain keydown event fire. So I've tried this but it doesn't really work. Here are the files of my extension: My extension's manifest.json: { "name": "Test", "description": "test", "version": "0.0.1", "permissions": [ "activeTab" ], "background": { "scripts": ["background.js"], "persistent": false }, "browser_action": { "default_title": "replace test" }, "manifest_version": 2 } Its background.js: chrome.tabs.executeScript(null, {file: "content_script.js"}); And its content_script.js: document.onkeydown = replacePrevWord; // Azerty: Ctrl + ² // Qwerty: Ctrl + ' function KeyPress(e) { var evtobj = window.event? event : e if (evtobj.keyCode == 222 &amp;&amp; evtobj.ctrlKey) return true; } function getCaretPosition(ctrl) { var CaretPos = 0; // IE Support if (document.selection) { ctrl.focus(); var Sel = document.selection.createRange(); Sel.moveStart('character', -ctrl.value.length); CaretPos = Sel.text.length; } // Firefox support else if (ctrl.selectionStart || ctrl.selectionStart == '0') CaretPos = ctrl.selectionStart; return (CaretPos); } function returnWord(text, caretPos) { var index = text.indexOf(caretPos); var preText = text.substring(0, caretPos); if (preText.indexOf(" ") &gt; 0) { var words = preText.split(" "); return words[words.length - 1]; //return last word } else { return preText; } } function replacePrevWord() { if(KeyPress()){ var text = document.activeElement; var caretPos = getCaretPosition(text) var word = returnWord(text.value, caretPos); if (word != null) { text.value = text.value.replace(word,"replaced"); } } } This works fine on JSFiddle (http://jsfiddle.net/cyo646cr/3/), but I don't know how to do this in a Chrome extension. Any ideas? Thanks.
type: Question
score: 5

http://stackoverflow.com/a/26343128
has body: Basically the issue was I needed to add more e.stopPropagation() and e.preventDefault() statements to the dragover and drop event handlers on both the parent and child nodes that were hooked up to those events. I guess that's what you get for coding at 3am!
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26310086
answers question: http://stackoverflow.com/q/26310086
score: 1

http://stackoverflow.com/q/26296881
possible better answer: http://stackoverflow.com/a/26298876
has answer: http://stackoverflow.com/a/26298876
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26297293
has title: Body bgcolor attribute weightage
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26298878
has answer: http://stackoverflow.com/a/26298938
has comment: http://stackoverflow.com/comment/41263691
accepted answer: http://stackoverflow.com/a/26298938
has body: I have written in css that body will have a blue color but in javascript i have made that body will change color every second, It worked until i added global css. I can't remove the css as it has many rules that i can't unlink. I want a way that all css rules will load but my body color won't get affected. Screenshot to prove that body bgcolor has been changing by script but not shown: http://i.gyazo.com/b6a7a0f4c5153c61b38c3552cdcd65fc.gif Can someone show that how can i include that external global CSS but then also my script can change bgcolor and css will not stop it. P.S : I am Noob :) ! EDIT: My Code : http://fiddle.jshell.net/dfywom6a/ Help!
has comment: http://stackoverflow.com/comment/41262948
tagged with: css
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/26314911
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41295950
score: -1
has body: Okay so I am trying to get the PHP to save the users data to the XML and then forward the user onto the homepage..but when the JavaScript is ran it does not grab the echo's at the end of the script along with the header(); The PHP i wish to echo echo "Congratulations registration was Successful. Your Customer ID is: $id4"; echo " "; echo "redirected automatically in 7 seconds"; header( "Refresh:7; buyonline.htm", true, 303); $doc->save("data/customer.xml"); } And the JavaScript function var firstname = document.getElementById("firstName").value; var lastname = document.getElementById("lastName").value; var email = document.getElementById("email").value; var password = document.getElementById("password").value; var password2 = document.getElementById("password2").value; var number = document.getElementById("pNumber").value; var type = ""; var input = document.getElementsByTagName("input"); xHRObject.open("GET", "testregristation.php?firstName=" + firstname + "&lastName=" + lastname + "&email=" + email + "&password="+password+"&pNumber="+number, true); xHRObject.onreadystatechange = function() { if (xHRObject.readyState == 4 && xHRObject.status == 200) { document.getElementById('information').innerHTML = xHRObject.responseText; } xHRObject.send(null); Obviously these are small snippets but i do not understand why it wont send the response to the screen it shows the response in "firebug".. my PHP also does a email check to make sure its not in use, and that echoes perfectly.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41295907
accepted answer: http://stackoverflow.com/a/26314976
has title: AJAX not echoing through javascript
tagged with: php
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41296194
has comment: http://stackoverflow.com/comment/41296130
linked to: http://stackoverflow.com/q/4033483
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26314976
tagged with: javascript
duplicate of: http://stackoverflow.com/q/4033483

http://stackoverflow.com/comment/41356044
type: QuestionComment
comment on: http://stackoverflow.com/q/26347370
score: 0
type: Comment
has text: Blazemonger i try it but still not working

http://stackoverflow.com/q/26345573
has comment: http://stackoverflow.com/comment/41352585
type: Question
has answer: http://stackoverflow.com/a/26345621
upvote count: 1
answer count: 1
has body: I have a string str = 'first last1; first last2; first Last3;'; I am looking to remove the spaces only after the semicolons. I have tried using str = str.replace(';' + /\s+/g, ';'); and str = str.replace((';' + /\s+/g), ';'); but it is not working. any help would be appreciated.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26345621
has title: Remove spaces from javascript string but not all spaces
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41149748
comment on: http://stackoverflow.com/a/26232362
score: 0
type: AnswerComment
type: Comment
has text: if i remove all my jquery and jquery mobile scripts then the alert fires on the initial page load.

http://stackoverflow.com/q/26225694
has answer: http://stackoverflow.com/a/60671682
has title: Phonegap / Cordova pause event triggered on resume for android; can not turn off audio as a result
tagged with: android
answer count: 1
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/96244564
upvote count: 37
type: Question
score: 37
has body: I am developing a Phonegap app that plays audio using the Phonegap Media plugin. When I press the home button or screen lock button on my android device (KitKat 4.4), the app goes into the background as it should but the audio does not shut off because the pause event is not getting called. Only when I resume the app does the pause event run, and my code to turn off the audio finally runs. The resume event also runs right after this. Reading the Phonegap docs on the pause event, there is a note about iOS Quirks: "In the pause handler, any calls to the Cordova API or to native plugins that go through Objective-C do not work, along with any interactive calls, such as alerts or console.log(). They are only processed when the app resumes, on the next run loop." This is very similar to what I see on my Android device, though I am wondering if it is the same issue. I really need a fix or workaround as this is a showstopper to not be able to turn off audio when a user pauses the app. Here is my code to add the pause event listener: document.addEventListener('deviceready', on_device_ready, false); function on_device_ready() { document.addEventListener('pause', on_pause, false); document.addEventListener('resume', on_resume, false); } UPDATE: I think I've solved it, though I'm not too happy about the solution. I had set the Phonegap config.xml variable KeepRunning to false. I set to true and now it gets the pause event when it is supposed to. I feel like I should be able to stop my app from running in the background and also run some pause code beforehand as well. Anyway, here is the config.xml line I am talking about: &lt;preference name="KeepRunning" value="true"/&gt;
has comment: http://stackoverflow.com/comment/95672607
downvote count: 0
has comment: http://stackoverflow.com/comment/96244553
tagged with: javascript

http://stackoverflow.com/comment/41233157
score: 0
has text: @BenFortune so it's related to my third quest :-)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26279331

http://stackoverflow.com/comment/41281727
score: 0
comment on: http://stackoverflow.com/q/26306220
type: Comment
type: QuestionComment
has text: Hi, sorry but this is all entangled with other code and running locally. I try to provide examples when possible but was hoping this was something obvious to do with adding windows vs just dialog.

http://stackoverflow.com/comment/41188377
comment on: http://stackoverflow.com/q/26256333
score: 0
type: QuestionComment
type: Comment
has text: Yes, you can do that. Where in your `server.js` file are you defining the `SERVER` constructor?

http://stackoverflow.com/comment/41256168
has text: I guess that's not true. Echo the access token and check it via https://developers.facebook.com/tools/debug/accesstoken Then, you'll see in the `Scopes` result whether the permission is active for that specific access token.
comment on: http://stackoverflow.com/a/26275969
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41349237
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26341910
has text: @sss I figured out the issue. Its because my `ng-repeat` was wrapped in an `ng-if`, while the rest of the code wasn't. However, the `ng-if` was always evaluating to true, so I don't know why the `ng-if` was causing issues.
score: 0

http://stackoverflow.com/comment/41316153
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26324130
has text: Yes it is. I was just explaining to you what might be the cause of your confusion.
type: Comment

http://stackoverflow.com/q/26254474
linked to: http://stackoverflow.com/q/5767325
has comment: http://stackoverflow.com/comment/41185278
type: AnsweredQuestion
upvote count: 2
downvote count: 2
has body: I am really new to JavaScript and i am stuck on an exercise i have been given. I am using TextPad as this is what i have been asked to use for this exercise. Basically i need to have one input parameter that is a number/integer and then have 12 output parameters that show the input has been divided by 12 and that each output parameter has a value that does not exceed the previous or next one by more than 1. I have written the below code so far using an array and a for loop but i just dont know how or what to do in terms of getting the output parameters to show each value of the array divided evenly. var amount = "30"; var camels = ["cam1", "cam2", "cam3", "cam4", "cam5", "cam6", "cam7", "cam8", "cam9", "cam10", "cam11", "cam12"] for(i=0;i&lt;camels.length;i++){ WScript.echo(camels[i] + "|" + amount/12); } for(i=1; i&lt;13; i++){ n = Math.random(); o = n * 12; p = o + 1; q = Math.floor(p); } This is really confusing me so any help would be appreciated but please bare in mind i am a complete novice.
accepted answer: http://stackoverflow.com/a/26254692
has title: Using JavaScript for arrays and loops
type: Question
has comment: http://stackoverflow.com/comment/41185438
tagged with: javascript
score: 0
tagged with: for-loop
has comment: http://stackoverflow.com/comment/41185173
answer count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/41185139
has comment: http://stackoverflow.com/comment/41185258
has comment: http://stackoverflow.com/comment/41185223
has answer: http://stackoverflow.com/a/26254692
favorite count: 0
has comment: http://stackoverflow.com/comment/41185198

http://stackoverflow.com/a/26220451
has comment: http://stackoverflow.com/comment/41137889
upvote count: 6
has comment: http://stackoverflow.com/comment/41138377
answers question: http://stackoverflow.com/q/26218453
has body: You need to pass in the recursive flag to Raycaster.intersectObjects(). intersects = ray.intersectObjects( scene.children, true ); Also, do not overwrite Object3D.id. Set Object3D.userData.id instead. three.js r.68
has comment: http://stackoverflow.com/comment/41138459
type: Answer
score: 6
has comment: http://stackoverflow.com/comment/41146094
downvote count: 0

http://stackoverflow.com/comment/41422949
type: Comment
comment on: http://stackoverflow.com/a/26372457
type: AnswerComment
has text: I guess, my issue is that it is calculating too much of a height and adding it instead of too little.
score: 0

http://stackoverflow.com/a/26216553
score: 0
has body: http://www.datejs.com and http://momentjs.com are the best as far as I'm concerned. A few more are listed here: http://codegeekz.com/6-javascript-date-libraries-for-developers/
answers question: http://stackoverflow.com/q/26216341
type: Answer

http://stackoverflow.com/comment/115404505
type: Comment
type: AnswerComment
has text: thanks but that was not actually what I was asking. I already have transparent canvas. My goal was to have the shader to go from glow color to transparent where is now showing black. However I got it by changing the frag shader from `gl_FragColor = vec4( glow, 1.0 );` to `gl_FragColor = vec4( glow, intensity );`. thanks anyways!
comment on: http://stackoverflow.com/a/31551119
score: 0

http://stackoverflow.com/comment/41212472
type: Comment
comment on: http://stackoverflow.com/a/26265160
has text: @Vilthering It does work. Without knowing the context, I won't be able to help you. You should post a new question with the specific code you've tried, along with the specific error you're getting.
score: 0
type: AnswerComment

textarea
tags question: http://stackoverflow.com/q/26346956
tags question: http://stackoverflow.com/q/26253959
tags question: http://stackoverflow.com/q/26201053
tags question: http://stackoverflow.com/q/26204319
tag name: textarea
tags question: http://stackoverflow.com/q/26315296
type: Tag

http://stackoverflow.com/comment/41279520
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26305265
has text: I think you have made mistake with POST.Try to put your array in place of jsondata.

http://stackoverflow.com/q/26302139
has answer: http://stackoverflow.com/a/26532480
type: AnsweredQuestion
tagged with: variables
favorite count: 0
possible better answer: http://stackoverflow.com/a/26532480
type: Question
downvote count: 2
accepted answer: http://stackoverflow.com/a/26531985
score: -1
tagged with: user-input
has answer: http://stackoverflow.com/a/26532648
answer count: 3
upvote count: 1
has title: How do you set a variable to the value returned from prompt('...')?
tagged with: javascript
has answer: http://stackoverflow.com/a/26531985
has body: In the code below, when I set the userDoor variable to the prompted user input, the user input attaches to the variable. I know this because the value shows up in the console.log statement just below the variable declaration. However, the variables revealDoor and offerDoor, which are set based on the userInput variable, act wonky in ways that suggest the variable didn't "catch" the value. (Wonky: easier to demonstrate than explain. please run the code below. UserDoor, revealDoor, and offerDoor should all be different numbers in the range of 1-3. Some of the time, revealDoor === userDoor. This should never happen. ). Interestingly, the program works fine when I set userDoor directly to an integer--see commented debug line. Why would the userInput variable show the right value in the console but not seem to catch in the rest of the program? (This program, by the way, is meant to illustrate the monty hall paradox alert("There are 3 doors. Behind two of them are DEATH and DOOM. Behind the other is a BIG TASTY SAUSAGE."); var yWin = 0; var yLoss = 0; var nWin = 0; var nLoss = 0; while(true){ //noprotect var userDoor = prompt("choose door: 1, 2, or 3"); //var userDoor = 1 //debug console.log('UD: ' + userDoor); var prizeDoor = randomRange(1,3); console.log('PD: ' + prizeDoor); var revealDoor = (function(){ var revealDoor = prizeDoor; if (prizeDoor === userDoor) { while (revealDoor === prizeDoor) { revealDoor = randomRange(1,3); } return revealDoor; } else { while (revealDoor === prizeDoor || revealDoor === userDoor){ revealDoor = randomRange(1,3); } return revealDoor; } })(); console.log('RD: ' + revealDoor); var offerDoor = (function(){ var offerDoor = prizeDoor; while(offerDoor === revealDoor || offerDoor === userDoor){ offerDoor = randomRange(1,3); } return offerDoor; })(); console.log('OD: ' + offerDoor); var choice = prompt("You chose door " + userDoor + ". Behind door " + revealDoor + ", I reveal DEATH AND DOOM. I would like to offer you the chance to change your ch…

http://stackoverflow.com/q/26313173
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41293620
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42362294
tagged with: ios
tagged with: javascript
type: Question
tagged with: xcode
has answer: http://stackoverflow.com/a/26315031
has body: I am new to xcode, if I implement an external url in phonegap using inappbrowser method is window.open() the url is not loading, I get a white screen and at bottom a message is shown as load error and also load stop message not get. I included &lt;plugin name="InAppBrowser" value="CDVInAppBrowser" /&gt; in config.xml and I used cordova2.3.0 function loadURL(url){ var ref = window.open('url', '_blank','location=yes'); ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); window.locaion.href='url'; }); ref.addEventListener('loadstop', function(event) { alert("open web site"+event.type); }); ref.addEventListener('exit', function(event) { alert(event.type); }); }
has title: External url not working in inappbrowser
tagged with: cordova

http://stackoverflow.com/q/26347985
favorite count: 0
accepted answer: http://stackoverflow.com/a/27643821
has title: Generate an image from arbitrary strings
type: AnsweredQuestion
tagged with: dynamic-image-generation
score: 1
tagged with: image-processing
upvote count: 1
has body: I've seen plenty of image to ascii art converters, but what I need is a little more complex. Instead of a mosaic image created from ascii chars I need to be able to use a predefined set of strings of arbitrary lengths as my mosaic tiles. I've done a good bit of Googling, but Im not even sure how to structure my query? Does anything like this exist? And bonus if it wont use duplicates in its image generation.
type: Question
downvote count: 0
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/27643821

http://stackoverflow.com/a/26353950
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26353523
upvote count: 1
has body: name attribute usually doesn't need to be unique. A given HTML document may have several forms, and each of them might have elements having names identical to names in the other forms. If you're using PHP, saying: &lt;form&gt; &lt;input type="text" name="foo[]" /&gt; &lt;input type="text" name="foo[]" /&gt; &lt;/form&gt; would cause, PHP to read this name as array and all entries will contained within it. Names could possibly be used as attributes for non-form elements, however, they're most frequently used only within form. id attribute on the other hand, needs to be able to uniquely identify a given DOM element within the document. You're not forced to use it this way. Browser doesn't blow up if you use same id on two different elements. But if you have two elements with same id, the last one you add prevails over the previous ones. So, document.getElementById( 'foo' ) // or $( '#foo' ) will return just one element of several. id can be used to identify any element within the document and is not constrained to be within a form
type: Answer

http://stackoverflow.com/q/26205592
linked to: http://stackoverflow.com/q/111102
has comment: http://stackoverflow.com/comment/41094300
has comment: http://stackoverflow.com/comment/41094840
has comment: http://stackoverflow.com/comment/41094651
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41095044
has comment: http://stackoverflow.com/comment/41097171
score: 0
has comment: http://stackoverflow.com/comment/41096377
has comment: http://stackoverflow.com/comment/41094699
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41094545
duplicate of: http://stackoverflow.com/q/111102
has body: The code below is supposed to loop through several webpages, each one determined by the value of i, and the console.log(url); line should list every URL from those webpages. Instead, the code only lists the URLs when "i" is on its final iteration (i=0) and thus it only retrieves URL's from the final webpage it requests (http://fakeURL.com/0) - the number at the end of the URL represents "i". How can I make the console list URL's from all iterations (when i = 45, 30, 15, and 0) instead of only the final iteration (when i = 0)? for(i = 45; i &gt;= 0; i -= 15) { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + i, true); xhrs.onload = function() { var doc2 = xhrs.response; $(doc2).find('a').each(function() { var url = $(this).attr('href'); console.log(url); }); } xhrs.responseType = 'document'; xhrs.send(); } EDIT: Below is my actual source code (unsimplified) after doing what Teemu suggested. Now 'i' is always -15 for every request the for-loop makes with the XMLHttpRequest: var url; var title; function ajaxCall (x, y) { setTimeout(function () { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + i, true); xhrs.onload = function() { var doc2 = xhrs.response; $(doc2).find('a').each(function() { var x = $(this).attr('href'); var y = $(this).text(); console.log(x); console.log(y); }); } xhrs.responseType = 'document'; xhrs.send(); }, Math.random() * 1000 + 1000); } for(i = 45; i &gt;= 0; i -= 15) { ajaxCall(url, title); } Any idea why 'i' is always -15? EDIT 2: I didn't follow Teemu's solution correctly in the code above. Here is the fixed version for future reference: var i; function ajaxCall (x) { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + x, true); xhrs.onload = function() { var doc2 = xhrs.response; $(doc2).find('a').each(function() { var url = $(this).attr('href'); var title = $(this).text(); console.log(url); console.log(title); }); } xhrs.responseType = 'document'; xhrs.send(); } for(i = …
type: Question
has title: XMLHttpRequest DOMparser in For-Loop returns only last iteration
tagged with: domparser
tagged with: for-loop

http://stackoverflow.com/q/26315582
tagged with: jquery
has body: I am trying to display single image on a web page so that : If the image is smaller than screen of the user. Full Image is shown Otherwise if the image is larger than user's screen then it should fit screen and once image is clicked only then full size is shown . Here is my html &lt;html&gt; &lt;body&gt; &lt;div class="img"&gt; &lt;img src="imagepathhere.jpg" /&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; Here is the css that I have tried but I guess it is not possible by just only using css: &lt;style&gt; html,body{ min-width:100%; margin:0px; padding:0px; } .img { padding:0px; width:auto; text-align:center; margin:auto; } .img img { max-width:100%; } &lt;/style&gt; What would be best way to do it? Ahmar.
type: UnansweredQuestion
has title: Javascript Show full image only on click otherwise fit screen
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/26316625
has answer: http://stackoverflow.com/a/26315879
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/q/26230152
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41141065
has comment: http://stackoverflow.com/comment/41140870
has comment: http://stackoverflow.com/comment/41140775
possible better answer: http://stackoverflow.com/a/26230346
type: Question
has comment: http://stackoverflow.com/comment/41140817
has comment: http://stackoverflow.com/comment/41141091
has answer: http://stackoverflow.com/a/26230346
has answer: http://stackoverflow.com/a/26231386
answer count: 2
upvote count: 0
has body: in a recent post Load javascript after 2 clicks on website I asked about a javascript issue. $(function(){ var count = 1 $(document).click(function(){ if(count&lt;=2){ count+=1; } else{ alert("already clicked two times"); } }); }) Problem is now that I want to have this javascript it inside script tags in my &lt;head&gt; but then this script wont work, can someone help me through how they would write their script? Thanks!! Update: &lt;head&gt; &lt;script&gt; $(function(){ var count = 1 $(document).click(function(){ if(count&lt;=2){ count+=1; } else{ alert("already clicked two times"); } }); }) &lt;/script&gt; &lt;/head&gt;
tagged with: javascript
has title: From js to script
score: -6
favorite count: 0
accepted answer: http://stackoverflow.com/a/26231386
linked to: http://stackoverflow.com/q/26228568
has comment: http://stackoverflow.com/comment/41141180
downvote count: 6

http://stackoverflow.com/comment/41308468
type: Comment
has text: it is true, but here is specific texts
type: AnswerComment
comment on: http://stackoverflow.com/a/26321237
score: 0

http://stackoverflow.com/q/26245692
tagged with: css
has answer: http://stackoverflow.com/a/26245871
has answer: http://stackoverflow.com/a/26245749
has comment: http://stackoverflow.com/comment/41169895
has body: This works: $('div.hg_logo').hover( function(){$(this).animate({ backgroundColor: 'rgba(31, 197, 78, 0.75)' }, 1200)}, function(){$(this).animate({ backgroundColor: 'white' }, 1200)} ); But given what I know about CSS and about JS it shouldn't! 1 'rgba(31, 197, 78, 0.75)' shouldn't need quotes. 2 backgroundColor should be background-color. 3 Semi-colons should be used after the colors. 4 semi-colons should be used after the interior functions which target 'this'. The four points above, as I understand it, are proper CSS and JS - yet any of them wrecks this code. Is it a quirk of $().animate and any chance it will be changed? Or should I just commit to rote memory?
possible better answer: http://stackoverflow.com/a/26245871
downvote count: 7
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41170045
has comment: http://stackoverflow.com/comment/41170060
has title: Why does this work? (JQuery)
type: Question
accepted answer: http://stackoverflow.com/a/26245749
answer count: 2
upvote count: 0
tagged with: javascript
score: -7
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41169994

http://stackoverflow.com/comment/41128094
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26222776
type: AnswerComment
has text: Sorry, anything with "chat" is blocked at my job. Thanks Barracuda (https://www.barracuda.com/products/webfilter).....

http://stackoverflow.com/comment/41360673
type: AnswerComment
has text: No problem. You should create a separate question for what you ask for in your comment as it isn't really related to this question.
comment on: http://stackoverflow.com/a/26339334
type: Comment
score: 0

http://stackoverflow.com/q/26344255
favorite count: 0
has title: Publish data in DataTables-Table plug-in for jQuery
tagged with: datatable
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
tagged with: c#
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26344952
has body: I googled several hours to find a solution for my problem but until now without luck... I'm using... correction... i would like to use a jQuery datatable plug in (http://www.datatables.net/) for displaying some data. Following steps were successfully achieved: Get JSON-data from a *.asmx-service. I even checked if it's valid on http://jsonlint.com/ {"d":{"key":1,"email":"test@test.ch","language":"de","locked":false}} For debugging purposes i added an alert() tag in my code. function LoadTable(businessUnitId) { $.ajax({ url: url + "/GetAccounts", data: '{businessUnitId:"' + businessUnitId + '"}', contentType: "application/json; charset=utf-8", type: "POST", dataType: "json", cache: false, success: function(json) { for (var i in json.d) { // displays property name and its value --&gt; works alert(i + ": " + json.d[i]); } $('#tableAccounts').DataTable({ data: json.d, // tried json and json.d columns: [ { title: "Test1", data: "key" }, { title: "Test2", data: "email" }, { title: "Test3", data: "locked" }, { title: "Test4", data: "language" } ] }); } }); } Problem: I'm not able to publish the data in my table. Titles of columns are set but the row with values of the JSON-object is not added. I think the problem could be the assignment of the columns property. Any help is really appreciated. TIA, xavier
accepted answer: http://stackoverflow.com/a/26344952

http://stackoverflow.com/q/26308478
has body: What objects can you not add the “onclick” to by using getelementbyID method?
tagged with: onclick
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26308540
upvote count: 0
score: -2
tagged with: javascript
tagged with: getelementbyid
answer count: 1
has title: For future reference on getelementbyID in Javascript
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26210132
tagged with: twitter-bootstrap
score: 0
has comment: http://stackoverflow.com/comment/41103169
answer count: 1
has body: I've tried to find the answer to my problem with no luck. I'm new to web development and I've been trying to create a simple app using angularjs and bootstrap. There's no much content on my pages, only a couple of inputs and buttons that do nothing. I placed ng-view in the index.html page as I saw in many tutorials and that allows me to navigate to all my pages. I'm trying to add a navigation bar to all my pages once a user logs in, so I placed another ng-view on my home(page after user logs in), but it seems that angular allows only one view for each app. And also it doesn't allow nested app. If I'm wrong, please correct me (that's what I understood from my Google 'research'). So, my question is: how can I add a navigation bar(or any same html content) to all my pages after the user logs in without copying the same code in each html page? Btw, I had this working with jQuery, but I don't know how to do it using angularjs Thanks!
has title: navigation bar in single page app using angular
has comment: http://stackoverflow.com/comment/41104093
has comment: http://stackoverflow.com/comment/41103642
has comment: http://stackoverflow.com/comment/41103135
linked to: http://stackoverflow.com/q/18391727
has answer: http://stackoverflow.com/a/29958417
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: angularjs

http://stackoverflow.com/comment/41120798
has text: I got rid of the error (edited) but now all I get is undefined instead of true/false
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26219422

http://stackoverflow.com/q/26349326
has comment: http://stackoverflow.com/comment/41400792
answer count: 0
has comment: http://stackoverflow.com/comment/41624286
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41596430
has body: I have a dashboard page that is dynamically built using the Dev Express Dev Extreme dx.charts.js library. I've implemented Bootstrap 3 into the site and everything works great... until I try to view on an iPad. I've spent countless hours making changes to my layout and nothing appears to help. Here's the current code: <%-- left half column --%> Container Levels <%-- right half column --%> <%-- --%> When I view the dashboard on a PC using IE, ChromE, Safari or Firefox, it displays as expected, displaying the pie chart legend. However, when I attempt to view the page on an iPad using either Safari or Chrome, the legend doesn't display. I've examined the page source from both the PC and from the iPad and the only difference in the iPad version is there are a bunch of webkit attributes that have been added to the markup for the legend chart. All the data for the chart is in the markup. Through a lot of testing, I've noticed that if I add a bootstrap column width to the "pie0" object, it doesn't display on the iPad. However, if I remove the column width attribute, the layout looks horrible. I don't know what I'm missing here. Thanks in advance for any help...
has comment: http://stackoverflow.com/comment/41446366
tagged with: devextreme
type: Question
has comment: http://stackoverflow.com/comment/41577803
has comment: http://stackoverflow.com/comment/41577040
tagged with: javascript
tagged with: ipad
score: 0
has comment: http://stackoverflow.com/comment/41634824
has title: Bootstrap 3, DevExpress Chart disappears on iPad (iOS 8)
tagged with: css

http://stackoverflow.com/comment/41117706
comment on: http://stackoverflow.com/a/26218063
type: Comment
type: AnswerComment
has text: @DanFromGermany yea Dan that's incorrect; the scope of `prime` in that part of the code is completely irrelevant.
score: 0

http://stackoverflow.com/q/26289023
tagged with: css
upvote count: 2
has title: Change scroll bar with perfect scroll
linked to: http://stackoverflow.com/q/680785
answer count: 1
tagged with: javascript
has body: I am trying to find a way to change the scroll bar to a perfect scrollbar for the entire page http://noraesae.github.io/perfect-scrollbar/ Any way to do so?
has answer: http://stackoverflow.com/a/26289320
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26289320

http://stackoverflow.com/comment/41327307
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26331805
has text: Simple and easy, nice answer. Thanks so much.

http://stackoverflow.com/comment/41215486
has text: I suggest to make rest based web service that return data(in the form of JSON/XML) and via javascript call that webservice and then from JSOn create the respective model.
comment on: http://stackoverflow.com/q/26270661
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41251300
comment on: http://stackoverflow.com/a/26290146
type: Comment
score: 0
type: AnswerComment
has text: @user2759116 What version of the browser are you using?

http://stackoverflow.com/a/26228805
accepted answer of: http://stackoverflow.com/q/26228761
type: Answer
answers question: http://stackoverflow.com/q/26228761
has body: $("input[name=group]").change(function () { if ($(this).val() == 'scheduled' && $(this).is(":checked")) { $("#effectiveWrapper").show(); } else { $("#effectiveWrapper").hide(); } }); http://jsfiddle.net/wdckktz7/ AngularJS Code Effective Date* http://jsfiddle.net/orr1p1eg/
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/41139688
has comment: http://stackoverflow.com/comment/41140284
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26221602
upvote count: 1
linked to: http://stackoverflow.com/q/2917175
tagged with: nan
favorite count: 0
has comment: http://stackoverflow.com/comment/41135973
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41137785
downvote count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/41149363
score: 1
type: Question
has body: All the date, related Values are shown as NaN, although the same JS codes, works fine in chrome, giving me the correct values, HEre's a section, of those date codes. var date = new Date(data.list[s].dt_txt); var year = date.getFullYear();var month = date.getMonth()+1; var dat = date.getDate(); if(month&lt;10){month='0'+month;}if(dat&lt;10){dat='0'+dat;} var hour = date.getHours();var minute = date.getMinutes(); var sec = date.getSeconds(); if(hour&lt;10){hour='0'+hour;}if(minute&lt;10){minute='0'+minute;}if(sec&lt;10){sec='0'+sec} var ftime = hour+':'+minute+':'+sec; var fdate = year+'-'+month+'-'+dat; ///\\ var date = new Date(data.list[s+1].dt_txt); hour = date.getHours();minute = date.getMinutes();sec = date.getSeconds(); if(hour&lt;10){hour='0'+hour;}if(minute&lt;10){minute='0'+minute;}if(sec&lt;10){sec='0'+sec} var ttime = hour+':'+minute+':'+sec; c1.innerHTML='+fdate+'; c2.innerHTML=''+ftime+' to '+ttime+''; c3.innerHTML=data.list[s].weather[0].main;
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41127127
has title: The date values are shown as NaN in IE and Mozilla, although works fine in Chrome
tagged with: javascript
tagged with: mozilla
tagged with: date
has comment: http://stackoverflow.com/comment/41125083

http://stackoverflow.com/comment/41198912
comment on: http://stackoverflow.com/q/26261819
score: 0
type: QuestionComment
type: Comment
has text: You can do it this way, but you'll be constantly running into problems like this one. What you need to do is separate your *data* from your *display* logic. Take a look at this section of Addy Osmani's Learning JavaScript Design Patterns to understand this concept: http://addyosmani.com/resources/essentialjsdesignpatterns/book/#detailmvcmvp

http://stackoverflow.com/comment/41209375
score: 0
type: QuestionComment
type: Comment
has text: Also not seeing any "jumping" in Chrome or Firefox for OSX, but I think I see what you're talking about in IE11 for Win 8.1. My guess is the plugin is using jQuery's `.animate()`, which is known to be choppy at times.
comment on: http://stackoverflow.com/q/26267236

http://stackoverflow.com/comment/41238669
type: AnswerComment
comment on: http://stackoverflow.com/a/26276485
type: Comment
has text: Automatic reviews don't take more than an hour, typically less.
score: 0

http://stackoverflow.com/comment/41301646
score: 0
type: Comment
has text: Okay, basically I know how to use the element now, my only problem is that the string doesn't start with a number... so `parseInt()` or `parseFloat()` will return NaN. Any workarounds/ideas?
comment on: http://stackoverflow.com/a/26317911
type: AnswerComment

http://stackoverflow.com/comment/41263604
score: 0
comment on: http://stackoverflow.com/q/26296882
type: Comment
type: QuestionComment
has text: Look this please http://stackoverflow.com/a/24739520/2182741

http://stackoverflow.com/comment/41141005
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26210110
has text: I am guessing we're not on the same page. You have a website (ASP.Net Website) and you would want to connect its database to your Phonegap application. Am I right?
type: AnswerComment

http://stackoverflow.com/comment/41107357
has text: It's the same for `test.js`. It only add `8080/resources/page/test.js`. I simply uncommented lines
type: Comment
comment on: http://stackoverflow.com/a/26212357
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41158102
type: Comment
type: QuestionComment
has text: all files are included correctly and $('#slider').height( $(window).height() ); doesn't work.
score: 0
comment on: http://stackoverflow.com/q/26239568

http://stackoverflow.com/comment/41102027
has text: possible duplicate of [permutations in javascript?](http://stackoverflow.com/questions/9960908/permutations-in-javascript)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26209291
score: 0

validation
tags question: http://stackoverflow.com/q/26319596
tags question: http://stackoverflow.com/q/26253700
tags question: http://stackoverflow.com/q/26254225
tags question: http://stackoverflow.com/q/26333291
tags question: http://stackoverflow.com/q/26254944
tags question: http://stackoverflow.com/q/26314090
type: Tag
tags question: http://stackoverflow.com/q/26228008
tag name: validation
tags question: http://stackoverflow.com/q/26247230
tags question: http://stackoverflow.com/q/26231670
tags question: http://stackoverflow.com/q/26331622
tags question: http://stackoverflow.com/q/26250402
tags question: http://stackoverflow.com/q/26300076
tags question: http://stackoverflow.com/q/26271767
tags question: http://stackoverflow.com/q/26331325
tags question: http://stackoverflow.com/q/26267156
tags question: http://stackoverflow.com/q/26335661
tags question: http://stackoverflow.com/q/26211225
tags question: http://stackoverflow.com/q/26312737
tags question: http://stackoverflow.com/q/26204107
tags question: http://stackoverflow.com/q/26224761
tags question: http://stackoverflow.com/q/26253305
tags question: http://stackoverflow.com/q/26216905
tags question: http://stackoverflow.com/q/26211995
tags question: http://stackoverflow.com/q/26231915
tags question: http://stackoverflow.com/q/26285947
tags question: http://stackoverflow.com/q/26245220
tags question: http://stackoverflow.com/q/26342237
tags question: http://stackoverflow.com/q/26212846
tags question: http://stackoverflow.com/q/26275307
tags question: http://stackoverflow.com/q/26218849
tags question: http://stackoverflow.com/q/26276469
tags question: http://stackoverflow.com/q/26202354
tags question: http://stackoverflow.com/q/26270096
tags question: http://stackoverflow.com/q/26220315
tags question: http://stackoverflow.com/q/26224314
tags question: http://stackoverflow.com/q/26197052
tags question: http://stackoverflow.com/q/26279673
tags question: http://stackoverflow.com/q/26261647

http://stackoverflow.com/q/26263169
has comment: http://stackoverflow.com/comment/49588181
possible better answer: http://stackoverflow.com/a/26285759
tagged with: knockout.js
has answer: http://stackoverflow.com/a/26285759
has body: The goal is to have user input converted to upper case as they type. I am using the following extender: ko.extenders.uppercase = function (target, option) { target.subscribe(function (newValue) { target(newValue.toUpperCase()); }); return target; }; This extender can be added to the observable that are bound to HTML text boxes: self.userField = ko.observable(product.userField || "").extend({ uppercase: true }); This works great. Converts text bound to the observable to upper case. As the user types text into an empty field or adds it to the end of existing text, the text is converted to upper case. So far, so good! Now when the user wants to insert text, the cursor is placed to the insertion point either with the cursor keys or mouse and the new text is entered the character is inserted as upper case but the cursor position now jumps to the end of the text because the underlying observable is updated. How can the cursor position be retained while still converting the user input to upper case? Update 1: I created a custom binding so I could access the element and get and set the cursor position. I tried to tap into the existing value binding goodness. I am using the built in ko.selectExtensions.writeValue function. This may be good enough for my application but may not work in all browsers. ko.bindingHandlers.upperCase = { init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { ko.bindingHandlers["value"].init(element, valueAccessor, allBindings); }, update: function (element, valueAccessor, allBindings, viewModel, bindingContext) { var caretPosition = getCaretPosition(element); var newValue = ko.utils.unwrapObservable(valueAccessor()); ko.selectExtensions.writeValue(element, newValue.toUpperCase()); setCaretPosition(element, caretPosition); // Code from: http://stackoverflow.com/questions/2897155/get-cursor-position-in-characters-within-a-text-input-field function getCaretPosition (ctrl) { var CaretPos = 0; // IE Support if (document.select…
tagged with: javascript
linked to: http://stackoverflow.com/q/512528
has answer: http://stackoverflow.com/a/26267080
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/49408576
favorite count: 0
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26267080
has title: How To Retain Cursor Position When Updating A Knockout js Observable In An Extender
score: 4
linked to: http://stackoverflow.com/q/2897155

storage
tag name: storage
tags question: http://stackoverflow.com/q/26285928
type: Tag

jplayer
tags question: http://stackoverflow.com/q/26289199
type: Tag
tag name: jplayer

http://stackoverflow.com/comment/41257994
score: 0
type: Comment
has text: hmm, if it's not displayed I would guess the `height()` would show wrong results. But I will take your word for it and assume this works :D
comment on: http://stackoverflow.com/a/26294068
type: AnswerComment

angularjs-directive
tags question: http://stackoverflow.com/q/26330407
tags question: http://stackoverflow.com/q/26311646
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/26236724
tags question: http://stackoverflow.com/q/26215256
tags question: http://stackoverflow.com/q/26306681
tags question: http://stackoverflow.com/q/26307270
tags question: http://stackoverflow.com/q/26331251
tags question: http://stackoverflow.com/q/26342460
tags question: http://stackoverflow.com/q/26224562
tags question: http://stackoverflow.com/q/26282238
tags question: http://stackoverflow.com/q/26287029
tags question: http://stackoverflow.com/q/26319551
tags question: http://stackoverflow.com/q/26217180
tags question: http://stackoverflow.com/q/26335538
tags question: http://stackoverflow.com/q/26242530
tags question: http://stackoverflow.com/q/26284168
tags question: http://stackoverflow.com/q/26345996
tags question: http://stackoverflow.com/q/26286974
tags question: http://stackoverflow.com/q/26323948
tags question: http://stackoverflow.com/q/26274186
tags question: http://stackoverflow.com/q/26259706
tags question: http://stackoverflow.com/q/26271289
tags question: http://stackoverflow.com/q/26259313
tags question: http://stackoverflow.com/q/26213627
tags question: http://stackoverflow.com/q/26207947
tags question: http://stackoverflow.com/q/26236898
tags question: http://stackoverflow.com/q/26198638
type: Tag
tags question: http://stackoverflow.com/q/26222161
tags question: http://stackoverflow.com/q/26245820
tags question: http://stackoverflow.com/q/26287410
tags question: http://stackoverflow.com/q/26219866
tags question: http://stackoverflow.com/q/26224320
tags question: http://stackoverflow.com/q/26256926
tags question: http://stackoverflow.com/q/26340181
tags question: http://stackoverflow.com/q/26239982
tags question: http://stackoverflow.com/q/26242868
tags question: http://stackoverflow.com/q/26218834
tags question: http://stackoverflow.com/q/26212235
tags question: http://stackoverflow.com/q/26310062
tags question: http://stackoverflow.com/q/26239297
tags question: http://stackoverflow.com/q/26286416
tags question: http://stackoverflow.com/q/26256710
tags question: http://stackoverflow.com/q/26339228
tags question: http://stackoverflow.com/q/26205227
tags question: http://stackoverflow.com/q/26324766
tags question: http://stackoverflow.com/q/26343037
tags question: http://stackoverflow.com/q/26237338

http://stackoverflow.com/comment/41222838
score: 0
type: AnswerComment
has text: sorry my array declaration syntax was wrong, corrected and added demo link, please try now.
comment on: http://stackoverflow.com/a/26272809
type: Comment

http://stackoverflow.com/q/26284744
score: 0
answer count: 1
has body: I am having trouble trying to authenticate users before they view an express directory file tree. I can authenticate on all other pages but not on "/dat/:file(*)" even when I pass the authentication route before downloading the file. So when a user goes to '/', express will redirect them if they are not logged in. But, if a user goes to '/dat', express will not authenticate and will allow them to browse the file tree. I'm using express@3.4.8 and any help would be great. Thanks! app.configure( function() { app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use('/', express.static(__dirname + '/public')); app.use('/dat', express.directory(__dirname + '/public/dat', {hidden: true, icons: true})); app.use(express.json()); app.use(express.urlencoded()); app.use(express.methodOverride()); app.use(express.cookieParser('secret')); app.use(express.session({ secret: 'secret', maxAge: 3600000 })); app.use(passport.initialize()); app.use(passport.session()); app.use(app.router); }); app.get('/', ensure_authenticated, routes.index); app.get('/dat/:file(*)', ensure_authenticated, function(req, res, next) { var path = __dirname + '/' + req.params.file; res.download(path); });
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26284902
has title: Authenticate before serving up directory in Express
tagged with: node.js
tagged with: authentication
type: Question
tagged with: javascript
tagged with: express
tagged with: routes

http://stackoverflow.com/a/26238862
score: 24
answers question: http://stackoverflow.com/q/26238796
type: Answer
upvote count: 24
has body: There is no problem. It's just your console.log that shows all strings by simply delimiting with ". As you say this request object is used in a JSON request, where it will be JSON.stringifyed another time, with the valid result {"t":"{\"a\":1,\"b\":\"a sample text\"}","c":2,"r":"some text"}
downvote count: 0

http://stackoverflow.com/q/26262699
linked to: http://stackoverflow.com/q/8925820
has title: "Object doesn't support property or method 'push'"
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26262753
has comment: http://stackoverflow.com/comment/41200378
has answer: http://stackoverflow.com/a/26262726
accepted answer: http://stackoverflow.com/a/26262726
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/41200744
has comment: http://stackoverflow.com/comment/41200633
type: Question
answer count: 2
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26262753
upvote count: 3
score: 0
downvote count: 3
has body: I'm trying to add new value into existing JSON object in AngularJS but I'm getting this error message: "Object doesn't support property or method 'push'" Here is my code: $scope.addStatus = function (text) { $scope.application.push({ 'status': text }); //I have tried 'put' but getting the error }; $scope.create = function( application ){ $scope.addStatus('Under review'); } here is my application json looks like: {"type":"Not completed","source":"mail","number":"123-23-4231","amount":"234.44","name":"John ","id":"123","by_phone":true} I want to append/add status to the above json and something looks like after adding the status property: {"type":"Not completed","source":"mail","number":"123-23-4231","amount":"234.44","name":"John ","id":"123","by_phone":true, "status": "under review"}
duplicate of: http://stackoverflow.com/q/8925820
tagged with: angularjs

http://stackoverflow.com/comment/41292802
has text: I already knew about it. I simply don't see how the script tag loading has anything to do with this
comment on: http://stackoverflow.com/a/26312947
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/26336719
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41336456
has body: I have this code using bootstrap rechercher annuler When I click on cancel to reset the form it shows me the error on the email input : "please fill this field" I don't understand why a button with type cancel is making a validation process and how to disable it without adding uselesss javascript ?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26336796
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26336796
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: disable button type cancel validation

http://stackoverflow.com/comment/41374256
has text: Edited the HTML part of the code now, it should 100% work in any browser.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26346862
type: AnswerComment

http://stackoverflow.com/q/26205248
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/35456020
has answer: http://stackoverflow.com/a/48578184
answer count: 7
upvote count: 46
favorite count: 0
has title: jquery bootstrap selectpicker refreshing lists based upon previous list choice
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/38144492
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41096561
has body: I have three drop down lists, one list is populated on page load and doesn't change. The 2nd and 3rd lists may change depending on the selection. This functionality is working fine. I have tried to add Bootstrap selectpicker to the selectors and I can see it is working - unfortunately the lists are not refreshing based upon the selection. I actually think "behind the scenes" they are as I can see the queries being passed but via the front end nothing happens. Part of the HTML: The first two DDL's are created via php but are I have the following Javascript: $(document).ready(function() { $(".selectpicker").selectpicker(); }); This is the point where I have discovered the problem, I am trying to implement this within the ajax on change functions without success - not even sure if it is correct. $('.selectpicker').selectpicker('refresh'); I am pretty new to all of this so would like some help.
has answer: http://stackoverflow.com/a/26219830
possible better answer: http://stackoverflow.com/a/35456020
accepted answer: http://stackoverflow.com/a/26219830
downvote count: 0
score: 46
type: Question
has answer: http://stackoverflow.com/a/40346308
has answer: http://stackoverflow.com/a/75811464
has answer: http://stackoverflow.com/a/73611294

http://stackoverflow.com/a/26325147
has comment: http://stackoverflow.com/comment/41315062
accepted answer of: http://stackoverflow.com/q/26325088
has comment: http://stackoverflow.com/comment/41315079
answers question: http://stackoverflow.com/q/26325088
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/41315477
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41315228
has comment: http://stackoverflow.com/comment/41315619
has body: You can do the same thing without a global: var randomTran = function(flag){ flag = flag || 0; if (flag&lt;6) { var rh = Math.floor((Math.random() * 10) - 5), rv = Math.floor((Math.random() * 10) - 5); s.transit({x:rh,y:rv},50,randomTran.bind(this, ++flag)) }; } With the exception of s, this does not rely on any external variables and, as written, does not require you to modify any other code.
type: Answer
has comment: http://stackoverflow.com/comment/41315153
has comment: http://stackoverflow.com/comment/41325036
has comment: http://stackoverflow.com/comment/41315601
has comment: http://stackoverflow.com/comment/41314696
has comment: http://stackoverflow.com/comment/41315039

http://stackoverflow.com/q/26289482
has title: how to pick a new index of an array by each click
has answer: http://stackoverflow.com/a/26289779
tagged with: jquery
has answer: http://stackoverflow.com/a/26289628
answer count: 5
has answer: http://stackoverflow.com/a/26289557
type: AnsweredQuestion
has body: I have a function that it includes an array of colours, and there is a button and a text tag. So after each click, the function take the current index of the array, show it in the text and add one to the index number so next time the next index will be shown. Here is my code: var mycolor = 0; var color = function() { var list = ["red", "blue", "green"]; return list[mycolor]; mycolor++; }; function run(){ $(".demo").text(color()); } JSFIDDLE Any idea? how to fix it? currently it only shows the first index, it does not update it the variable.
has comment: http://stackoverflow.com/comment/41250154
accepted answer: http://stackoverflow.com/a/26289557
type: Question
possible better answer: http://stackoverflow.com/a/26289505
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26289505
score: 0
has answer: http://stackoverflow.com/a/26289524

opentok
tags question: http://stackoverflow.com/q/26339419
tag name: opentok
type: Tag

http://stackoverflow.com/comment/41356201
type: QuestionComment
has text: @HarishR - not initially no, I retrieve the model from the server, so initially `scope.abc = undefined`. However, after the service retrieves the model then `scope.abc = {xyz: 'foo'}`. The directive will even correctly display the value of 'foo', however, when you change the value to 'bar', the Angular model is not updated, e.g. `xyz` still equals 'foo' (this can be confirmed by printing `scope.abc` to the console). The issue I'm trying to neatly solve is this one: http://jimhoskins.com/2012/12/14/nested-scopes-in-angularjs.html
comment on: http://stackoverflow.com/q/26345183
score: 0
type: Comment

http://stackoverflow.com/comment/41313832
type: Comment
has text: Please include all relevant code in the body of the question. A link to your website will be useless to future visitors after you've fixed it. You should also look at http://stackoverflow.com/help/mcve for tips on building example code that narrows down the problem.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26323952

http://stackoverflow.com/q/26269054
type: Question
has body: I would like to remove any forward slashes in URL that are more than once in the sequence. So far: var temp = "/path//to/middle//nowhre/avator2.jpg"; temp.replace(/\/\//,'/'); This works only for double slashes and only once but i would like it removes any number slashes that are more than once and do it for any occurance in the URL. I also tried temp.replace(/*[/+]*/,'/'); but this doesn't work. Any help much appreciated. Thank You
possible better answer: http://stackoverflow.com/a/26269084
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26269084
tagged with: jquery
has answer: http://stackoverflow.com/a/26269103
tagged with: regex
has answer: http://stackoverflow.com/a/26269081
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/26269103
answer count: 4
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/42440432
has title: Regular Expression To Replace Double Slashes with Javascript

http://stackoverflow.com/comment/41250732
type: AnswerComment
has text: The problem though is that when I change to <%= body %> the while page fails to render and I get a ReferenceError saying that `body is not defined`
type: Comment
comment on: http://stackoverflow.com/a/26289156
score: 0

http://stackoverflow.com/comment/41336982
score: 0
type: Comment
type: QuestionComment
has text: @AvinashRaj It's to do with the product it's used on, gets injected as a string, hence the double slash escape and the double braces indicate to escape a brace.
comment on: http://stackoverflow.com/q/26336695

http://stackoverflow.com/q/26206274
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/41099380
tagged with: php
has answer: http://stackoverflow.com/a/26206319
has body: How can i insert a value to another domain (not have access to this domain) textbox, from filling a form from my domain? Form in my domain: &lt;form action="" method="post" name="birthdaysend"&gt; &lt;input type="text" value="" name="birthday" &gt; &lt;input type="submit" value="submit"&gt; &lt;/form&gt; Where this value will be shown in the other domain textbox (where i do not have access) &lt;form action="" method="post" name="birthdayreceive"&gt; &lt;input type="text" value="" name="birthdaydate" &gt; &lt;input type="submit" value="submit"&gt; &lt;/form&gt; When i fill birthday date from my form, on submit the same date to be shown in this other textbox where i do not have access.
has answer: http://stackoverflow.com/a/26208298
has comment: http://stackoverflow.com/comment/41099453
upvote count: 2
score: 0
has answer: http://stackoverflow.com/a/26206294
downvote count: 2
answer count: 3
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: How to fill a textbox of another domain, from my domain?
favorite count: 0

http://stackoverflow.com/comment/41184785
score: 0
type: Comment
type: QuestionComment
has text: Does this also happen when you invoke only a singular add_error call? Is the data about other errors there as well?
comment on: http://stackoverflow.com/q/26254205

http://stackoverflow.com/a/26261036
has body: To achieve goals you described in comments and taking into consideration HTML structure you posted, I'd go the other way. JavaScript: $(document).ready(function () { colorsCount = 4; var colorArray = $('.isotope-brick'); $.each(colorArray, function (ind, obj) { $(obj).addClass('color' + Math.floor(Math.random() * colorsCount)); }); }); and CSS (two entries for each color are necessary, but it gives elasticity when slightly different shade is needed, so no problem :-) .isotope-brick.color0 .brick-overlay { background-color:#E1A2AC; } .isotope-brick.color0 .brick-info { color:#E1A2AC; } Working example here jsfiddle. One tiny remark: I changed brick-overlay and brick-info ids into CSS classes, 'cause i think you are going to have more than one article on the site. I strongly recommend you doing the same. Here's the why.
answers question: http://stackoverflow.com/q/26237976
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26237976
has comment: http://stackoverflow.com/comment/41220739

http://stackoverflow.com/q/26352588
tagged with: yeoman
tagged with: yeoman-generator
has comment: http://stackoverflow.com/comment/41382261
score: 0
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26364765
has comment: http://stackoverflow.com/comment/41367834
answer count: 1
tagged with: web
tagged with: gulp
has body: I started a project using generator-gulp-webapp and I ran bower install --save heatmap.js. After that I added the Google Maps API source files to index.html and added the following two lines to the html-file: My problem now is that when I run gulp serve, none of those files are actually loaded. I don't seem to be getting any 404 errors when I look through the network inspector either. They seem to load just fine when I open up the index.html-file manually, without going through gulp / visiting http://localhost:9000/. What am I missing here? I'm sure it's something really simple. Here are all of the relevant files.
has title: Firefox is not loading my scripts under Node.js
type: UnansweredQuestion

http://stackoverflow.com/comment/41218213
type: AnswerComment
comment on: http://stackoverflow.com/a/26262327
score: 0
has text: Thank you very much indeed ! I updated to IE11, and it worked !
type: Comment

http://stackoverflow.com/comment/58571383
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26288047
type: AnswerComment
has text: Unfortunately I haven't found the cause yet but I have a bigger issue. I forgot to check with my host if they support node.js, which they don't and my client doesn't wish to move to a more expensive solution which does support node.js so I have to migrate my project asap back to .NET.

http://stackoverflow.com/comment/41114434
type: QuestionComment
comment on: http://stackoverflow.com/q/26215113
has text: @code-jaff: Of course I've tried this. It is even worse. I get popup blocker each time window.open is executed and on each browser. mido22: I don't want to solve problem like that. In worse case scenario I will use window.location.href, but even that has its own disadvantages. It does not reload window instantaneously that is the biggest problem.
score: 0
type: Comment

http://stackoverflow.com/q/26336280
has title: How to rotate two diffrent X3D scenes at the same time and on the same mouse event?
has answer: http://stackoverflow.com/a/70216158
score: 1
has answer: http://stackoverflow.com/a/78722478
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41357204
has body: do i need some java script or jQuery for this ? I'm just asking because i need something like this http://examples.x3dom.org/cadViewer/slimViewerConrod/index.html. As you can see you can rotate the main object (main scene) with the axes(helper scene) together with the same mouse event. I'm relative new to X3DOM and i just wanted to ask because i have no clue how it works. If it helps, my X3D scenes are : '>
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/41367840
downvote count: 0
tagged with: jquery
tagged with: x3dom
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: x3d

http://stackoverflow.com/comment/41091407
has text: Ehh... if it's a _copy_, aren't all users sharing the same _file_?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26203974
type: Comment

http://stackoverflow.com/comment/41286974
has text: OnLoad is firing on windows load, so it fires only once unless page refreshes, I guess you may use something like `window.onload = function() { DO YOUR STUFF AND RELOAD THE PAGE after };` but it is very bad practice to overload the user like that.
comment on: http://stackoverflow.com/a/26309633
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41131669
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26207309
has text: So I was able to get your solution to work. Thank you! How would I handle automatically looping through results with more dimensions?
type: Comment

http://stackoverflow.com/a/26287617
has comment: http://stackoverflow.com/comment/41247108
has comment: http://stackoverflow.com/comment/41246916
has comment: http://stackoverflow.com/comment/41247089
score: 3
has comment: http://stackoverflow.com/comment/41246934
answers question: http://stackoverflow.com/q/26287538
has comment: http://stackoverflow.com/comment/41246841
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26287538
upvote count: 3
type: Answer
has body: The problem is that you are adding a duplicate element and you haven't specified a track by in your ng-repeat function, therefore angular thinks that it's the same element, so you could fix it like this: Test Dynamic {{ myList.length }} Add
has comment: http://stackoverflow.com/comment/41247583

http://stackoverflow.com/a/26335256
score: 2
answers question: http://stackoverflow.com/q/26334971
upvote count: 2
has body: So just make separate function for that: function showHideNav(scroll, headerBigWrapHeight, element) { var scroll = element.scrollTop(), header = $('header'), headerSmall = header.children('.small'), headerBigWrap = header.children('.big') headerBigWrapHeight = headerBigWrap.height(); if( scroll &gt;= headerBigWrapHeight ) { header.css('position','fixed'); } else { header.css('position','static'); } headerBigWrap.toggle(); headerSmall.toggle(); } (function($){ showHideNav(scroll); $(window).scroll(function(event){ scroll = $(this).scrollTop(); showHideNav(scroll); }); })(jQuery);
downvote count: 0
type: Answer

asp.net-mvc-4
tags question: http://stackoverflow.com/q/26316980
tags question: http://stackoverflow.com/q/26223987
tag name: asp.net-mvc-4
tags question: http://stackoverflow.com/q/26252029
tags question: http://stackoverflow.com/q/26342047
tags question: http://stackoverflow.com/q/26322165
type: Tag
tags question: http://stackoverflow.com/q/26281042
tags question: http://stackoverflow.com/q/26233808
tags question: http://stackoverflow.com/q/26272244
tags question: http://stackoverflow.com/q/26312424
tags question: http://stackoverflow.com/q/26328170
tags question: http://stackoverflow.com/q/26199948
tags question: http://stackoverflow.com/q/26259298

http://stackoverflow.com/a/26244179
type: Answer
upvote count: 22
downvote count: 0
has comment: http://stackoverflow.com/comment/106594973
accepted answer of: http://stackoverflow.com/q/26240333
answers question: http://stackoverflow.com/q/26240333
score: 22
has body: The issue ended up being that 'max_input_vars' in the php.ini file was not set high enough. The value was set to 10,000 and the user was submitting data of near 11k, thus some of it was getting truncated. Changing this value to be greater is what solved the issue.
type: AcceptedAnswer

http://stackoverflow.com/a/26236013
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26235913
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26235913
type: Answer
has comment: http://stackoverflow.com/comment/41151583
has comment: http://stackoverflow.com/comment/41153966
has body: (function() { mapKeyUrl = "/GenMap/getcountry/mapdata" //... }) You define a function but you never call it, which is why it doesn't run. Since there is no point in wrapping it in a function anyway, just omit it: .done(function( coldata ) { console.log( "JSON Data: " + coldata[1].value ); mapKeyUrl = "/GenMap/getcountry/mapdata" $.getJSON(mapKeyUrl, { regsel: "${regsel}", variable: "mapkey" }).done(function( mapdata ) { console.log( "JSON Map:" + mapdata) }); });
score: 2
has comment: http://stackoverflow.com/comment/41168354
has comment: http://stackoverflow.com/comment/41151319

http://stackoverflow.com/a/26330482
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26330378
has body: The way you're trying to use me (if I understand your question correctly), it would be considered a function assigned to an inner variable, and not a member of the function/“object” itself. To access the me prototype, you would have to use this.me – which of course would make the whole thing moot. var foo = function() { this.doSomething = function() { alert('yay!'); }; // this doesn't work! "me" would refer to a non-existent variable me.doSomething(); // this would work, but it's obviously useless. this.me.doSomething(); } Even worse, if you'd call this.me inside a function defined inside another function, you would access the this.me of the inner function, and could never access the outer one with this approach.
upvote count: 2
type: Answer

http://stackoverflow.com/a/26339434
type: Answer
has comment: http://stackoverflow.com/comment/41344017
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41367173
has comment: http://stackoverflow.com/comment/41341105
has comment: http://stackoverflow.com/comment/41343701
answers question: http://stackoverflow.com/q/26339293
upvote count: 1
has body: Use onchange jQuery event. $(document).on("change", "#sel1", function(){ if($(this).val() == 2) // 2 is the value of the tag { var divElement = " The Div Element that you want to be appended to your page "; $("body").append(divElement); } });

http://stackoverflow.com/comment/41324756
score: 0
has text: seems like you need to do something like bind `mousemove` handler to `mousedown` and adjust CSS position accordingly. Then on `mouseup` unbind the mousemove handler
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26330029

http://stackoverflow.com/q/26263955
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26264012
has answer: http://stackoverflow.com/a/26264385
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/26264180
accepted answer: http://stackoverflow.com/a/26264180
has comment: http://stackoverflow.com/comment/41202789
has body: This seems like something that should be easy to do but I can't find any workable solutions. The basic idea is to have an array with codes associated to urls, and depending which url is parsed as a referrer, a code is inserted in localStorage. var site = { “example1.com” : "x10", “example2.com” : "x11", “example3.com” : "x12" } if (document.referrer.indexOf(sitevalue) != -1) { if (localStorage) { localStorage.setItem("code",sitekey); } } So if the referrer is example1.com, then the code set in localStorage will "x10" and so on. I have read about possibly using the Underscore.js _Invert method, but I think there's gotta be a more obvious solution I am missing.
type: Question
has answer: http://stackoverflow.com/a/26264012
tagged with: arrays
tagged with: javascript
tagged with: jquery
has title: How can I associate two values in Javascript or Jquery?

http://stackoverflow.com/q/26320086
has comment: http://stackoverflow.com/comment/41406748
tagged with: http://stackoverflow.com/tag/html
has body: I am used to using GLUT's PostRedisplay and (App|UI)Kit's setNeedsDisplay methods for requesting a new display event to be posted to the event queue when the app wishes to redraw a scene. I haven't found a counterpart with HTML5's Canvas element. For example, I am currently just calling my display() function directly when I want to redraw to the canvas: function mouseMove(event) { if (mouseDrag) { // update camera position display(); } } The display() function renders the scene (which can be expensive): function display() { gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); // issue WebGL calls to redraw scene gl.flush(); } Most systems I am used to will coalesce multiple display events into one event if multiple rendering requests occur before the last rendering is finished. What I am doing above can be problematic if a long stream of display() calls outpace the rendering speed. Anyway, what is the correct way to redraw canvas elements effeciently? You can see the demo app I am working on here (if you have WebGL enabled). Update : Following the answer below I now use RequestAnimationFrame and use the return value as a flag to indicate that a request has already been made. When the scene is rendered I clear the flag so further requests can be made: var requestId = 0; // id of current requestAnimationFrame request (0 = no request) function mouseMove(event) { if (mouseDrag) { // update camera position if (requestId) requestId = requestAnimationFrame(display); else console.log("request already in queued"); // test } } function display() { requestId = 0; // redraw scene } Noting the log messages I get this does indeed coalesce multiple requests. This seems like a great approach. Are there any other solutions?
downvote count: 0
has answer: http://stackoverflow.com/a/26320906
accepted answer: http://stackoverflow.com/a/26320906
has title: Does canvas have a display event handler?
has comment: http://stackoverflow.com/comment/41412089
type: AnsweredQuestion
score: 1
tagged with: webgl
has comment: http://stackoverflow.com/comment/41327115
type: Question
tagged with: canvas
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26331236
has comment: http://stackoverflow.com/comment/41326313
answers question: http://stackoverflow.com/q/26330195
has body: You have to wait for DOM ready event: $(document).ready(function() { $('#button').on("click", function() { $('#dialog').load('/.projectcontext/jsp/viewfolder/helloworldedit.jsp').dialog(); }); });
has comment: http://stackoverflow.com/comment/41326441
score: 0
has comment: http://stackoverflow.com/comment/41326474
has comment: http://stackoverflow.com/comment/41326416
has comment: http://stackoverflow.com/comment/41326215
type: Answer

http://stackoverflow.com/q/26263667
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41202564
upvote count: 1
has title: Triggering a basic CSS animation with Javascript
type: Question
has answer: http://stackoverflow.com/a/26263855
has comment: http://stackoverflow.com/comment/41202512
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
score: 1
has comment: http://stackoverflow.com/comment/41202465
accepted answer: http://stackoverflow.com/a/26263855
has body: I'm currently trying to add a Konami Code which would spin a div on one of my (very simple) pages. Here's my code: As you can see, it's just about triggering the animation specified in the messy CSS soup (which works perfectly), when the correct code is entered. I'm a bit desperate about it, would somebody have a idea ?
favorite count: 0
tagged with: animation
tagged with: css

http://stackoverflow.com/comment/41123868
has text: tabstrip2 is actually a kendo ui widget.
comment on: http://stackoverflow.com/q/26220207
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41305983
type: Comment
type: QuestionComment
has text: Where is javascript code?
comment on: http://stackoverflow.com/q/26320382
score: 0

http://stackoverflow.com/q/26349087
has comment: http://stackoverflow.com/comment/46465548
has comment: http://stackoverflow.com/comment/46399262
has body: I'd like to use JavaScript to parse an html document into an abstract syntax tree, where each node also includes start and end line numbers (and hopefully also character positions) for each node. Are there any existing solutions that can do this? I don't want to have to write it myself. Edit Apr 24, 2016: Being able to parse HTML along with php tags in arbitrary places would be even more ideal.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/46406718
has answer: http://stackoverflow.com/a/75538829
answer count: 2
tagged with: abstract-syntax-tree
downvote count: 0
has answer: http://stackoverflow.com/a/48708263
tagged with: parsing
favorite count: 0
upvote count: 8
type: UnansweredQuestion
has title: How to parse an html document into an AST that includes line numbers for each node?
tagged with: http://stackoverflow.com/tag/html
score: 8

http://stackoverflow.com/a/26332017
downvote count: 1
answers question: http://stackoverflow.com/q/26331232
has body: Id be using the JavascriptExecutor. JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("&lt;JavaScript.click;");
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/a/26284232
has comment: http://stackoverflow.com/comment/41240345
has comment: http://stackoverflow.com/comment/41240472
score: 0
has body: In your second example, item is undefined. It is only defined in your ng-repeat (item in items).
has comment: http://stackoverflow.com/comment/41240388
answers question: http://stackoverflow.com/q/26284168
has comment: http://stackoverflow.com/comment/41240233
type: Answer

http://stackoverflow.com/a/26330969
type: Answer
upvote count: 16
score: 16
has body: With JavaScript you don't have to clone() the node you want to move, just get a reference to it and then insert it wherever you want, for example: // simple function to demonstrate a click-handling: function spanClick (){ // message to demonstrate that the function still works // without having to worry about cloning: console.log("So, you've clicked the span."); // moving the element elsewhere: div.appendChild(this); } // references to the various elements: var span = document.getElementById('demo'), div = document.getElementById('recipient'); // assigning the click event-handler: span.addEventListener('click', spanClick); function spanClick() { console.log("So, you've clicked the span."); div.appendChild(this); } var span = document.getElementById('demo'), div = document.getElementById('recipient'); span.addEventListener('click', spanClick); span { color: #f90; } div { border: 1px solid #000; margin: 1em; } div span { color: #0f0; } If you click the following span element, you'll log a message to the console (F12), and move it to inside the following div element. It will still trigger the message. This is the span cloneNode(), or clone(), is only required if you need to, for whatever reason, duplicate the node. References: EventTarget.addEventListener(). Node.appendChild().
answers question: http://stackoverflow.com/q/26321432
downvote count: 0

http://stackoverflow.com/a/26278146
answers question: http://stackoverflow.com/q/26277886
score: 0
type: Answer
has body: It would be much easier if you just add one class to all the buttons you want to remove the children of. Lets say you add the class button to all of them. Then you could just do this: $('.button &gt; div').remove(); // Removes all direct children divs of the .button element. Or $('.button div').remove(); // Removes all divs inside the `.button` element.

http://stackoverflow.com/q/26246023
answer count: 1
tagged with: tableau-api
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
score: -3
has title: dynamic resizing of iframe for cross domain servers without access
has body: My object is to remove the scrollbars of an iframe for cross domain servers, which I don't have access to. Page A has an iframe which displays contents of an external server The content is not fixed, its height changes with time so I can not fix the height, it has to be dynamic. It has to be handled with JavaScript. I have a list of objects corresponding to the users selection. When a different selection is made, different content types are shown. I have tried to a solution with postMessage, but it does not solve the problem as I don't have access to the server. I was thinking more of a view, which resizes the iframe when the page is loaded.
downvote count: 4
type: Question
tagged with: javascript
tagged with: dynamic-resizing
has answer: http://stackoverflow.com/a/26246296
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41122418
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26220137
has text: @Regent: Yeah it's pretty rough. @ Yoooouri: When you find yourself repeating code that looks very similar, you need take a step back and figure out how to refactor it to eliminate the repeating code.

browser-close
tags question: http://stackoverflow.com/q/26250634
tag name: browser-close
type: Tag

http://stackoverflow.com/q/26257482
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41192329
upvote count: 1
has answer: http://stackoverflow.com/a/26262549
type: AnsweredQuestion
has body: I have a lot of table using tablesorter on my website and I'm looking for a way to sort "sorter: 'digit' a column that have a specific classname : "class="note". I know of to do this with a header : $(".tablesorter").tablesorter({ headers: { 0: { sorter: 'digit' } // column number, type } }); But is there a generic way to do that is the html like this : Note or with the classname Note somewhere in the javascript like this $(".tablesorter .note").tablesorter() ... ? Because my column "note" is sometime the third column, sometime the fifth etc. I ask this because without the "digit" order specified, tablesorter does not know how to sort numbers ... Here is un jsfiddle to show what I mean : http://jsfiddle.net/2cmuy39L/ Thank you.
tagged with: tablesorter
score: 1
type: Question
has title: Tablesorter and automatic sorter digit?
accepted answer: http://stackoverflow.com/a/26262549

http://stackoverflow.com/q/26335776
accepted answer: http://stackoverflow.com/a/35860615
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41362109
has title: How to consume console logs of Chrome DevTools or Firebug programatically?
has body: I need to save Firebug's or the Google Chrome Console panel's log. I tried console.log() to play with printing logs, but what I need is to programatically save these developer tools logs into files.
type: Question
tagged with: google-chrome-devtools
tagged with: javascript
has answer: http://stackoverflow.com/a/35860615
score: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/41336051
tagged with: firebug
answer count: 1
has comment: http://stackoverflow.com/comment/41337244
has comment: http://stackoverflow.com/comment/41822737

http://stackoverflow.com/comment/41131570
type: QuestionComment
has text: For simplicity reasons the raw data located in the body and it appears exactly like that in plaintext.
comment on: http://stackoverflow.com/q/26225077
score: 0
type: Comment

http://stackoverflow.com/a/26261158
has comment: http://stackoverflow.com/comment/41197938
upvote count: 2
type: Answer
score: 2
has body: The following guide might be helpful. http://www.i-programmer.info/programming/graphics-and-imaging/2078-canvas-bitmap-operations-bitblt-in-javascript.html It mentions you can draw a section of the image using drawImage(image,sx,sy,sw,sh,dx,dy,dw,dh) Where s is source, and d is destination. From there you just have to determine the position of the click and drag to work out the co-ordinates and width/heights. I've updated your fiddle just to demonstrate. It's very crude, so just click once somewhere in the top left of the image, then click again somewhere in the bottom right. http://jsfiddle.net/treerock/1zpc8fz0/
answers question: http://stackoverflow.com/q/26259787
accepted answer of: http://stackoverflow.com/q/26259787
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26219219
has comment: http://stackoverflow.com/comment/41120163
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41120773
has body: I have following text: &lt;meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt;&lt;title&gt;test file&lt;/title&gt;&lt;meta name="GENERATOR" content="LibreOffice 4.1.4.2 (Windows)"&gt;&lt;meta name="CREATED" content="0;0"&gt;&lt;meta name="CHANGED" content="0;0"&gt;&lt;style type="text/css"&gt; &lt;!-- .nicEdit-main { margin-left:55px; margin-right:36px; margin-top:18px; margin-bottom:36px } P { margin-bottom: 0.21cm; direction: ltr; color: #000000; text-align: left; widows: 2; orphans: 2 } P.western { font-family: "Times New Roman", serif; font-size: 12pt; so-language: ru-RU } P.cjk { font-family: "Arial", sans-serif; font-size: 12pt; so-language: zh-CN } P.ctl { font-family: "Symbol"; font-size: 12pt; so-language: hi-IN } TD P { margin-bottom: 0.21cm; direction: ltr; color: #000000; text-align: left; widows: 2; orphans: 2 } TD P.western { font-family: "Times New Roman", serif; font-size: 12pt; so-language: ru-RU } TD P.cjk { font-family: "Arial", sans-serif; font-size: 12pt; so-language: zh-CN } TD P.ctl { font-family: "Symbol"; font-size: 12pt; so-language: hi-IN } --&gt; &lt;/style&gt;&lt;div type="HEADER"&gt; &lt;p class="western" style="margin-bottom: 0.38cm; text-align: left;" align="LEFT"&gt; &lt;br&gt;&lt;br&gt; &lt;/p&gt; &lt;/div&gt;&lt;p style="margin-top: 0.42cm; margin-bottom: 0.42cm; text-align: center;" class="western" align="CENTER"&gt; &lt;span class="divider"&gt; &lt;b&gt;He&lt;/b&gt;&lt;i&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;-llo&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;b&gt;,&amp;nbsp;World!!!!!&lt;/b&gt;&lt;/span&gt; &lt;/p&gt;&lt;p style="margin-top: 0.42cm; margin-bottom: 0.42cm; text-align: center;" class="western" align="CENTER"&gt; &lt;span class="divider"&gt;&lt;br&gt;&lt;/span&gt; &lt;span class="divider"&gt;&lt;br&gt;&lt;/span&gt; &lt;/p&gt;&lt;p style="margin-top: 0.56cm; margin-bottom: 0.56cm; text-align: center;" class="western" align="CENTER"&gt; &lt;span class="divider"&gt; &lt;font size="6"&gt;&l…
has comment: http://stackoverflow.com/comment/41120554
type: Question
has comment: http://stackoverflow.com/comment/41120102
has comment: http://stackoverflow.com/comment/41120247
has comment: http://stackoverflow.com/comment/41120462
has comment: http://stackoverflow.com/comment/41120009
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41120612
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41120307
favorite count: 0
has answer: http://stackoverflow.com/a/26219473
accepted answer: http://stackoverflow.com/a/26219473
has comment: http://stackoverflow.com/comment/41120176
has title: Javascript regex fails (loops?)
tagged with: regex

http://stackoverflow.com/comment/41338495
comment on: http://stackoverflow.com/q/26337811
score: 0
type: Comment
type: QuestionComment
has text: yes duplicate key is not allowed

http://stackoverflow.com/q/26322909
accepted answer: http://stackoverflow.com/a/26323109
type: AnsweredQuestion
has title: Having trouble matching users input to a .json file, keep getting "Uncaught ReferenceError: myExp is not defined"
has comment: http://stackoverflow.com/comment/41310726
has body: I keep getting an error when I try to match users input data to a .json file. Here is my .js: $.getJSON('rote.json', function(data){ var random = data.eats[Math.floor(Math.random() * data.eats.length)]; var title = random[0].cat; var titleLength = random[0].cat.length; $("h2").html(title); var output = ''; $.each(random, function(key,val){ var snippedFieldLength = random.length - 1; output += '&lt;input type="search" name="search" class="search" placeholder="write your tag here" /&gt;&lt;br&gt;&lt;br&gt;'; }); $('.fields').html(output); $('.search').keyup(function(){ var searchField = $('.search:eq(1)').val(); var myExp = new RegExp(searchField, "i"); console.log(myExp); var output2 = ''; $.each(random, function(key,val){ console.dir(val); if (val.search(myExp) != -1) { output2 += 'hello'; } }); $('#update').html(output2); }); }); Here is my .json file: {"eats": [ [ {"cat":"drinks"}, "soda", "milk" ], [ {"cat":"food"}, "burgers", "fries", "pizza" ] ] } I'm trying to match data I'm getting from a .json file to text inserted into html input fields generated using a loop. All of this is done with .json and jquery. I have no trouble randomly selecting items from my json category 'eats' and I have no trouble spontaneously creating fields that conform the the length of the categories (minus 1, since the 'cat' items should be excluded), but my problem is that I can't seem to get the regular expression to match the text the user will enter to the .json file. Does anybody have any ideas? I keep getting a "Uncaught ReferenceError: myExp is not defined" error.
has comment: http://stackoverflow.com/comment/41310773
type: Question
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26323109
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41310762
tagged with: regex

http://stackoverflow.com/comment/41308157
type: AnswerComment
type: Comment
score: 1
has text: I've added example code to my answer, but there isn't much to explain: `globalCompositeOperation='destination-out'` will cause future drawings to erase current drawings. Good luck with your project!
comment on: http://stackoverflow.com/a/26318485

http://stackoverflow.com/q/26214739
accepted answer: http://stackoverflow.com/a/26215222
has body: I am new to both Sencha ExtJS and Css as a whole. Basically I have a 3 child panel's inside a master panel. I want to set the same background color to just three panel's inside the master panel using CSS. I have created a .css file and linked it into the HTML. The content of the CSS file are: .x-panel.child-content-style { background-image : url('TitleBackground.png'); } I can make this happen without using css by setting the bodyStyle:{"background-image":"url('TitleBackground.png')"} config. It works perfectly but I feel there is probably a better way to do it using css. When I try and add my css using the cls config property nothing happens. When set the bodyCls property it then sets the backgrond of the entire application which is not what I want. I am looking to change the background to only a few panel's. I have also tried specifying the css element name in the bodyStyle config in lieu of the inline with no joy. Here are my child panel's: { xtype: 'panel', html: '&lt;img src=\'appIcon.png\' style=\'width:52px;height:52px\'&gt; &amp;nbsp;', cls: 'child-content-style' }, { xtype: 'panel', html: '&lt;h2 style=\'font-family:verdana\'&gt;Toolkit v3.0&lt;/h2&gt;', bodyStyle:{"background-image":"url('TitleBackground.png')"} }, { xtype: 'panel', html: '&amp;nbsp;&lt;img src=\'appIcon.png\' style=\'width:52px;height:52px\'&gt;', bodyStyle:{"background-image":"url('TitleBackground.png')"} } Is this even possible to do or should I just cjoke it up to a loss and leave it inline? Thanks
answer count: 1
tagged with: javascript
tagged with: extjs
upvote count: 1
favorite count: 0
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
has title: ExtJS & Css Panel Background's
type: Question
has answer: http://stackoverflow.com/a/26215222

http://stackoverflow.com/a/71469729
has body: Use the javaScript sort() readymade function. It will reduce the lines of code. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
score: 0
has comment: http://stackoverflow.com/comment/126393760
type: Answer
answers question: http://stackoverflow.com/q/26352096

http://stackoverflow.com/q/26261035
has body: A quick question. I have an issue with the d3 treemap method. When i load this script, all the x are 0 and the console tells me that the y, dy and dx are not numbers. What did I do wrong ? var colorScale=d3.scale.category10(); var canvas9 = d3.select(".result-side9") .append("svg") .attr("width", 600) .attr("height", 600) .attr("transform","translate(10,10)"); d3.json("assemblee5.json", function (data) { var treemap = d3.layout.treemap() .size(550,550) .nodes(data); var cells= canvas9.selectAll(".cell") .data(treemap) .enter() .append("g") .attr("class", "cell"); cells.append("rect") .attr("x", function (d){return d.x; }) .attr("y", function (d,i){return d.y; }) .attr("width", function (d,i){return d.dx; }) .attr("height", function (d,i){return d.dy; }) .attr("fill", function (d,i){return d.children ? null : colorScale(d.parent.name); }) .attr("stroke", "white"); cells.append("text") .attr("x", function (d,i){return d.x + d.dx/2; }) .attr("y", function (d,i){return d.y + d.dy/2; }) .text(function (d){return d.children ? "" : d.name;}) .attr("text-anchor", "middle"); }); JSonLint tells me that my Json is valid.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41198551
has comment: http://stackoverflow.com/comment/77642637
has title: Treemap with d3: the x, y, dx & dy are NaN
score: 0
has answer: http://stackoverflow.com/a/26263301
has comment: http://stackoverflow.com/comment/41197218
has answer: http://stackoverflow.com/a/45340493
tagged with: nan
tagged with: d3.js
type: UnansweredQuestion
tagged with: treemap
type: Question
answer count: 2

http://stackoverflow.com/q/26273277
has title: Get attributes via PHP function
type: Question
has answer: http://stackoverflow.com/a/26273422
tagged with: javascript
has comment: http://stackoverflow.com/comment/41220865
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41220073
accepted answer: http://stackoverflow.com/a/26273422
tagged with: php
possible better answer: http://stackoverflow.com/a/26273381
has answer: http://stackoverflow.com/a/26273381
tagged with: attributes
type: AnsweredQuestion
has body: I have a dropdown list written as follows: &lt;span class="spanClass"&gt;&lt;input type="checkbox" id="checkBoxID" onClick="handleCheckBox()"&gt;CheckBox&lt;/label&gt;&lt;/span&gt; &lt;select name="mySelect" class="mySelectClass" id="mySelectID" style="width:auto;" disabled&gt; &lt;option value="0" &lt;?php if($value == '0'){ echo "selected=\"selected\"";} ?&gt;&gt;&lt;?php echo $string1; ?&gt;&lt;/option&gt; &lt;option value="1" &lt;?php if($value == '1'){ echo "selected=\"selected\"";} ?&gt;&gt;&lt;?php echo $string2; ?&gt;&lt;/option&gt; &lt;option value="2" &lt;?php if($value == '2'){ echo "selected=\"selected\"";} ?&gt;&gt;&lt;?php echo $string2; ?&gt;&lt;/option&gt; &lt;option value="3" &lt;?php if($value == '3'){ echo "selected=\"selected\"";} ?&gt;&gt;&lt;?php echo $string3; ?&gt;&lt;/option&gt; &lt;option value="4" &lt;?php if($value == '4'){ echo "selected=\"selected\"";} ?&gt;&gt;&lt;?php echo $string4; ?&gt;&lt;/option&gt; &lt;/select&gt; And I can control the "enabled" or "disabled" attribute via a Javascript function by clicking on the checkbox. Then, I would like to get the attribute value through a PHP function. Is possible to achieve this? Thank you in advance. EDIT I solved in a different way. Since I have a button which executes another JS function which executes another PHP code, I check if the checkbox is checked or not, so I can control the values from this function. Bye
tagged with: select

http://stackoverflow.com/q/26217478
has comment: http://stackoverflow.com/comment/41116674
type: Question
tagged with: jquery-deferred
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26217643
tagged with: promise
upvote count: 2
has body: Let's say I have some JS that makes an AJAX call like this: $.getJSON(myUrl, { targetState: state }, function (jsonData) { }).success(function (jsonData) { ... ... ... }); Now let's assume I want to wrap this code in a function and have it return some value, in the success block, so I can call it from various places in my app. Should the function I create return a Promise? I'm thinking it probably does, but I've never created a JS function that returned a Promise so I'm not entirely certain when I need to do this.
linked to: http://stackoverflow.com/q/25751723
has title: Does this JavaScript function need to return a Promise?
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26217643

http://stackoverflow.com/comment/41301696
type: Comment
score: 3
type: QuestionComment
comment on: http://stackoverflow.com/q/26318036
has text: your array is wrong declared.

http://stackoverflow.com/comment/41242706
type: Comment
comment on: http://stackoverflow.com/a/26285079
score: 1
has text: While this snippet might fix the issue, it would be nice to describe your approach so that future readers, having a different but similar issue, benefit from it.
type: AnswerComment

http://stackoverflow.com/q/26286360
possible better answer: http://stackoverflow.com/a/26286589
accepted answer: http://stackoverflow.com/a/26286522
has answer: http://stackoverflow.com/a/26286589
tagged with: javascript
has comment: http://stackoverflow.com/comment/41244402
has comment: http://stackoverflow.com/comment/41244387
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/25762297
has title: Onclick method using JavaScript error
has body: I found an onclick example here. I did everything given on the page and I don't know what's wrong/going on. I did what's given there and when I create a new page, it's not working. What's going wrong? JSFiddle HTML &lt;div id="leftmenu"&gt; &lt;ul id="leftmenuidfrmslt" style="vertical-align: middle;"&gt; &lt;a href="" onclick="mob();"&gt;&lt;li&gt;&lt;span class="flaticon-smart"&gt; &lt;/ul&gt; &lt;/div&gt; JavaScript function mob() { hidemenus(); document.getElementById('mobi').style.display = "block"; } function hidemenus() { document.getElementById('mobi').style.display = "none"; } Onclick display menu &lt;div id="mobi" style="display:none;z-index:99;" class="answer_list" &gt; &lt;p class="flaticon-right127"&gt;&lt;a href="#"&gt;Mobile&amp;nbsp;Phones&lt;/a&gt; &lt;p class="flaticon-right127"&gt;&lt;a href="#"&gt;Tablets&lt;/a&gt;&lt;/p&gt; &lt;p class="flaticon-right127"&gt;&lt;a href="#"&gt;Mobile&amp;nbsp;Accessories&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26286522
tagged with: css
has answer: http://stackoverflow.com/a/26286628
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41244278
type: Question

http://stackoverflow.com/comment/41241058
type: AnswerComment
score: 0
type: Comment
has text: @turkey3 , can you show me code for `setInterval`? If so, then that will be more helpful.
comment on: http://stackoverflow.com/a/26284033

http://stackoverflow.com/a/26304915
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41278008
answers question: http://stackoverflow.com/q/26304887
has comment: http://stackoverflow.com/comment/41278247
type: Answer
has comment: http://stackoverflow.com/comment/41278679
score: 2
has body: You should be able to do this in the conole or in javascript on the page: $("*").html().match(/abc/gi).length This will get you just text nodes on the page*: var count = 0; $("body").contents().filter(function () { return this.nodeType == 3 }).each(function () { var match = this.wholeText.match(/abc/gi); if (match) count += match.length; }); Only issue I see is that javascript code between tags, appears as a text node, so this also searches through the javascript if your script tags are contained within your tag.

http://stackoverflow.com/q/26333982
has answer: http://stackoverflow.com/a/26335008
type: Question
answer count: 2
tagged with: javascript
has title: bootstrap-datetimepicker hours and minutes not defaulted to 00:00
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26335085
has body: how to set default time hours and minutes as 00:00 but if i pick hours and minutes picked value should come. My issue is current time is coming by default and current date is highlighting. i am using bootstrap date time picker By using option i am changing like this but not working. if i change format like dd/mm/yyyy 00:00 all the time it is showing 00:00 even if i pick hours and minutes. pls help me to solve this issue My code is $(document).ready(function(){ $('#datetimepicker1').datetimepicker({ $('#datetimepicker1').datetimepicker("setHours",'00' ); }); $('#datetimepicker2').datetimepicker({ $('#datetimepicker2').datetimepicker("setMinutes",'00' ); });

http://stackoverflow.com/a/26249922
type: AcceptedAnswer
has body: Wrapping up the file writing operations with setTimeout does not prevent the main thread from getting blocked, where did you get that? It just delays the execution of the wrapped function, which in your case doesn't help you at all. Nevertheless, I don't even think this is your real problem, because the file plugin's write operation is already wrapped up for execution in a background thread, which tells you the linked line from the iOS plugin source code. My guess is there is some other stuff happening, that blocks your UI thread. Which functions from the plugin are you calling exactly? Try to debug/profile the whole process, when the UI lag occurrs, for example in Safari Remote Debugger. If that doesn't help you, you should post more specific code which could give some hints about what is happening and what the problem could be.
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26233012
has comment: http://stackoverflow.com/comment/41184156
answers question: http://stackoverflow.com/q/26233012

http://stackoverflow.com/a/26310225
score: 10
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26309999
has body: Given that Underscore is exported as a function, it's correct to say that performing a type check is the most concise way of checking if Underscore is available in memory. If I get it right - for some weird reason, I gotta say -, you want to implement a feature checking so contexts that doesn't have specific method implementations will gracefully degrade. You could simply check for Underscore and for the feature you want. Since each feature is a property of Underscore you can check if it's defined or not through type checking as well: if(typeof _ === 'function') { if(typeof _.reduce !== 'undefined') { // fallback goes here } } Just keep in mind that depending on the feature you're trying to fallback you might lose Underscore's chaining capabilities. I would double check that.
answers question: http://stackoverflow.com/q/26309999
upvote count: 10
has comment: http://stackoverflow.com/comment/41287997
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41343518
comment on: http://stackoverflow.com/q/26340619
score: 0
has text: @Pointy I'm pretty sure that's how it works with function blocks, but not variable declarations.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26257322
score: 0
has title: Bootstrap3 : popover does not appear initially when initiated by click event of a class
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/26257428
has answer: http://stackoverflow.com/a/26257428
accepted answer: http://stackoverflow.com/a/26257461
answer count: 4
has answer: http://stackoverflow.com/a/26257535
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
type: Question
has body: I have been trying to show a popover when any element of a common class is clicked on the body. The problem is that, the popover does not appear initially at the first click, but it appears and behaves normally from the next click events. Here is my code: HTML: Popover on top JavaScript: $('body').on('click', '.pop', function(e){ $(this).popover();//.popover('show'); }); It is also available in JSFiddle. I can not figure out what is wrong here? Any suggestions?
has answer: http://stackoverflow.com/a/26270435
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26257461

http://stackoverflow.com/comment/41171984
comment on: http://stackoverflow.com/a/26226792
type: AnswerComment
score: 0
type: Comment
has text: Given: "Even though the sprites are all evenly spaced along the x axis, you are not all equidistant from each other", I think this kind of solution is exactly what is called for.

http://stackoverflow.com/comment/129706208
type: Comment
has text: putting the parameters directly in the url solved my problem, thanks
score: 1
comment on: http://stackoverflow.com/a/62830403
type: AnswerComment

http://stackoverflow.com/a/26289045
score: 0
type: AcceptedAnswer
has body: I found the answer to the question. The important thing is not to display the image in an infoWindow. Instead, just display a div that covers the map and is not embedded in the map. Have a look at http://vispo.com/geogenie/dev/pt4.html . Click a thumbnail image. It displays large as can be. Then click it to close the image. Trying to do it by displaying the image in an infoWindow is very painful because you don't have full control over infoWindow positioning and sizing.
type: Answer
accepted answer of: http://stackoverflow.com/q/26242866
answers question: http://stackoverflow.com/q/26242866

http://stackoverflow.com/comment/41289032
type: Comment
has text: the question is **why** you need it to be synchronous? plus if the promise is already resolve, `then()` gets called right away.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26310877

http://stackoverflow.com/q/26325036
tagged with: javascript
score: 0
has title: How to get length of a txt file with javascript
has body: I'm using the ActiveX functions with files such as writing about them for example. I need to know if it was possible to get the length in lines of the file read. I use to control when it is finished flow.AtEndOfStream, but now I need to get the length of lines in a file, you can do this?
accepted answer: http://stackoverflow.com/a/26325313
type: AnsweredQuestion
tagged with: activex
type: Question
has answer: http://stackoverflow.com/a/26325313
answer count: 1

http://stackoverflow.com/comment/41194732
comment on: http://stackoverflow.com/a/26245437
has text: I'm guessing it's the content of the element that's having trouble. Could there be some element within the element you are adding that canvas doesn't understand? Or I've noticed it also will fail if there is no content.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/31841829
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26238516
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26238516
has body: I eventually sorted it out. Here's an approximation of the code: function openMypageInMysite(tab) { var urlNavigatingTo = tab.url, matchMysiteUrl = urlNavigatingTo.match(/^https?:\/\/(.*).mysite.com\/?(.*)$/); if (matchMysiteUrl) { var pattern = '*://' + matchMysiteUrl[1] + '.mysite.com/*'; chrome.tabs.query({ url: pattern }, function(openTabs) { var route = '/' + matchMysiteUrl[2]; Mytab = (openTabs[0].id !== tab.id) ? openTabs[0].id : openTabs[1].id; chrome.tabs.sendMessage(Mytab, { route: route }); chrome.tabs.update(Mytab, { active: true }); chrome.tabs.remove(tab.id); }); } } chrome.webNavigation.onBeforeNavigate.addListener( function (details) { openMypageInMysite({id: details.tabId, url: details.url}); }, {url: [{hostSuffix: 'mysite.com'}]} );

http://stackoverflow.com/comment/41109252
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26212323
has text: @Zibadian No, I know this is a possible case. but that's not what I want. When I specify the port to one jvm, it gets locked to that jvm, whereas when I try to get jolokia started for another JVM it gives bind Exception. That is why I want to keep the port dynamic.

http://stackoverflow.com/comment/41346907
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26342314
has text: function theStatus(type, msg){ $("#status").empty(); $("#status").append( ""+ msg +"" ); }

http://stackoverflow.com/comment/41085617
type: Comment
comment on: http://stackoverflow.com/q/26200750
score: 0
has text: i have seen over 60-70 tables like this. but it looks nothing like what i am looking for if you see the image link i showed
type: QuestionComment

http://stackoverflow.com/comment/41228795
score: 0
comment on: http://stackoverflow.com/q/26278110
has text: http://jsfiddle.net/3ec67gne/ The up and down arrowns are not showing up on the fiddle, but this is the exact same code I'm using.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41409794
type: AnswerComment
comment on: http://stackoverflow.com/a/26300968
score: 0
type: Comment
has text: Thanks Dave, I found my problem. I modified my applyChanges() method to applyChanges().then(...) and passed it an error function - the error function got called in the end because I am trying to store an integer into the database field expecting a string. Thanks for the help!

http://stackoverflow.com/comment/41227007
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26276566
has text: Well, the read-only requirement wasn't in scope. Was looking for a easy workaround if possible without creating separate view. Thanks anyway.
score: 0

http://stackoverflow.com/comment/41263723
score: 1
type: Comment
has text: That's hard to say without seeing the code where the sidebar and the "item being clicked" interact. Now, maybe your "inner" components can call a simple "onClicked" callback, and a component that is a parent of both those inner components and the sidebar will handle interaction. But yes, in general, if you want to communicate with a 'parent' component, either you'll have to use callbacks (or channels, or something to communicate...), or use a "global" event bus if that's the simplest (https://facebook.github.io/react/tips/communicate-between-components.html)
type: AnswerComment
comment on: http://stackoverflow.com/a/26282030

http://stackoverflow.com/comment/41176010
score: 0
type: Comment
type: QuestionComment
has text: Can you post an example of rendered html... perhaps on codepen.io or jsfiddle.net? Because in my test, I'm not seeing the same behavior you are: http://jsfiddle.net/gxeezdc4/1/
comment on: http://stackoverflow.com/q/26248688

http://stackoverflow.com/a/26353166
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26353079
answers question: http://stackoverflow.com/q/26353079
upvote count: 2
type: Answer
score: 2
has body: Pretty straightforward: cachedPromise[reqKey] = $http.get(apiUrl)...; return cachedPromise[reqKey];
type: AcceptedAnswer

http://stackoverflow.com/comment/41251485
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26290146
type: Comment
has text: chrome and FF. latest versions

http://stackoverflow.com/a/26241153
answers question: http://stackoverflow.com/q/26241037
type: Answer
score: 2
upvote count: 2
has body: Providers are only available when instantiating an Angular module. You can only use providers for a module before it is instantiated inside a config block. So you can configure $locationProvider once per module and not at the controller level.
downvote count: 0

http://stackoverflow.com/comment/41969089
type: AnswerComment
has text: Cool that you check the behavior on python's API! If that the case then, problem solved! :D
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26664694

http://stackoverflow.com/a/26310975
answers question: http://stackoverflow.com/q/26310932
type: Answer
accepted answer of: http://stackoverflow.com/q/26310932
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Put the total in a variable and test it before putting it into the DOM: $(function () { $("#quantity, #price").keyup(function () { var q = parseFloat($("#quantity").val()); // Quantity var p = parseFloat($("#price").val()); // Price if (isNaN(q) || isNaN(p) || q&lt;=0 || p &lt;= 0) { $("#charge").val(''); return false; } var total = q * p * 0.0025; if (total &lt; 50) { total = 50; } $("#charge").val(total.toFixed(3)); // Charge }); }); Another way is to use Math.max(): $("#charge").val(Math.max(50, q * p * 0.0025).toFixed(3)); // Charge

http://stackoverflow.com/comment/41246024
comment on: http://stackoverflow.com/a/26286523
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62780/discussion-between-chris-and-troy-gizzi).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41223848
has text: @rexilion this is what i meant in my 2nd statement
type: Comment
comment on: http://stackoverflow.com/a/26274773
score: 0
type: AnswerComment

http://stackoverflow.com/a/26200679
type: Answer
answers question: http://stackoverflow.com/q/26196947
has body: The answer is no. Why? Because you've been too late to the party When was the "Party"? The "Party" ended with the arrival of IE 10. They stopped using the "htc" hack. Any other "Party" existing? Yeah, there's the Firefox's XBL (XML Binding Language), but again, it'll just be for firefox. You more or less can't do anything here.
score: 0

http://stackoverflow.com/q/26315184
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26456962
answer count: 1
has comment: http://stackoverflow.com/comment/41314506
tagged with: three.js
has answer: http://stackoverflow.com/a/26456962
type: AnsweredQuestion
has body: I need to get an intersection using raycaster only with vertices of a geometry and not with all the geometry shape. I wrote this code but nothing happen if I click on vertice setted. function onDocumentMouseClick(event) { event.preventDefault(); mouse2D.x = (event.clientX / window.innerWidth) * 2 - 1; mouse2D.y = -(event.clientY / window.innerHeight) * 2 + 1; raycaster = projector.pickingRay(mouse2D.clone(), camera); var intersects = raycaster.intersectObjects(objects[0].geometry.vertices[0]);// I want intersection only with vertices if (intersects.length &gt; 0) { console.log("ok");}
score: 0
has comment: http://stackoverflow.com/comment/41308904
type: Question
has title: Three.js raycaster to intersect only specified part of shape

http://stackoverflow.com/comment/41170391
has text: Why don't you use a form/button?
comment on: http://stackoverflow.com/q/26245937
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26322529
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: audio
type: UnansweredQuestion
type: Question
tagged with: javascript
has title: Enabling just one audio stream on a webpage
score: 0
has body: I'm in the early stages of setting up a band site where there are a number of sample audio streams. Each stream is triggered or stopped by separate "Play" and "Pause" buttons. There are also a number of videos on the page which have their own controls. I used the following code for setting up the audio samples: $("#play0").click(function() { $("#audio0").trigger('play'); }); $("#pause0").click(function() { $("#audio0").trigger('pause'); }); The "audio0" ID is for each audio stream (up to "audio9") while "play0" and "pause0" IDs (also up to "play/pause9") are for buttons. How can I make sure that at any one time, only one audio file should be playing (irrespective of whether it is audio or video). In other words, a user cannot trigger more than one audio stream to play simultaneously. Thank you.
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26322682

http://stackoverflow.com/q/26239205
score: 7
has comment: http://stackoverflow.com/comment/41158742
has comment: http://stackoverflow.com/comment/41158912
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/41158805
type: Question
has comment: http://stackoverflow.com/comment/41158650
tagged with: javascript
has comment: http://stackoverflow.com/comment/41159169
has answer: http://stackoverflow.com/a/26239884
tagged with: memory-leaks
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41158893
has comment: http://stackoverflow.com/comment/41159230
favorite count: 0
has body: The problem Adding nodes, while removing the old ones from the DOM, doesn't discard the old nodes from memory. (not all of them at least, without apparent reason). How to see this happening (you already know this but anyway..) right click the output area and inspect using Chrome developer tools. Click on the Timeline tab and then at the circle (dot) on the upper left side to start recording. now click on the body element, and it will start adding and removing items every 300ms (the removed nodes should be garbage collected). Stop the recording, extend the data-sampling zone to maximum, and you will see on the bottom half of the screen, in green, the nodes. the expected graph would be going up and down (where down means nodes have been discarded properly by the GC). Test pages These 2 test pages are very primitive. of course in real life developers use templates which generates huge amount of text which should be converted into DOM and injected into the page, therefor the number of live DOM nodes in memory should be kept low, and removed ones must be discarded. with jQuery - http://jsbin.com/lamigucuqogi/2/edit - After about 40 seconds the GC is getting crazy and stops collecting removed nodes, which causes inflation. Naive way - http://jsbin.com/riref/2/edit - Also it seems nodes aren't being removed in a satisfying rate, and the number keeps growing and growing... Question Why is this happening, and how should one properly remove NODES so inflation won't occur?
has title: Removing DOM nodes with proper GC (no leaks)
accepted answer: http://stackoverflow.com/a/26239884
tagged with: garbage-collection
upvote count: 7
has comment: http://stackoverflow.com/comment/41159129
type: AnsweredQuestion

http://stackoverflow.com/comment/41130480
type: AnswerComment
score: 0
type: Comment
has text: @thatsimplekid -- Yep - you'll probably see something like `$("#myID")[0]` eventually - this is the same as `document.getElementById("myID")`
comment on: http://stackoverflow.com/a/26224448

http://stackoverflow.com/comment/41161760
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26227728
has text: It's a bit confusing at first. square is a function, so it is executed. It's not 'called on' anything. Method invocation, whether via the normal obj.square() syntax or square.call(obj); syntax is essentially simply setting 'this' inside the function to the obj provided and then executing the function. When the obj provided is undefined, 'this' is either unset (in strict mode) or more commonly set to the global object. In your case, this is never used, so it doesn't matter that it is unset. Bugs often occur if this _is_ used and the obj is null, as it winds up modifying the global object.
type: AnswerComment

http://stackoverflow.com/a/26288047
has body: You can add following to express config: app.use(bodyParser.urlencoded({limit: '50mb'})); app.use(bodyParser.json({limit: '50mb'})); Basically you need to configure Express webserver to accept bigger request size. Replace 50mb with whatever maxsize you want to accept. Hope this helps!!!
has comment: http://stackoverflow.com/comment/57958000
has comment: http://stackoverflow.com/comment/58490941
has comment: http://stackoverflow.com/comment/42811168
type: Answer
upvote count: 32
has comment: http://stackoverflow.com/comment/57959615
has comment: http://stackoverflow.com/comment/68256671
answers question: http://stackoverflow.com/q/26287968
has comment: http://stackoverflow.com/comment/58571383
score: 32
accepted answer of: http://stackoverflow.com/q/26287968
has comment: http://stackoverflow.com/comment/41248115
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41182073
type: AnswerComment
has text: Oh my god I could not think how to do it. Thank you :)
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26252669

http://stackoverflow.com/comment/41274660
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26303060
has text: I think when you posted the first _version_ of the answer there was a `Model` with _pickles_ in its name. Nevermind. :)

http://stackoverflow.com/comment/41076369
comment on: http://stackoverflow.com/a/26195207
has text: no problem, please follow the link I've provided. It will help you better understand the event loop mechanism, which is one of the fundamental concepts that need to be grasped when working with JS. Sadly, most people don't bother to learn the language and they eventually end up with code that is very confusing to look at.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41362656
has text: Why are you using `var SomeCollections = ` in the beginning of the JSON? This is not Javascript!
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26350331

http://stackoverflow.com/q/26301703
has comment: http://stackoverflow.com/comment/41273860
has comment: http://stackoverflow.com/comment/41273826
has comment: http://stackoverflow.com/comment/41272185
type: Question
tagged with: object
has body: In the past I saw a developer trying to debug a cool effect, which was an element displaying outside a browser window, quite like image 02 below. 01. Normal: 02. Not normal but cool: Is it possible to do this with JavaScript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41273079
score: 0
tagged with: element
has comment: http://stackoverflow.com/comment/41274457
has comment: http://stackoverflow.com/comment/41273693
has comment: http://stackoverflow.com/comment/41273654
tagged with: window
has comment: http://stackoverflow.com/comment/41272924
tagged with: position
answer count: 0
has title: Element outside a browser window
has comment: http://stackoverflow.com/comment/41272165
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41274523
has comment: http://stackoverflow.com/comment/41272839
has comment: http://stackoverflow.com/comment/41273038

http://stackoverflow.com/comment/41240000
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26283869
has text: For further questions, if it's something web related, create a [jsfiddle](http://jsfiddle.net/). And maintain some code quality, your current `.animate` line is 223 characters long, which is way to much. A simple rule: if it doesn't fit in code block (meaning horizontal scrollbar appears) it's probably too long. There are *rare* exceptions.
type: Comment

http://stackoverflow.com/comment/41251279
has text: I just added a brief explanation. :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26290172
type: Comment

http://stackoverflow.com/comment/41119871
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26219212
has text: Runs here: http://jsfiddle.net/3amL7svb/ - are you including the js?
type: Comment

http://stackoverflow.com/comment/41297468
has text: Make a [jsFiddle](http://jsfiddle.net).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26315784
type: QuestionComment

http://stackoverflow.com/comment/41291275
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26312232
score: 0
has text: So do they enter JSON, or do they enter the Javascript?

http://stackoverflow.com/a/26241666
score: 1
accepted answer of: http://stackoverflow.com/q/26241508
answers question: http://stackoverflow.com/q/26241508
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Your question is very hard to understand but I may have a solution for you. Since you have an array called images you will need to loop through that once more. {{image.name}}

http://stackoverflow.com/q/26245955
type: AnsweredQuestion
type: Question
tagged with: encoding
tagged with: javascript
has answer: http://stackoverflow.com/a/26246034
tagged with: xss
score: 0
answer count: 2
has body: I noticed some behavior that I'm having a hard time understanding. Consider the following code snippet: &lt;input type="button" value="test" onclick="window.location.href = &amp;quot;foo;bar;&amp;quot;"&gt; When I click the test button it redirects the page to http://www.example.com/foo;bar;. So everything between the &amp;quot; characters is being treated as a string literal, as if the &amp;quot; were real quote characters. My expectation would be that since the &amp;quot; characters are encoded they wouldn't be able to influence the code execution, so I'd expect the semicolon between foo and bar to terminate the assignment to window.location.href and for javascript to see bar as a separate statement. Just to further confirm that that's what's happening, if I delete the first &amp;quot; and click the button I get the following error in the console: SyntaxError: unterminated string literal window.location.href = foo;bar;" (with an arrow indicating the trailing ", which is really a &amp;quot;, is the issue.) What am I missing? Is the encoded character being decoded by the javascript engine before executing it? What if this involes user input, and the application tries encoding quote characters as &amp;quot; to prevent cross-site scripting, will an attacker still be able to break out because his &amp;quot; will still be honored as a real quote?
possible better answer: http://stackoverflow.com/a/26245985
has title: Encoded &quot; treated as a real double quote in Javascript onclick event - why?
has answer: http://stackoverflow.com/a/26245985
accepted answer: http://stackoverflow.com/a/26246034

http://stackoverflow.com/a/26238901
score: 1
upvote count: 1
type: Answer
has body: You start off with the list of rows with class calendarRow, then you drill into each row, and get the list of days in that row, and then the list of events for each day: $(function() { // Get all the rows var calendarRows = $("tr.calendar_row"); // Drill down to each row calendarRows.each( function(rowIndex, selectedRow) { // Print out the row ID console.log("Row ID = "+selectedRow.attr("id")); var calendarDays = selectedRow.find("td.eventList"); // Drill down to each day calendarDays.each( function(dayIndex, selectedDay) { // Print out the day ID console.log("Day ID = "+selectedDay.attr("id")); var events = selectedDay.find("div.eventStyle"); // Drill down to each event events.each( function(eventIndex, selectedEvent) { // Print out the event details console.log("Event number "+eventIndex+" has ID="+selectedEvent.attr("id")+" and text="+selectedEvent.text()); }); }); }); }); Note you don't have to iterate through all the rows or all the days to get event details. You can just do this: $(function() { var events = $("div.eventStyle"); // Drill down to each event events.each( function(eventIndex, selectedEvent) { // Print out the event details console.log("Event number "+eventIndex+" has ID="+selectedEvent.attr("id")+" and text="+selectedEvent.text()+" and has parent with ID="+selectedEvent.parent().attr("id")); }); });
answers question: http://stackoverflow.com/q/26237304
downvote count: 0

http://stackoverflow.com/q/26325937
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26326169
favorite count: 0
has body: Can you help me with this? Since I'm newbie on using javascript, I've copied the code from a certain site(It's free to copy the code. And I admire the coder.). This assignment will be due tomorrow so I don't have the time to research on this. Can you please help me. Btw, This is my first time to post. Please be gentle on answering. Thank you in advance. This is the HTML Sample A really simple slideshow I went to see Gravity today. It was amazeballs. This is the CSS body { font: 1em/125% tahoma, sans-serif; background:#111; color:#c8c8c8; } #container { width:600px; padding:20px; margin:0 auto; } h1 { font-size:2em; padding-bottom:.5em; border-bottom:1px solid #cecece; } h1, p { margin: .8em 0; } a { text-decoration:none; font-style:italic; color:#cecece; transition:all .5s; } a:hover { color:#eeeeee; } .slider { position:relative; height:337px; overflow:hidden; } .slider li { display:none; position:absolute; top:0; left:0; } This is the javascript $(function(){ var $slider = $('.slider'); var $slide = 'li'; var $delayTime = 1000;//fade in time var $transitionTime = 3000; function Slides() { return $slider.find($slide); } Slides().fadeOut(); Slides().first().addClass('active').fadeIn(); //Auto scroll $interval = setInterval(function(){ var $i = $slider.find($slide + '.active').index(); Slides().eq($i) .removeClass('active') .fadeOut($transitionTime); if(Slides().length == $i + 1) { $i=-1; } Slides().eq($i + 1) .fadeIn($transitionTime) .addClass('active'); }, $transitionTime + $delayTime); });
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41316285
has comment: http://stackoverflow.com/comment/41316365
answer count: 2
accepted answer: http://stackoverflow.com/a/26326169
upvote count: 1
has title: Image isn't showing
has comment: http://stackoverflow.com/comment/41316162
possible better answer: http://stackoverflow.com/a/26326342
tagged with: javascript
has answer: http://stackoverflow.com/a/26326342

http://stackoverflow.com/q/26346986
has answer: http://stackoverflow.com/a/26347847
tagged with: bower
has title: Force-latest with Bower programmatic API
type: AnsweredQuestion
score: 2
type: Question
has body: I'm using the Bower programmatic API to install a list of libraries at once, and some of them have dependency version conflicts. I would like to use the 'force-latest' flag to default to the latest version, but I can't figure out how to make it work with the programmatic API. The bower documentation shows this example: var bower = require('bower'); bower.commands .install(['jquery'], { save: true }, { /* custom config */ }) .on('end', function (installed) { console.log(installed); }); I hoped I could change {save: true} to {save: true, 'force-latest': true} but it didn't seem to have any effect. I can handle prompts by adding interactive: true to the config and listening for prompt events, but I would like to make it more automated. Does anyone know how to do this or know where there is more documentation on the programmatic API? Bower just directs you to the source code for more information. I've looked at it a bit, but I'm not really making sense of it. I'll look further if no one else knows. Thanks!
downvote count: 0
accepted answer: http://stackoverflow.com/a/26347847
tagged with: javascript
answer count: 1
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/41212769
has text: Alfredo: yes - just one product on a product page
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26269172

http://stackoverflow.com/comment/41201950
has text: Yea, I changed the id's but when I click on one of the up arrows. It changes the text of only one of the copies.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26263030

http://stackoverflow.com/comment/63838447
comment on: http://stackoverflow.com/a/26320410
type: Comment
has text: You need to include the lodash lib
score: 5
type: AnswerComment

http://stackoverflow.com/q/26251110
has comment: http://stackoverflow.com/comment/41179448
score: 0
has title: how to limit autocomplete results (without map) to a city
answer count: 1
has comment: http://stackoverflow.com/comment/41180983
has answer: http://stackoverflow.com/a/26251315
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41180967
has comment: http://stackoverflow.com/comment/41180541
has comment: http://stackoverflow.com/comment/41180336
has comment: http://stackoverflow.com/comment/41182066
linked to: http://stackoverflow.com/q/8282026
type: Question
tagged with: javascript
tagged with: jquery
has body: Below is the code which gives autocompletion with Lat/long. I want the results to be specific to a city. I mean, the search for autocompletion should be restricted to a city. Help me.. as soon as possible Lat Long

http://stackoverflow.com/q/26314119
has comment: http://stackoverflow.com/comment/41294393
favorite count: 0
has comment: http://stackoverflow.com/comment/41294354
has body: I have this script: (Dynamically creating elements) echo ' ' . "\n"; // Previous Post Link. if ( get_previous_posts_link() ) { printf( ' %s ' . "\n", get_previous_posts_link('Prev') ); } // Link to first page, plus ellipses if necessary. if ( ! in_array( 1, $links ) ) { $class = 1 == $paged ? ' class="active"' : ''; printf( '<li%s>%s ' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' ); if ( ! in_array( 2, $links ) ) { echo ' '; } } // Link to current page, plus 2 pages in either direction if necessary. sort( $links ); foreach ( (array) $links as $link ) { $class = $paged == $link ? ' class="active"' : ''; printf( '<li%s>%s ' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link ); } // Link to last page, plus ellipses if necessary. if ( ! in_array( $max, $links ) ) { if ( ! in_array( $max - 1, $links ) ) { echo ' ' . "\n"; } $class = $paged == $max ? ' class="active"' : ''; printf( '<li%s>%s ' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max ); } // Next Post Link. if ( get_next_posts_link() ) { printf( ' %s ' . "\n", get_next_posts_link('Next') ); } echo ' ' . "\n"; I want to disable the elements when click on the until the function does its job. this is the click event i have: jQuery('.pagination > ul > li > a').live('click', function(e) { // disable elements. jQuery('.postMain').load(link + ' .postMain', function() { // enable elements. }); }); I used attr("disabled", "disabled") but it didn't worked. What should i do to disable all the elements until the link loads. Any help would be appreciated.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26314442
has comment: http://stackoverflow.com/comment/41294708
downvote count: 1
has title: Disable Dynamically created element on click - jquery
has comment: http://stackoverflow.com/comment/41294559
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12116505
has comment: http://stackoverflow.com/comment/41294447
has comment: http://stackoverflow.com/comment/41294459
accepted answer: http://stackoverflow.com/a/26314442
score: -1
has comment: http://stackoverflow.com/comment/41294606
has comment: http://stackoverflow.com/comment/41294504
type: Question
has comment: http://stackoverflow.com/comment/41294368
has comment: http://stackoverflow.com/comment/41294399
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26318068
tagged with: openshift
type: AnsweredQuestion
score: 3
tagged with: twitter
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I am looking to work with the twitter stream api in javascript and have a script that run successfully pulling from the streaming API. My question is what would be the best way for me to set this up so it can run constantly. Or would it be better to switch to the search API instead? I am just trying to collect tweets based on a few keywords, but I want to collect a load of them and store them into Mongolab. Would a Cron job be best for this? I am going to use openshift to handle the streaming and processing. I think I am looking for guidance on the best route so I don't have to constantly monitor and check that it is collecting tweets. Thank you! var Twit = require('twit'); var MongoClient = require('mongodb').MongoClient; var T = new Twit({ consumer_key: '***', consumer_secret: '***', access_token: '***', access_token_secret: '***' }); var url = "***"; MongoClient.connect(url, function (err, db) { var col= db.collection('test'); // filter public stream on keywords var stream = T.stream('statuses/filter', {track: ['#food', 'drinks'] }); stream.on('tweet', function (data) { console.log("tweet: " + data); col.insert(data, function (err, result) { if (!err) { console.log("insert successful on tweet: " + data.id); } else { console.log(err); } }); }); });
favorite count: 0
upvote count: 3
has answer: http://stackoverflow.com/a/26429199
accepted answer: http://stackoverflow.com/a/26429199
tagged with: cron
has title: Twitter Stream API run in background on OpenShift
tagged with: node.js

http://stackoverflow.com/q/26240520
type: Question
has title: Field with multiple lines?
tagged with: javascript
score: -1
tagged with: forms
upvote count: 0
answer count: 1
favorite count: 0
has body: Is there a way to get a field with multipile lines without using the tags? http://croakedslayouts.hol.es/purchase.html I would like the size of the field to be the size the image is atm, and I dont like the tag because the user can change the size of it with the thing in the bottom right corner. I'd also like to be able to customize it with a script like I have the name and email fields. Thanks!
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26240577
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26240577
downvote count: 1

http://stackoverflow.com/comment/41086614
comment on: http://stackoverflow.com/a/26201366
has text: This works great! I guess I was missing the delay, but how can I have it done so that the text above and below it doesn't flicker as it jumps up and down?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41859386
type: QuestionComment
comment on: http://stackoverflow.com/q/26311655
score: 0
type: Comment
has text: Did any of these answers work for you? If so, please accept.

http://stackoverflow.com/comment/47041633
has text: Plus it should be `popup: true`, not `popup: 'true'`
type: QuestionComment
comment on: http://stackoverflow.com/q/26301453
type: Comment
score: 0

http://stackoverflow.com/q/26348053
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26348350
has body: I have built a great set of bootstrap icons that act like radio buttons. I need to do the same thing bug with checkbox behavior allowing multiple options to be selected and stored. I can't seem to wrap my head around how to do it. HTML AUTOMATIC TASKS {{optionText}} Controller angular.module('app').controller('mvQueueListCtrl', function($scope, mvQueue) { ........ ........ $scope.selectType = function(opt){ $scope.type.selected = opt }, $scope.type = { options: ['Fax', 'Physical', 'Digital'], //selected: 'None' selected: 'Fax' }, .......... .......... .......... } );
type: AnsweredQuestion
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26348350
tagged with: javascript
tagged with: angularjs-scope
has title: Creating Checkbox functionality using Bootstrap Glyphicons
downvote count: 0
answer count: 1
score: 1

http://stackoverflow.com/comment/41217340
has text: I was hasty. The DOM delivers some tagName twice and disordered. I can't use it. I'll try better with RegEx. Here are my approaches:`sTagName = sTagName.replace(/(<.*?>)(.*?)</mg, '$1' );` or here: `sTagName = sTagName.replace(/<\s*(\w+)[^/>]*>.*?</g, '$1' );` I couldn't find from very above link a solution for me :(
comment on: http://stackoverflow.com/a/26261439
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41296169
comment on: http://stackoverflow.com/a/26314975
has text: Yup , can I add it to my answer
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26228630
has body: $(function(){ var count = 1 $(document).click(function(){ if(count&lt;=2){ count+=1; } else{ alert("already clicked two times"); } }); }) this will start showing the alert after the 2nd click. You can write the code to load the javascript instead of this alert.
has comment: http://stackoverflow.com/comment/41140388
has comment: http://stackoverflow.com/comment/41140324
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41140675
answers question: http://stackoverflow.com/q/26228568
accepted answer of: http://stackoverflow.com/q/26228568
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41140362

http://stackoverflow.com/q/26238869
answer count: 2
possible better answer: http://stackoverflow.com/a/26239720
downvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
linked to: http://stackoverflow.com/q/13020821
score: 1
accepted answer: http://stackoverflow.com/a/26266297
has body: I've just started using angularjs and I'm trying to connect a wordpress back-end to an Angularjs front end. this is my index.html AngularJS GET request with PHP {{currentPage}} di {{totalItems}} {{watchPage}} post_content {{post.title}} and this is my script.js with angular code (I know it's all in one file and it's bad) var req = new XMLHttpRequest(); var URL = "/wp-json/posts"; req.open('GET', URL, false); req.send(null); var maxpagine = req.getResponseHeader("X-WP-TotalPages"); var totarticoli = req.getResponseHeader("X-WP-Total"); var currentPage = ''; var newPage = ''; var app = angular.module('applicazioneIndex', ['ui.bootstrap','ngSanitize','ngResource']); app.controller('ApplicazioneController', function ($scope, applicazioneFactory) { applicazioneFactory.get({ id: 1 }, function(data) { $scope.posts = data; alert(posts); }); $scope.articoli = applicazioneFactory.query(); $scope.itemsPerPage = 3; $scope.currentPage = 1; $scope.totalItems = totarticoli; $scope.articoli.$promise.then(function () { $scope.$watch('currentPage + itemsPerPage', function() { var begin = (($scope.currentPage - 1) * $scope.itemsPerPage), end = begin + $scope.itemsPerPage; $scope.filteredArticoli = $scope.articoli.slice(begin, end); }); }); $scope.$watch('currentPage', function(newPage){ $scope.watchPage = newPage; alert(newPage); }); }); app.factory('applicazioneFactory', function ($resource) { return $resource( "/wp-json/posts?page=" + currentPage); }); Pagination is working perfectly, I get the values from a XMLHttpRequest, the bootstrap menu is populated, but I can't populate content with different JSON. My goal is to load different JSON files using $currentPage value, changing while bootstrap pagination is working (for that purpose there is an alert to pop up currentPage value). using $scope.$watch('currentPage', function(newPage) I can get currentPage value inside the controller I've also a Plunker here http://plnkr.co/edit/hplfuBIOLDHUgUp6lU0A where I've put a static JSON file i…
favorite count: 0
tagged with: angularjs
tagged with: wordpress
upvote count: 1
has title: using angularjs and json wordpress api can't access currentPage value in app.factory $resource
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26239720
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26266297

http://stackoverflow.com/q/26202496
tagged with: oop
has body: Say I have a javascript class Library1.B which inherits methodA from a super class in the same library. Suppose I want to clone Library1 into Library2 in order to make my own version of it, and improve it by slightly overriding Library1.B's inherited methodA. Naively, I set out doing this: /* Library 1 */ var Library1 = {}; Library1.A = function() { console.log("A's constructor called"); }; Library1.A.prototype.methodA = function() { console.log("methodA called with arguments", arguments); //heavy computation }; Library1.B = function() { Library1.A.call(this); //Set a few other properties exclusive to B }; Library1.B.prototype = Object.create(Library1.A.prototype); /* Library 2 */ var Library2 = Library1; Library2.B.prototype.methodA = function() { console.log("Before invoking methodA()"); Library1.B.methodA.apply(this, arguments); console.log("After invoking methodA()"); }; var o1 = new Library1.B(); o1.methodA(1, 2, 3); var o2 = new Library2.B(); o2.methodA(4, 5, 6); (JSFiddle here) Expected log for the above: A's constructor called methodA called with arguments [1, 2, 3] A's constructor called Before invoking methodA() methodA called with arguments [4, 5, 6] After invoking methodA() Instead I get this: A's constructor called Before invoking methodA() Uncaught TypeError: Cannot read property 'apply' of undefined So apparently o1, despite being an object constructed with Library1.B's constructor (which in turn calls Library1.A's constructor), already uses the overridden methodA from Library2; it then crashes on Library1.B.methodA.apply call, I suppose because Library1.B does not have its own methodA, but rather inherits it from Library1.A. What I mean when I write Library1.B.methodA is actually "look up Library1.B's prototypal chain until you find the definition for methodA, then invoke it on this with these arguments". What would be the proper way to achieve this?
tagged with: overriding
accepted answer: http://stackoverflow.com/a/26208228
has comment: http://stackoverflow.com/comment/41091317
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41089782
tagged with: inheritance
score: 0
has comment: http://stackoverflow.com/comment/41088671
answer count: 1
has comment: http://stackoverflow.com/comment/41088999
has answer: http://stackoverflow.com/a/26208228
has title: Javascript - overriding inherited method in cloned library
has comment: http://stackoverflow.com/comment/41089835
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41089103

http://stackoverflow.com/comment/41336123
type: QuestionComment
comment on: http://stackoverflow.com/q/26336390
has text: thanx Rhumborl i got that a.lenth thing, but the problem is when i type something in textBox1 the result in textBox2 is "undefined"
score: 0
type: Comment

http://stackoverflow.com/a/26232213
score: 0
has comment: http://stackoverflow.com/comment/41146261
type: Answer
has body: From the bootstrap documentation: The data-ride="carousel" attribute is used to mark a carousel as animating starting at page load. It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel. Then you declared your crousel by the attributes, no need for the script there.
answers question: http://stackoverflow.com/q/26232112

http://stackoverflow.com/comment/41159995
type: Comment
comment on: http://stackoverflow.com/q/26237814
score: 0
has text: @MikeGriffith Understood, since a new controller gets created every time I was going to suggest stopping the polling on the destruction of the controller.
type: QuestionComment

http://stackoverflow.com/a/26347652
has comment: http://stackoverflow.com/comment/41356292
downvote count: 1
answers question: http://stackoverflow.com/q/26347063
has body: You Could try the contain selector like so $('div[id~=table]') Reference http://api.jquery.com/attribute-contains-word-selector/
type: Answer
upvote count: 0
score: -1

http://stackoverflow.com/a/26270336
answers question: http://stackoverflow.com/q/26270303
accepted answer of: http://stackoverflow.com/q/26270303
has body: You're re-declaring the variable um_getallusers after you're already using it, plus you're resetting the value (by using um_getallusers=' '; instead of um_getallusers+=' ';. var um_getallusers=' ID Name username '; $.getJSON('php/um_getallusers.php',function(dta){ $("#tblContent").remove(); //del table $.each(dta,function(index,item){ um_getallusers+=' '+item.id+' '+item.name+' '+item.username+' '; }); um_getallusers+=' '; // this is my problem $('#um').html(um_getallusers); }); So, delete the extra var and add in a +
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41233300
type: Comment
type: QuestionComment
has text: Im not connecting to a server yet, but can you eleaborate on how to do this? I'm new at jquery, and I'm just trying to figure out how to add 0% for downvote and 100% for upvote with not rated as the default. Can this be done without a server and only on jquery?
score: 0
comment on: http://stackoverflow.com/q/26278110

http://stackoverflow.com/q/26245403
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26245469
has body: I've been wanting to post a javascript alert (a pop up window w/ a message) to simply say "Thanks! You've been added!". Once a user has entered in the details in the form and clicks the submit button. I have googled how to do this, however when adding it, it never worked and have tried different ways but am getting stumped on how to do it now. If anyone knows what I am doing wrong then any help would be much appreciated. I would also like to note this in a separate php file. Below you will find my code; insert.php &lt;?php $con=mysqli_connect("localhost","cl51-main-3i6","password","cl51-main-3i6"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $firstname = mysqli_real_escape_string($con, $_POST['firstname']); $lastname = mysqli_real_escape_string($con, $_POST['lastname']); $email = mysqli_real_escape_string($con, $_POST['email']); $sql="INSERT INTO emails ( Firstname, Lastname, Email) VALUES ( '$firstname', '$lastname', '$email')"; if (!mysqli_query($con,$sql)) { die('Error : ' . mysql_error($con)); } echo '&lt;script language="javascript"&gt;'; echo 'alert("Thank you! You've now joined the e-mail club!")'; echo '&lt;/script&gt;'; header("Location: http://isometricstudios.co.uk/news.html"); exit; mysqli_close($con); ?&gt;
tagged with: popup
tagged with: alert
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26245497
accepted answer: http://stackoverflow.com/a/42110266
tagged with: javascript
score: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26245469
answer count: 5
has answer: http://stackoverflow.com/a/26245485
has comment: http://stackoverflow.com/comment/41169522
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26245668
tagged with: php
has answer: http://stackoverflow.com/a/42110266
has comment: http://stackoverflow.com/comment/41169588
has title: Run javascript alert within PhP

http://stackoverflow.com/q/26252366
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41182057
has comment: http://stackoverflow.com/comment/41182179
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/26252399
tagged with: jquery
has comment: http://stackoverflow.com/comment/41181587
favorite count: 0
has answer: http://stackoverflow.com/a/26252399
has comment: http://stackoverflow.com/comment/41182643
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41181826
tagged with: error-handling
type: Question
has body: I'm working with Asp.net Mvc and I Use Java script after i get error in A Function In Java Script other functions of page doesn't work until i refresh the page . so how can i handle errors for this problem?
has title: Java Script Functions Doesn't work After Error in One Function

http://stackoverflow.com/q/26316435
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Is there an Dygraph has loaded event?
has body: I want to show checkboxes for every column in my dygraph. But I can't figure out when to get the names of my columns from dygraph using g.getLabels(). It works when I call it manually after I know the graph has loaded. But how can I automate this? I couldn't find an event like "Dygraph.loaded" or a property like "Dygraph.hasLoaded". Is there some way to easily do this?
type: AnsweredQuestion
score: 3
tagged with: dygraphs
has answer: http://stackoverflow.com/a/26318354
accepted answer: http://stackoverflow.com/a/26318354
type: Question
downvote count: 0

http://stackoverflow.com/comment/41367965
comment on: http://stackoverflow.com/a/26344312
has text: You can use the following `Var dataString = 'content='+test; dataString += '&text='+text; //Note when you use var - it redeclares the variable, and note that in this line we are concatenating the earlier declared variable. Wrote this without testing, but this should work.` Also If all these data are coming from a form you can also use $('#formid').serialize(); and pass this directly
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41220377
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26273505
type: QuestionComment
has text: Using ajax is a better way

http://stackoverflow.com/a/35070374
has body: Turns out that there's an undocumented waits() method that effectively tells frisby to sleep. For example, frisby.create('Sleep test') .get('http://www.citibikenyc.com/stations/json') .expectStatus(200) .inspectJSON() .waits(5000) .toss(); Will wait for 5 seconds before execution.
answers question: http://stackoverflow.com/q/26245834
downvote count: 0
type: Answer
score: 5
upvote count: 5

http://stackoverflow.com/q/26252446
score: 0
answer count: 2
tagged with: angularjs
has answer: http://stackoverflow.com/a/26252927
has body: I have a directive with code seriesClick: function (e) { //console.log(e.category); // use scope.$emit to pass it to controller scope.$emit('feederValue', e.category); }, In my controller I am using $scope.$on('feederValue', function (evt, value) { console.log(value); $scope.feederFitBoundValue = value; $scope.getFitBoundForFeederID($scope.feederFitBoundValue); }); I want to define this function in my different directive And I want to use it My code function getFitBoundForFeederID(feederFitBoundValue){ alert(feederFitBoundValue); } I am getting error TypeError: undefined is not a function My project is in Angular framework I want to use logic of $emit and $on Please suggest if any optimus solution. I just want to pass value from One directive to different directive. same time I want to pass some value from one directive to another. I want to do event triggering.
type: UnansweredQuestion
type: Question
has title: How to trigger event from directive in angular
has answer: http://stackoverflow.com/a/26252513
tagged with: javascript

http://stackoverflow.com/comment/41342437
type: Comment
has text: It is working when i create a simple HTML page with out IDE. But it is not working in Netbeans in a simple web application..
comment on: http://stackoverflow.com/a/26338227
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41207937
type: Comment
has text: So you need a `var list = ...` on one line and pass it in as another. Is this a big deal?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26266572

http://stackoverflow.com/q/26319293
possible better answer: http://stackoverflow.com/a/26319716
has answer: http://stackoverflow.com/a/26319716
score: 1
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/65800015
downvote count: 1
type: AnsweredQuestion
has title: onclick in InfoWindow content
has answer: http://stackoverflow.com/a/26320272
type: Question
tagged with: google-maps
has body: I got a little problem in my code, I try to launch a function in the content of a InfoWindow in javascript, and, I don't know why, I got difficulties to do that. I've looked at a lot of topics about it on stackoverflow and elsewhere, applied exactly what I've seen on these topics but... Note: this is a part of my entire code, this is why "infobulle" doesn't seem to be declared. In the same way, "this.jsonActivity" and "mapView" are correctly initialized before this part of code. Here, "newActivity" in parameter is a Marker from the google maps API, and what I'm trying to do is to display an InfoWindow next to the current marker when we click on it. Everything's ok, the entire text is correctly displayed in the InfoWindow but the problem is that I can't call the "alertMessage()" method when I click on the button, nothing happens... and I really don't know why !! Well, here's my code, thank you for your help :) google.maps.event.addListener(newActivity, "click", function() { if(infobulle) infobulle.close(); var contenu = '' + this.jsonActivity.title + ' ' + this.jsonActivity.description + ' ' + ' Routing: ' + ' Click me '; infobulle = new google.maps.InfoWindow({ content: contenu, maxWidth: 120 }); infobulle.open(mapView, this); function alertMessage() { alert("alertMessage"); } }); EDIT: this is perfect, it's working now! I've tried all of your solutions and only one is working for me, the one that declares the function as global, thanks to Dr.Molle! Now I put what I've tried for the two other solutions: google.maps.event.addListener(newActivity, "click", function() { if(infobulle) infobulle.close(); var contenu = '' + this.jsonActivity.title + ' ' + this.jsonActivity.description + ' ' + ' Routing: ' + ' Click me '; infobulle = new google.maps.InfoWindow({ content: contenu, maxWidth: 120 }); infobulle.open(mapView, this); document.getElementById("myAlert").addEventListener(function() { alert("something"); }); }); For the solution suggested by Jared Smith. It's like b…
tagged with: javascript
answer count: 3
accepted answer: http://stackoverflow.com/a/26320272

http://stackoverflow.com/comment/41257085
type: QuestionComment
comment on: http://stackoverflow.com/q/26293473
has text: By "dynamically", do you mean the class names are not known?
score: 0
type: Comment

http://stackoverflow.com/a/26253483
accepted answer of: http://stackoverflow.com/q/26252263
has comment: http://stackoverflow.com/comment/41184473
type: AcceptedAnswer
type: Answer
has body: First you have to populate temporary object map mapping customerID and invoiceDate to appropriate property values. Then you can use it to obtain the desired result: var map = {}; for (var n = allObjects.length, i = 0; i &lt; n; i++) { var el = allObjects[i], id = el.customerID, date = el.invoiceDate; if (!(id in map)) map[id] = {}; if (!(date in map[id])) map[id][date] = [0, 0, 0]; var arr = map[id][date]; arr[0] += el.totalAmount; arr[1] += el.totalUsage; arr[2] += el.invoiceDebt; } n = objRow.length; i = 0; for (; i &lt; n; i++) { var el = objRow[i], id = el.customerID; for (var key in el) { if (key != 'customerID') el[key] = id in map &amp;&amp; key in map[id]? map[id][key] : [0,0,0]; } }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26252263
downvote count: 0

http://stackoverflow.com/comment/41254930
type: Comment
score: 0
has text: Also i think you do not need to parse str in JSON.
type: AnswerComment
comment on: http://stackoverflow.com/a/26292141

http://stackoverflow.com/comment/41163811
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26242405
has text: Try removing `return true;`, you don't need it in this case.
type: QuestionComment

http://stackoverflow.com/a/26250637
has comment: http://stackoverflow.com/comment/41178685
has comment: http://stackoverflow.com/comment/41178733
type: Answer
has comment: http://stackoverflow.com/comment/41178869
downvote count: 0
has comment: http://stackoverflow.com/comment/41179764
score: 3
answers question: http://stackoverflow.com/q/26250505
has comment: http://stackoverflow.com/comment/41180473
has body: Function for making an array for child-parent: function parseTree($tree, $root = null) { $return = array(); # Traverse the tree and search for direct children of the root foreach($tree as $child =&gt; $parent) { # A direct child is found if($parent == $root) { # Remove item from tree (we don't need to traverse this again) unset($tree[$child]); # Append the child into result array and parse its children $return[] = array( 'name' =&gt; $child, 'children' =&gt; parseTree($tree, $child) ); } } return empty($return) ? null : $return; } For output: function printtree($tree) { if(!is_null($tree) &amp;&amp; count($tree) &gt; 0) { echo '&lt;ul&gt;'; foreach($tree as $node) { echo '&lt;li&gt;'.$node['name']; printTree($node['children']); echo '&lt;/li&gt;'; } echo '&lt;/ul&gt;'; } } Full PHP script: &lt;?php $arr = array( '216'=&gt;103, '217'=&gt;216, '88'=&gt;216, '102'=&gt;NULL, '103'=&gt;102, '104'=&gt;102 ); function parseTree($tree, $root = null) { $return = array(); # Traverse the tree and search for direct children of the root foreach($tree as $child =&gt; $parent) { # A direct child is found if($parent == $root) { # Remove item from tree (we don't need to traverse this again) unset($tree[$child]); # Append the child into result array and parse its children $return[] = array( 'name' =&gt; $child, 'children' =&gt; parseTree($tree, $child) ); } } return empty($return) ? null : $return; } function printtree($tree) { if(!is_null($tree) &amp;&amp; count($tree) &gt; 0) { echo '&lt;ul&gt;'; foreach($tree as $b) { echo '&lt;li&gt;'.$b['name']; printtree($b['children']); echo '&lt;/li&gt;'; } echo '&lt;/ul&gt;'; } } printtree(parseTree($arr)); ?&gt; Output: 102 103 216 217 88 104 small CSS one could use :- li { position: relative; margin-left: -15px; list-style: none; }
accepted answer of: http://stackoverflow.com/q/26250505
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/comment/41206482
comment on: http://stackoverflow.com/a/26265681
type: AnswerComment
type: Comment
score: 2
has text: @RocketHazmat: once we get TCO we won't need to use loops anymore! yay

http://stackoverflow.com/comment/41251745
type: QuestionComment
score: 0
has text: so your intention is to submit the form without reloading the page to keep the inputs? just use `$.post();/$.ajax();`
comment on: http://stackoverflow.com/q/26290467
type: Comment

http://stackoverflow.com/comment/41310656
has text: I've never understood who thinks this is actually readable code.
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/26322925
type: Comment

http://stackoverflow.com/q/26325035
has comment: http://stackoverflow.com/comment/41314839
tagged with: jquery
has comment: http://stackoverflow.com/comment/41314686
accepted answer: http://stackoverflow.com/a/26325338
favorite count: 0
has comment: http://stackoverflow.com/comment/41314720
has comment: http://stackoverflow.com/comment/41314872
has comment: http://stackoverflow.com/comment/41315058
has comment: http://stackoverflow.com/comment/41315134
has comment: http://stackoverflow.com/comment/41314568
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41315175
has comment: http://stackoverflow.com/comment/41314904
possible better answer: http://stackoverflow.com/a/26325216
has title: On button press get photo ID
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26325216
has comment: http://stackoverflow.com/comment/41314697
has comment: http://stackoverflow.com/comment/41315136
has comment: http://stackoverflow.com/comment/41314681
has comment: http://stackoverflow.com/comment/41315354
has body: So I'm trying to get the ID of the photo that a button is attached to (underneath) but am having some trouble. I'm dynamically inserting using JavaScript innerHTML and it all works fine: Here's my code for creating the images as well as buttons and descriptions etc. for (var i = 0; i < photos.length; i++) { htmlStr += ' ' + photos[i].description + " total likes " + photos[i].likes + " " + ' ' //console.log(htmlStr); } The HTML: What I'm having trouble figuring out is for each image dynamically inserted, how can I make the button press grab the id that is defined when creating the image dynamically? or even description etc.\ edit: Image:
has comment: http://stackoverflow.com/comment/41314923
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41315125
has comment: http://stackoverflow.com/comment/41314639
has answer: http://stackoverflow.com/a/26325338
answer count: 2
upvote count: 0

http://stackoverflow.com/a/26270056
has comment: http://stackoverflow.com/comment/41395624
answers question: http://stackoverflow.com/q/26269823
accepted answer of: http://stackoverflow.com/q/26269823
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41216185
has body: Add animation: false to the initializer and uncomment the code you have and it works cleanly. $('#aPopover').popover({ title: 'Selected Images', html: true, content: getSelectedImages, placement: 'right', animation: false });
type: AcceptedAnswer
downvote count: 0
score: 1

youtube-api
tags question: http://stackoverflow.com/q/26340590
tags question: http://stackoverflow.com/q/26342288
type: Tag
tags question: http://stackoverflow.com/q/26273066
tag name: youtube-api
tags question: http://stackoverflow.com/q/26257395
tags question: http://stackoverflow.com/q/26196186
tags question: http://stackoverflow.com/q/26282111

http://stackoverflow.com/q/26243707
has comment: http://stackoverflow.com/comment/41200573
tagged with: audio
has title: ActionScript to JavaScript conversion to play a sound on mouseover in an HTML canvas document in Flash CC
has comment: http://stackoverflow.com/comment/41171462
has comment: http://stackoverflow.com/comment/41168125
type: Question
has comment: http://stackoverflow.com/comment/41172462
tagged with: flash-cc
tagged with: javascript
has body: I've been looking for quite some time to do something that I'm sure is simple, but I can't find the answer. I have found a few general tutorials on this, but have not been able to get it to work with anything I've tried so far. I'm sorry if I missed it, but I appreciate any help anyone can provide. I have a simple button that I built in flash a while ago that I am converting to an HTML canvas document so I can place it as HTML content in a website with animation and sound on mouseover. I've got the animation working the way I want it when I publish to HTML, but using ActionScript 3, I had a sound that played when the user moused over the button. I want to have it still play a sound when the user mouses over it in my html content too, but I have not had success yet with converting my ActionScript to JavaScript and I don't really know JavaScript. I would also like to have multiple fallback formats (ogg, wav) of the audio file linked in the code for any browsers that don't work with mp3 files. I can convert the audio file no problem but don't know how to code this in JavaScript…. Here is the ActionScript code which works fine in my original document when I export as a .swf file. stop(); import flash.media.Sound; import flash.net.URLRequest; import flash.events.Event; sprayGunbtn.addEventListener(MouseEvent.MOUSE_OVER, playSound); var myExternalSound:Sound = new Sound(); var req:URLRequest = new URLRequest("ShortSpray.mp3"); myExternalSound.load(req); function playSound(event:Event){ myExternalSound.play(); } If someone could help me convert this ActionScript 3 code to JavaScript so that it will work when I publish my .fla file to HTML, I would greatly appreciate it. Thanks in advance!
has comment: http://stackoverflow.com/comment/41171219
linked to: http://stackoverflow.com/q/14032412
score: 0
linked to: http://stackoverflow.com/q/7299248
has answer: http://stackoverflow.com/a/67994909
answer count: 1
has comment: http://stackoverflow.com/comment/50310994
tagged with: actionscript-3
has comment: http://stackoverflow.com/comment/41171793
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26283336
has comment: http://stackoverflow.com/comment/41238442
answers question: http://stackoverflow.com/q/26259402
has body: I have no clue why this one works (well, does not hang, still can't read the data) but it does, if someone have the same issues that is:) var mapKeyUrl = "/GenMap/getcountry/jsonchk"; var mapKeyUrl = "/GenMap/getcountry/jsonchk" $.getJSON(mapKeyUrl, { regsel: "${regsel}", countryiso: code }) .done(function( contdata ) { alert(contdata) contdata = contdata.country alert(contdata) document.getElementById("maptext").innerHTML = "I am an abwrock " + code + contdata.exturl; })
score: 0
type: Answer

http://stackoverflow.com/q/26215506
tagged with: jquery
favorite count: 0
upvote count: 0
possible better answer: http://stackoverflow.com/a/26216480
has answer: http://stackoverflow.com/a/26216480
type: AnsweredQuestion
score: -1
has title: Call Method with specific element as event-referrer
has answer: http://stackoverflow.com/a/26215638
accepted answer: http://stackoverflow.com/a/26215638
type: Question
has body: I have a bug causing me not being able to trigger a "dblclick()"-Event on an element where it is binded like this: Click! I actually can't tell why it is not working but it seems to be caused by some huge old javascript running in the background. I tried: $('#1').trigger('dblclick'); $('#1').trigger('ondblclick'); $('#1').dblclick(); I would need to fire the myMethod() but this one's depending on a given "evt"-Variable storing some information about the element being fired. Is there a way to get this element as "evt-referrer" to call the myMethod() without having to trigger a dblclick()? This would prevent me from huge changes on the code (myMethod()) or troubleshooting for the dblclick-event. Solution: Never mind, found out that a click-event fired two times in a row will occur in a doubleclick.
answer count: 2
downvote count: 1
tagged with: javascript

http://stackoverflow.com/a/26281838
score: 1
has comment: http://stackoverflow.com/comment/41239738
has body: Just to add to the answer by Remco, add '>' to make sure you select only one of the immediate childs. So, one way can write $(component+' &gt; :nth-child('+i+')').show(); or even better $(component+' &gt; div:nth-child('+i+')').show(); If you do not place the '>' symbol, it can also select the elements inside child divs, if it is present.
upvote count: 1
has comment: http://stackoverflow.com/comment/41235455
answers question: http://stackoverflow.com/q/26281561
type: Answer
has comment: http://stackoverflow.com/comment/41236908
has comment: http://stackoverflow.com/comment/41235988
downvote count: 0

http://stackoverflow.com/q/26242405
has comment: http://stackoverflow.com/comment/41170775
has comment: http://stackoverflow.com/comment/41194756
has comment: http://stackoverflow.com/comment/41195666
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41165223
upvote count: 3
has comment: http://stackoverflow.com/comment/41163811
type: Question
score: 3
linked to: http://stackoverflow.com/q/9106519
tagged with: javascript
has answer: http://stackoverflow.com/a/26260780
has comment: http://stackoverflow.com/comment/41167034
tagged with: google-chrome-extension
answer count: 1
downvote count: 0
tagged with: websocket
has comment: http://stackoverflow.com/comment/41167177
accepted answer: http://stackoverflow.com/a/26260780
has comment: http://stackoverflow.com/comment/41165286
has body: I'm building a chrome extension which communicates with a nodejs server through websockets. The point of it is to track browsing history with content. It all seems to work, but occasionally (30% of the time) the callback in a function passed to onMessage.addListener doesn't fire correctly. Let me show you the code: background.js var socket = io('http://localhost:3000/'); var tabLoad = function (tab) { socket.emit('page load', tab); }; var tabUpdate = function (tabid, changeinfo, tab) { var url = tab.url; if (url !== undefined &amp;&amp; changeinfo.status == "complete") { tab.user_agent = navigator.userAgent; tab.description = ''; tab.content = ''; socket.emit('insert', tab); } }; socket.on('inserted', function(page){ socket.emit('event', 'Requesting page content\n'); //page = {tab: page, id: docs._id}; chrome.tabs.sendMessage(page.tab_id, {requested: "content", page: page}, function(data) { socket.emit('content', data); }); }); try { chrome.tabs.onCreated.addListener(tabLoad); chrome.tabs.onUpdated.addListener(tabUpdate); } catch(e) { alert('Error in background.js: ' + e.message); } content script - public.js var messageHandler = function(request, sender, sendContent) { if (request.requested == "content") { var html = document.getElementsByTagName('html')[0].innerHTML; var data = { content: html, page: request.page }; sendContent(data); return true; } }; chrome.extension.onMessage.addListener(messageHandler); The problem is that sometimes data in sendContent is undefined, while sometimes it is alright. Any ideas how to debug this or what i'm doing wrong? I've tried replacing document.getElementsByTagName('html')[0].innerHTML with a hardcoded 'test' string, but that didn't help. Pages like youtube/wikipedia seem to never work, while facebook/google works. Edit: The sendContent callback does fire 100% of the time it's just that the data passed to it is undefined. Edit: Here's the manifest file { "manifest_version": 2, "name": "Socket test", "description": "sockets are…
favorite count: 0
has comment: http://stackoverflow.com/comment/41166969
has title: Message callback returns a value infrequently - Chrome Extension

http://stackoverflow.com/comment/41356261
type: AnswerComment
type: Comment
has text: It was THAT easy! Still don't get why I have seen it with delimiters in more than one place, but i'll try to remember not to add them. Many thanks!
score: 0
comment on: http://stackoverflow.com/a/26347552

http://stackoverflow.com/a/73632313
type: Answer
answers question: http://stackoverflow.com/q/26274544
has body: If you can use fetch() instead of $.ajax, you can use curlconverter.com/javascript/ and it will convert your command to fetch('https://www.google.com/accounts/ClientLogin', { method: 'POST', body: new URLSearchParams({ 'accountType': 'GOOGLE', 'source': 'Google-cURL-Example', 'service': 'lh2' }) });
score: 0

http://stackoverflow.com/comment/41301295
score: 0
comment on: http://stackoverflow.com/q/26317769
type: Comment
type: QuestionComment
has text: how exactly is the `a` related to that `span` tag? (`span` is wrapped in `a`?)

http://stackoverflow.com/q/26251722
has comment: http://stackoverflow.com/comment/41180659
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26252223
has answer: http://stackoverflow.com/a/26252375
score: 0
tagged with: http://stackoverflow.com/tag/json
has body: i already make this JSON. but i found this error a +=" " + " " + " " + " " + " " + " " + " " + " " + " " + getSubsHTML(nodes[0].image, jsonStage.indexOf("2014_2012.json_0_0"),0) + getSubsHTML(nodes[1].image, jsonStage.indexOf("2014_2012.json_0_1"),1) + getSubsHTML(nodes[2].image, jsonStage.indexOf("2014_2012.json_0_2"),2) + getSubsHTML(nodes[3].image, jsonStage.indexOf("2014_2012.json_0_3"),3) + getSubsHTML(nodes[4].image, jsonStage.indexOf("2014_2012.json_0_4"),4) + " " + " " + getStageHTML(jsonStage.indexOf("2014_2012.json_0_0")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_1")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_2")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_3")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_4")) + " " + " " + getSubsHTML(nodes[5].image, jsonStage.indexOf("2014_2012.json_0_5"),5) + getSubsHTML(nodes[6].image, jsonStage.indexOf("2014_2012.json_0_6"),6) + getSubsHTML(nodes[7].image, jsonStage.indexOf("2014_2012.json_0_7"),7) + getSubsHTML(nodes[8].image, jsonStage.indexOf("2014_2012.json_0_8"),8) + getSubsHTML(nodes[9].image, jsonStage.indexOf("2014_2012.json_0_9"),9) + " " + " " + getStageHTML(jsonStage.indexOf("2014_2012.json_0_5")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_6")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_7")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_8")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_9")) + " " + " " + getSubsHTML(nodes[10].image, jsonStage.indexOf("2014_2012.json_0_10"),10) + getSubsHTML(nodes[11].image, jsonStage.indexOf("2014_2012.json_0_11"),11) + getSubsHTML(nodes[12].image, jsonStage.indexOf("2014_2012.json_0_12"),12) + getSubsHTML(nodes[13].image, jsonStage.indexOf("2014_2012.json_0_13"),13) + getSubsHTML(nodes[14].image, jsonStage.indexOf("2014_2012.json_0_14"),14) + " " + " " + getStageHTML(jsonStage.indexOf("2014_2012.json_0_10")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_11")) + getStageHTML(jsonStage.indexOf("2014_2012.json_0_…
has title: JSON TypeError: Cannot read property 'image' of undefined
type: Question
possible better answer: http://stackoverflow.com/a/26252375
has comment: http://stackoverflow.com/comment/41180764
tagged with: javascript
has comment: http://stackoverflow.com/comment/41180538
accepted answer: http://stackoverflow.com/a/26252223
answer count: 2
has comment: http://stackoverflow.com/comment/41180941
has comment: http://stackoverflow.com/comment/41180884

http://stackoverflow.com/comment/41312612
comment on: http://stackoverflow.com/q/26323952
score: 0
has text: I have no clue why jquery doesn't work.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26224380
accepted answer of: http://stackoverflow.com/q/26220006
type: Answer
answers question: http://stackoverflow.com/q/26220006
score: 1
upvote count: 1
has body: Your html must look like &lt;form id="contacto" name="contacto" method="post" onsubmit="return proceso_form(this, 'cargando')"&gt; ... &lt;/form&gt; And inside the function: function proceso_form(form, id_div_error){ var $form = $(form); var url = "my_url.php?form="+$form.attr('id'); //functions var response = document.getElementById(id_div_error); response.innerHTML="&lt;img src='img/loader.gif' style='margin-right: 5px;'/&gt;Loading ..."; // response.style.display='block'; $.ajax({ type: "POST", url: url, data: $form.serialize(), //ID form success: function(data) { if (data==1){ window.location.reload(); }else{ response.innerHTML=data; // show PHP response. } } }); return false; }; By passing this to the function you passing the whole form reference. Hope it will help.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26264169
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/41206945
tagged with: javascript
has answer: http://stackoverflow.com/a/26266150
answer count: 1
score: 7
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26266150
type: AnsweredQuestion
has title: D3.js text enter (within svg) transition opacity 0 to 1 won't end at 1
has body: I am trying to have my text enter selection transition opacity from 0 to 1 with the following code. Without the transition and opacity setting, text appears as expected. But with this code, opacity starts at 0 but never becomes 1; and text value does not get added? [All other transitions in my code work as expected]. /** * @param text * selection with data to add text from & truncate by, with a * delay. */ function addBubbleTextByData ( text ) { text.style( "opacity", 0 ).transition().delay( 1.1 * transitionDelay ) .style( "opacity", 1 ).text( function ( bubbleDatum ) { var bubbleDatumText = ""; // for bubbles too small for any text if ( bubbleDatum.r > 15 ) { // Bubble is large enough to fit text bubbleDatumText = bubbleDatum[JSON_NAME_KEY].toString().substring( 0, bubbleDatum.r / 4 ); } return bubbleDatumText; } ); }
upvote count: 7
tagged with: opacity

http://stackoverflow.com/q/26336585
has title: Three.js / Webgl X-RAY effect
tagged with: javascript
tagged with: webgl
score: 4
answer count: 3
has answer: http://stackoverflow.com/a/26341162
tagged with: 3d
favorite count: 0
has answer: http://stackoverflow.com/a/26356616
accepted answer: http://stackoverflow.com/a/26356616
has answer: http://stackoverflow.com/a/31551119
tagged with: three.js
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has comment: http://stackoverflow.com/comment/41337035
possible better answer: http://stackoverflow.com/a/31551119
type: AnsweredQuestion
downvote count: 0
type: Question
has body: How to achieve an x-ray-style effect in three.js / webgl? Some sort of this UPD I need real-time render with this stuff, not a still image. This can be done with shaders, that change density in non-linear way on overlaps based on distance. I briefly understand theory, but have no practice, that is why I need help with this
has comment: http://stackoverflow.com/comment/41336697

http://stackoverflow.com/a/44825254
has comment: http://stackoverflow.com/comment/91829562
has body: The simplest way with ES6: this.setState(prevState =&gt; ({ array: [...prevState.array, newElement] }))
downvote count: 0
answers question: http://stackoverflow.com/q/26253351
has comment: http://stackoverflow.com/comment/91879379
type: Answer
score: 71
has comment: http://stackoverflow.com/comment/91889070
upvote count: 71

http://stackoverflow.com/comment/41355326
type: Comment
comment on: http://stackoverflow.com/q/26347063
has text: Sorry, its not quite simple i guess.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26232715
linked to: http://stackoverflow.com/q/10225403
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41155918
has body: OK, here's the situation: I have a .mov video, recorded using QuickTime I want to split it into images (which I will use in a js animation) JS Code : function pad(num, size) { var s = num+""; while (s.length &lt; size) s = "0" + s; return s; } $(function(){ var currentIndex = 1; setInterval(function(){ $("#theImage").attr("src","img/video"+pad(currentIndex,3)+".png"); currentIndex++; }, 1000/24); }); So, I tried with FFMpeg : ffmpeg -i "video.mov" -f image2 -vf fps=24 video%03d.jpg This works. But the quality of the sprites is very low. ffmpeg -i "video.mov" -f image2 -vf fps=24 video%03d.png This works too. But the quality/size of the sprite is HUGE. I mean every sprite is around 110KB, with a grand total far above the video's size (100MB > 2MB!) What's going on? How can I achieve that, without losing any quality and still not having too deal with huge filesizes?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/76841305
has comment: http://stackoverflow.com/comment/42930637
tagged with: macos
has comment: http://stackoverflow.com/comment/42930884
has title: Export sprites/images from movie
tagged with: video
answer count: 0
tagged with: ffmpeg
score: 0
tagged with: quicktime
has comment: http://stackoverflow.com/comment/41157898

http://stackoverflow.com/a/26286002
answers question: http://stackoverflow.com/q/26280950
has body: I figured it out. You must remove the tinymce instance in the modal before you try and reload it again. on my modal when I call the 'hidden.bs.modal' I need to close any instance of tinymce that was used in the closing modal. code: $('#Modal').on('hidden.bs.modal', function () { tinymce.remove("#tinytext); $(this).removeData("bs.modal").find(".modal-content").empty(); }); once you do that, when you reopen the modal, the tinymce instance will reinitialize with no problem.
downvote count: 0
has comment: http://stackoverflow.com/comment/84569046
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/q/26271169
has answer: http://stackoverflow.com/a/26271252
score: 0
accepted answer: http://stackoverflow.com/a/26271252
answer count: 1
tagged with: jquery
has title: loop through nested json objects and display kay/value pair
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I have json object of which i want to print its key/value pair combination. but my object is nested one. so i want to loop through each object and display its key/value pair. Fiddle : http://jsfiddle.net/ydzsaot5/ Code: var html=''; var contextObj = {"CategoryID":"1","BillerID":"23","BillerName":"MERCS","RequestType":"QuickPay","AccountNo":"1234567890","Authenticator":"{\"EmailAddress\":\"dfgsdfgsdfg\",\"MobileNumber\":\"65-4576573\",\"ID\":\"4572-4756876-8\"}","Token":"3C639AE65"}; html = getKeyValueJson(contextObj, html); $('div').html(html); function getKeyValueJson(obj, html) { $.each(obj, function (key, value) { if (value == null) { return } if (typeof value == 'object') { getKeyValueJson(value, html); } else { html += '&lt;label&gt;' + key + '&lt;/label&gt; :- &lt;label&gt;' + value + '&lt;/label&gt;&lt;br&gt;'; } }); return html; } I want to print in this way : .... AccountNo :- 1234567890 EmailAddress :- dfgsdfgsdfg MobileNumber :- 65-4576573 .... Token :- 3C639AE65
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41163411
has text: Huh? Are you trying to turn a string into a Regex? If so, just `new RegExp(string);`
comment on: http://stackoverflow.com/q/26242362
score: 7
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41158960
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26239727
has text: And that's the point, it's dependencies may change but yours doesn't. You depend on the computed observable, you shouldn't concern yourself with what it depends on. If you had a more concrete example of what you are trying to accomplish here, we could probably steer you in the right direction.
type: Comment

http://stackoverflow.com/comment/41347539
score: 0
type: QuestionComment
type: Comment
has text: Ok, just to know if it has to match the first index
comment on: http://stackoverflow.com/q/26342512

http://stackoverflow.com/comment/41345232
comment on: http://stackoverflow.com/q/26341294
score: 0
has text: Thanks I saw that post. Using `as_attachment=True` and `mimetype='application/vnd.ms-excel` in the `send_file` method have the same effect (I think).
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26279667
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41232397
has body: You can add an expression to directive which will be called whenever an album is clicked. module.directive('freshAlbum', function() { return { template : ' Click ', scope : { album : '=' albumIsClicked: "&"}, ... }; }); And in your controller, you can implement albumIsClickedEvent function to do what you want to achieve (close the other open albums etc.). Through this expression directive can communicate with an outer controller.
has comment: http://stackoverflow.com/comment/41231493
upvote count: 2
has comment: http://stackoverflow.com/comment/41232520
answers question: http://stackoverflow.com/q/26279305

http://stackoverflow.com/comment/41169157
type: QuestionComment
has text: Why use a submit button at all? Why not a regular button with the click event?
comment on: http://stackoverflow.com/q/26245220
score: 0
type: Comment

http://stackoverflow.com/q/26204682
has title: Embed Google Analytics in Laravel
score: 2
upvote count: 2
has body: I set up a website with laravel 4. The website has no front facing site ... The website sends a file as response to a link earlier generated. So there is no html / blade template. How can I embed Google Analytics within Laravel without using html output? Is there a chance to call the Google Analytics JavaScript with php? Thanks
type: Question
accepted answer: http://stackoverflow.com/a/26205518
type: AnsweredQuestion
tagged with: google-analytics
tagged with: javascript
tagged with: laravel-4
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26205518
tagged with: php

http://stackoverflow.com/q/26199681
has comment: http://stackoverflow.com/comment/41088987
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ember.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26204025
score: 1
upvote count: 1
type: Question
has title: Ember.Js title repetitiveness
has body: Hi guys I wanted to ask why does a word keep popping up in other pages on my ember website. To clarify I mean that I have a main homepage but then I go to a products page->return to my homepage and I have the title of the products page showing up. It is very annoying because I've been learning ember and how simple I can connect many static pages, I do not want go go back to simple html. Here is the code below. Thank you everyone. Note: This is just the Mainpage.html. I am using php to include all these pages to my index so that might have something to do with it.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26204025

http://stackoverflow.com/comment/41263073
comment on: http://stackoverflow.com/a/26296690
type: Comment
has text: Ok this is working now. The problem was that the webpage was already opened, had to close it and reopen it again..
score: 2
type: AnswerComment

http://stackoverflow.com/a/26323960
has body: You should take only one form all fields in that and after getting all input data after submit you can do whatever you want to do.. The way you are doing this is not possible reason being when form is submitted control goes to server to handle http request. hence only one form can be submit at a time. You can't submit two forms at once.. try changing order of form submit and other form will start submitting..
type: Answer
answers question: http://stackoverflow.com/q/26323889
score: 0

http://stackoverflow.com/q/26251216
score: 2
downvote count: 0
type: Question
has title: Sliding time specific images with javascript
tagged with: arrays
tagged with: javascript
tagged with: jquery
upvote count: 2
has answer: http://stackoverflow.com/a/30677356
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I want to slide 36 time specific images throughout the day. How can I do this? I tried many times, but it's not working. I built the code below - &lt;script type="text/javascript"&gt; var i = 0; function decimalaxis() { var d = new Date(); var h = d.getUTCHours(); var m = d.getUTCMinutes(); var s = d.getUTCSeconds(); var i = document.getElementById("Num"); i.innerHTML = Math.floor(1.5*h + 0.025*m + 0.0004166667*s); return i; function slider(){ var image = document.getElementById("slide"); image[] = new img[35]; String fileLocation = new String(); for (int i = 0; i &lt; 35; i++) { fileLocation = "img" + i + ".jpg"; image[i] = new img('img'); document.write("&lt;img src="img" + i + ".jpg" id="slide"); } } } &lt;/script&gt;

http://stackoverflow.com/q/26249620
has answer: http://stackoverflow.com/a/26250439
tagged with: c#-4.0
score: 1
upvote count: 1
has body: How to set the Onbeforeunload Function on the specific button? Example, I have 3 buttons. &lt;div&gt; &lt;asp:Button ID="btnBack" runat="server" Text="Back" CssClass="po-font" Height="30px"/&gt; &lt;asp:Button ID="btnSumbit" runat="server" Text="Submit" CssClass="po-font" Height="30px"/&gt; &lt;asp:Button ID="btnSaveToDraft" runat="server" Text="Save To Draft" CssClass="po-font" Height="30px"/&gt; &lt;/div&gt; On javascript, I did something like: &lt;script type="text/javascript"&gt; window.onbeforeunload = confirmExit; function confirmExit() { return "Are you sure you want to leave this page? Any unsaved progress will be lost"; } &lt;/script&gt; The function will work properly though but I want to specify the function in an specific button probably on the "Back" button. I did something like. &lt;script type="text/javascript"&gt; function confirmExit() { return "Are you sure you want to leave this page? Any unsaved progress will be lost"; } $('#btnBack').live('click', function () { window.onbeforeunload = confirmExit; }); &lt;/script&gt; but Id doesn't work. How to do this? Any Ideas? I just want to trigger the function on the specified button. Help me.
type: Question
has answer: http://stackoverflow.com/a/26250323
tagged with: c#
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26249796
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41177069
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41177151
has title: Allowing the Javascript Onbeforeunload Function on the specific button on ASP.NET Framework

http://stackoverflow.com/q/26287448
tagged with: javascript
has answer: http://stackoverflow.com/a/71193012
has answer: http://stackoverflow.com/a/40114412
upvote count: 14
has body: I'm able to accomplish this in Google Spreadsheets, below is a screenshot: Here's the small dataset in CSV Buy PPU,Sell PPU,Net PPU 0.023,0.019,-0.000725 0.026,0.0165,-0.003725 0.021,0.021,0.00735 0.015,0.0165,0.0147 0.021,0.028,0.0168 0.018,0.028,0.0198 jsFiddle with basic configuration: http://jsfiddle.net/kaatula/j3FJf/1/ Chart.js documentation: http://www.chartjs.org/docs/ D3 documentation: http://strongriley.github.io/d3/api/ Any help is appreciated. I'm not seeing an example in either library of this specific kind of chart (called I believe "Stepped" or "Step line"), but I believe they are flexible enough to accomplish this? Thank you
favorite count: 0
has answer: http://stackoverflow.com/a/46918981
tagged with: graphing
tagged with: d3.js
type: UnansweredQuestion
has title: How can I make a stepline or stepped chart in chart.js or D3?
answer count: 4
score: 14
has answer: http://stackoverflow.com/a/26287656
tagged with: chart.js
type: Question
downvote count: 0

http://stackoverflow.com/comment/41301442
type: Comment
comment on: http://stackoverflow.com/q/26317769
has text: @KingKing the first JavaScript example isn't related to the HTML block. The JavaScript block he provided is an example of something else he got working. Now he wants to write up a script for the second HTML block to parse the int in the inner span.
score: 0
type: QuestionComment

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/26288693
tags question: http://stackoverflow.com/q/26324624
tags question: http://stackoverflow.com/q/26215316
tags question: http://stackoverflow.com/q/26351383
tags question: http://stackoverflow.com/q/26239304
tags question: http://stackoverflow.com/q/26282521
tags question: http://stackoverflow.com/q/26254977
tags question: http://stackoverflow.com/q/26286218
type: Tag

http://stackoverflow.com/q/26331097
has comment: http://stackoverflow.com/comment/41326814
answer count: 0
type: UnansweredQuestion
has body: You know how with PrePros you can go // @prepros-prepend "jquery.js" And it'll include jQuery there. I have for instance a website.js that get's included in all my html files, and then with the help of yepnope I include certain plugins as they are needed, for instance, say I have a lightbox on the homepage only but not on any other page, then id like to have a lightbox.js file that includes all the libraries (except jquery) needed to to run the lightbox on that js file. Like i know it could cause libraries being loaded twice etc, but that's besides the point. What I want to know is what Grunt tasks and workflow do I need to run to achieve this? Like ideally I would like // @gurnt-include 'lightbox.js' and it'll include that file right there, then run it through Closure Compiler and inject into a directory. TL:DR; Grunt task to concat files inline with comment.
has title: Prepros-prepend like function for grunt
type: Question
has comment: http://stackoverflow.com/comment/41327468
tagged with: javascript
tagged with: gruntjs
score: 0
tagged with: concatenation

http://stackoverflow.com/comment/41288915
comment on: http://stackoverflow.com/q/26310813
score: 0
type: Comment
type: QuestionComment
has text: hummm ok I will look into that. My index.js is what is serving my app from the server so maybe i am wording it wrong

http://stackoverflow.com/comment/41157223
type: Comment
has text: need a little modified more, I think we should use `$(this).attr('href')` than `$(e.target).attr('href')`. It'll be wrong if inside `.show.bs.tab` has a span or something, in this case the `$(e.target) === $('.show.bs.tab span')` (in this case, we don't need `function(e)` anymore, sorry).
score: 0
comment on: http://stackoverflow.com/a/26239062
type: AnswerComment

http://stackoverflow.com/comment/42369904
has text: Good answer but what, if you have 2 maps on 1 page? The same error because the infobubbles are attached to both maps. Any way to bypass this?
comment on: http://stackoverflow.com/a/26354824
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41318256
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26326608
has text: You could make a Ajax request and simply `eval` the response, but that's really quick and dirty ;)
score: 0

http://stackoverflow.com/comment/47755413
type: AnswerComment
has text: Thanks so much! This worked for me. How i converted the line endings: http://stackoverflow.com/questions/11899843/fixing-sublime-text-2-line-endings
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26603933

http://stackoverflow.com/a/57074529
answers question: http://stackoverflow.com/q/26235957
upvote count: 0
type: Answer
score: -1
has body: Here should be your answer. It is a batch script: start "" chrome "https://google.com; Timeout /t 3 /nobreak &gt;nul 2&gt;&amp;1 taskkill /IM chrome.exe /F start "" chrome "https://yahoo.com" Timeout /t 3 /nobreak &gt;nul 2&gt;&amp;1 taskkill /IM chrome.exe /F start "" chrome "https://bing.com" Timeout /t 3 /nobreak &gt;nul 2&gt;&amp;1 taskkill /IM chrome.exe /F
downvote count: 1

http://stackoverflow.com/q/26198450
has comment: http://stackoverflow.com/comment/41081790
has comment: http://stackoverflow.com/comment/41081514
has comment: http://stackoverflow.com/comment/41082094
linked to: http://stackoverflow.com/q/26100329
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/26198973
has title: XMLHttpRequest in For-Loop
type: UnansweredQuestion
score: 0
type: Question
has body: This code is supposed to loop through several webpages and find all the links on each page, listing them in console as it goes, but it seems to be listing only links from the very last webpage (fakeURL.com/735). How I can get console.log(url); to work for every iteration, instead of just the last one (which is when i=735)? for(i = 0; i &lt;= 735; i += 15) { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + i, true); xhrs.onreadystatechange = function() { if (xhrs.readyState == 4) { $(xhrs.responseText).find('a').each(function() { var url = $(this).attr('href'); console.log(url); }); } } xhrs.send(); }
tagged with: for-loop
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26232588
type: Question
accepted answer: http://stackoverflow.com/a/26250722
has comment: http://stackoverflow.com/comment/41178084
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41145323
tagged with: ajax
tagged with: jquery-select2
score: 3
answer count: 1
has title: Select2 filter not working
has body: I use Select2 to handle my dropdownmenu. The dropdownmenu get's populated via "Ajax-call" to PHP, who get's data from Mysql. The Select2 dropdownmenu offers serach function and filtering. When i type in something in the search field, the letters get underlined, but the filter doesn't work. So the list won't get filtered by the letters i type in. Why? JS: $(document).ready(function(){ $("#test").select2({ placeholder: "test", minimumInputLength: 1, ajax: { url: "test.php", dataType: 'json', //search term data: function (term, page) { return { q: term, // search term page: page }; }, results: function (data, page) { return { results: data}; } //End of results }, //End of Ajax }); //End of select2
has answer: http://stackoverflow.com/a/26250722
upvote count: 3
has comment: http://stackoverflow.com/comment/41145356
has comment: http://stackoverflow.com/comment/41145411
has comment: http://stackoverflow.com/comment/41144871
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/15232476

http://stackoverflow.com/a/26214107
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41120315
has comment: http://stackoverflow.com/comment/41120020
has comment: http://stackoverflow.com/comment/41118686
downvote count: 0
has body: I don't really understand why you can't use canvas while you can change js. So, if you can save your icon on the server, could you try this code : function changeImgColor(img) { var can = document.createElement('canvas'); can.width = img.width; can.height = img.height; var ctx = can.getContext('2d'); ctx.drawImage(img, 0, 0); var imageData = ctx.getImageData(0, 0, img.width, img.height); var data = imageData.data; var c = 255; for (var i = 0; i &lt; data.length; i += 4) { if (data[i] == c &amp;&amp; data[i + 1] == c &amp;&amp; data[i + 2] == c) { data[i] = 0; data[i + 1] = 0; data[i + 2] = 0; } // overwrite original image ctx.putImageData(imageData, 0, 0); } var newdata = can.toDataURL("image/png"); img.src = newdata; } changeImgColor(document.getElementsByTagName('img')[0]); check fiddle Ps : you may have to hit "run" in order to load icons in results
answers question: http://stackoverflow.com/q/26212627
type: Answer
has comment: http://stackoverflow.com/comment/41118583

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/26205143
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/26284994

http://stackoverflow.com/comment/41327460
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26331754
has text: @Zip See the last paragraph of my answer then. When you stop the timer you need to store the current duration somewhere so you can add it back in when start is clicked next.
score: 0

http://stackoverflow.com/q/26296982
has comment: http://stackoverflow.com/comment/41263404
linked to: http://stackoverflow.com/q/26372752
tagged with: ms-office
has answer: http://stackoverflow.com/a/26298934
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41402257
has title: Access Exchange or Office 365 API using Meteor JS?
tagged with: exchange-server-2010
tagged with: office365
accepted answer: http://stackoverflow.com/a/26298934
has body: Currently I am using Exchange 2010 to manage our calendars. I believe that there is an API available for Exchange that allows editing of most calendars and aspects of the calendar. I want to build a Meteor JS app that interfaces with the Exchange 2010 to retrieve and edit the calendars. Meteor JS is just a javascript framework, so if you know how to access the API with javascript, you should be able to help me answer the following questions. What is the best way to build a Meteor JS app (or just use javascript) to interface with the Exchange 2010 to retrieve and edit the calendars? Are there any tutorials on how to get it working? Also, if I upgrade to Office 365, will the APIs be the same?
possible better answer: http://stackoverflow.com/a/26297393
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26297393
downvote count: 0
tagged with: javascript
score: 1
tagged with: meteor
has comment: http://stackoverflow.com/comment/41455960
favorite count: 0
type: Question

mongodb-query
tags question: http://stackoverflow.com/q/26213628
tags question: http://stackoverflow.com/q/26199174
tags question: http://stackoverflow.com/q/26281895
tag name: mongodb-query
type: Tag
tags question: http://stackoverflow.com/q/26208754
tags question: http://stackoverflow.com/q/26252569

http://stackoverflow.com/a/26240030
type: Answer
accepted answer of: http://stackoverflow.com/q/26239993
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: You're passing a reference to the array by value. You now have two references to the same array instance. If you don't want the array to change, you need to explicitly create a copy .
answers question: http://stackoverflow.com/q/26239993

http://stackoverflow.com/comment/41263702
has text: You are confusing the normal `.prototype` property with the internal prototype inheritance reference.
type: QuestionComment
type: Comment
score: 4
comment on: http://stackoverflow.com/q/26297318

http://stackoverflow.com/q/26215452
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26215642
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: ng-repeat, do not update table after data was updated?
has answer: http://stackoverflow.com/a/26215642
has comment: http://stackoverflow.com/comment/41112641
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41112766
has body: I have a table that is populating with ng-repeat, and I also have navigation button that change table data. Before I had custom filter on the data in html file, like so: ng-repeat="car in carList | filter:tableFilter" Even so it worked, it slowed my website, a lot. So now I am updating my table data in my controller. But there is another problem, ng-repeat do not want to update. So no matter how much I will update my data, the table will be still the same. How can I fix that? Here is my ng-repeat: .... Here is my nav-bar: Sort by Reviews Sort by Rating initCarList() changes the data according to tab number. formattedTable() filters table data according to filter values that can be changes by user. UPDATE: my formatting function: $scope.formattedTable = function(index){ $scope.initCarList(index); $scope.sortedCarList = []; var carlistLength = $scope.carList.length; for (var i=0;i<carlistLength;i++){ // just check every row if values passes user requirements var rowBool = $scope.tableFilter($scope.carList[i]); if (rowBool){ $scope.sortedCarList.push($scope.carList[i]); } } }

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/26336423
type: Tag

http://stackoverflow.com/a/26227597
downvote count: 0
score: 1
has body: You could easily add elements to the DOM: function createPetField() { var input = document.createElement('input'); input.type = 'text'; input.name = 'pet[]'; return input; } var form = document.getElementById('myForm'); document.getElementById('addPet').addEventListener('click', function(e) { form.appendChild(createPetField()); });
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26227487
has comment: http://stackoverflow.com/comment/41136485
type: Answer
answers question: http://stackoverflow.com/q/26227487
has comment: http://stackoverflow.com/comment/41136323

http://stackoverflow.com/comment/41283646
has text: Yes. I had a slight laspe in thinking ability and apparently couldn't express that correctly. Thank you, that's exactly what I'm trying to do.
comment on: http://stackoverflow.com/q/26307878
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/47420147
type: Answer
answers question: http://stackoverflow.com/q/26219936
has comment: http://stackoverflow.com/comment/81839811
score: -2
upvote count: 0
has body: need to say I'm a newbie in this, and I'm using Mobirise as a support. That being said, what I haven't found (or haven't understood) in your answers is how to create a link to open a specific slide, user end, maybe adding something at the end of the url? I created a bootstrap carousel sample with mobirise for you to check out. gallery link
has comment: http://stackoverflow.com/comment/85847082
has comment: http://stackoverflow.com/comment/81795221
downvote count: 2

http://stackoverflow.com/comment/41117232
type: Comment
comment on: http://stackoverflow.com/a/26217883
has text: Just realised that you were trying to use the icon align justify and not justify the glyicon :P So as James king said - you just made an error in the class of the span.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41350502
type: QuestionComment
comment on: http://stackoverflow.com/q/26336029
has text: Thanks @BijuKunjummen, still it doesn't link with .js file, I can't figure it out, where I am going wrong. Thanks for your directions -
score: 0
type: Comment

http://stackoverflow.com/q/26341997
favorite count: 0
type: UnansweredQuestion
tagged with: three.js
answer count: 0
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jquery
has body: need to use same object multiple time for different render-er so how can i clone object? i tried using clone method but when i use same object for second render-er ,object from the first render-er got disappear. loader.load('object.obj', 'object.mtl', function (object) { array.push(object); }); later i use this array for different render-er like "array[0].clone()" but its not working? can anyone guide me through this? or give me a link to similer example.
upvote count: 1
has title: three.js: how to clone object loaded using objmtl loader?

http://stackoverflow.com/a/26325448
upvote count: 1
downvote count: 0
type: Answer
score: 1
has body: Your loop: for (i = 0; i &lt; fid.length; i++) { var n = escape(fid[i].name); if( ! n.length ) { continue; } var v = escape(fid[i].value); cookievalue.push( n + '=' + v ); } will push all three of the radios into your cookie value. Each one will overwrite the previous, because they have the same name. So ultimately you're left with the value 'Premium Pack' mapped to the "emotion" name. You need to check if the radio is selected before you push the val, maybe something like: for (i = 0; i &lt; fid.length; i++) { var n = escape(fid[i].name); if( ! n.length ) { continue; } var v = escape(fid[i].value); // Only push in the selected emotion radio button if (n == "emotion") { if (fid[i].checked == true) cookievalue.push( n + '=' + v ); } else cookievalue.push( n + '=' + v ); }
answers question: http://stackoverflow.com/q/26324797

memoization
type: Tag
tags question: http://stackoverflow.com/q/26327171
tag name: memoization

http://stackoverflow.com/a/26329755
answers question: http://stackoverflow.com/q/26329730
has comment: http://stackoverflow.com/comment/41323626
has comment: http://stackoverflow.com/comment/41323840
has comment: http://stackoverflow.com/comment/41323740
has comment: http://stackoverflow.com/comment/41323606
downvote count: 0
type: Answer
has body: Add the speed to your slideUp call e.g. "slow" slideUp("slow") You can also use a value in milliseconds.
has comment: http://stackoverflow.com/comment/41323727
score: 2
has comment: http://stackoverflow.com/comment/41323866
upvote count: 2

http://stackoverflow.com/a/26315041
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26314969
has body: var base = $("base").prop("href"); var fullurl = "http://root/tempop/panel/about/1" var path = fullurl.replace(base,""); console.log(path) http://jsfiddle.net/57gbetwp/
downvote count: 0
type: Answer

ms-office
tags question: http://stackoverflow.com/q/26296982
tag name: ms-office
type: Tag

http://stackoverflow.com/comment/41166095
score: 0
type: Comment
has text: `$('input').each(...);`, basically
type: QuestionComment
comment on: http://stackoverflow.com/q/26243645

http://stackoverflow.com/comment/41280601
score: 0
type: AnswerComment
type: Comment
has text: @user234159 I see. You have to use visualization lib for this. Check my edited answer
comment on: http://stackoverflow.com/a/26281981

http://stackoverflow.com/q/26270303
answer count: 3
has comment: http://stackoverflow.com/comment/41214900
accepted answer: http://stackoverflow.com/a/26270336
possible better answer: http://stackoverflow.com/a/26271198
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to delete the existing table in a div and create a new one each time the page receive json encode data. I have problems closing the table? html: jQ: var um_getallusers=' ID Name username '; $.getJSON('php/um_getallusers.php',function(dta){ $("#tblContent").remove(); //del table $.each(dta,function(index,item){ um_getallusers+=' '+item.id+' '+item.name+' '+item.username+' '; }); var um_getallusers=' '; // this is my problem $('#um').html(um_getallusers); });
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26270336
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26270410
has answer: http://stackoverflow.com/a/26271198
has title: Closing json data populated table

http://stackoverflow.com/a/26295545
type: Answer
has comment: http://stackoverflow.com/comment/41261178
score: 2
upvote count: 2
has body: As you're dynamically creating a new checkbox when the value changes, you need to delegate the event to your checkbox by assigning it to a non-dynamic ancestor: $('div[role]').on('change', 'input[type=checkbox]', chg); Note how I've used change instead of click as this is more appropriate for checkboxes. In the below snippet I've also changed $(this).is(":checked") to just this.checked. $('div[role]').on('change', 'input[type=checkbox]', chg); $('div[role] input[type=text]').on('input', sourceChanged); function chg() { var istiki = this.checked; $('#upd').html(istiki); } function sourceChanged() { $('span', $(this).closest('.input-group')).html('&lt;input type="checkbox"&gt;'); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div role="Tiki" class="input-group"&gt; &lt;input type="text" class="form-control" /&gt; &lt;span class="input-group-addon"&gt;&lt;input type="checkbox" /&gt;&lt;/span&gt; &lt;/div&gt; &lt;span id="upd"&gt;&lt;/span&gt; Note also that if you want it to say false you should convert your istiki variable to a string: $('#upd').html('' + isticki);
accepted answer of: http://stackoverflow.com/q/26295509
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41260519
answers question: http://stackoverflow.com/q/26295509

http://stackoverflow.com/comment/41270296
score: 0
type: Comment
type: QuestionComment
has text: This is how I solved this: (1) I generated a request to the server, (2) I sent a server response in EML format with content-type: message/rfc822, (3) The EML format contains rich HTML including images, (4) the EML header has X-Unsent: 1 to open the email in edit mode, (5) the email is opened in the email app when the browser opens the file
comment on: http://stackoverflow.com/q/26232173

http://stackoverflow.com/comment/41151140
score: 0
type: Comment
type: QuestionComment
has text: The problem is that you wrap second AJAX request with anonymous function which never invoked. Just remove these wrapping lines and the code will work
comment on: http://stackoverflow.com/q/26235913

http://stackoverflow.com/q/26232942
possible better answer: http://stackoverflow.com/a/26233176
has answer: http://stackoverflow.com/a/26233319
has answer: http://stackoverflow.com/a/26233176
has body: I have a geojson file and I wonder to get the max and the min value from a specific field. Here is my geojson file : var commune = {"type": "FeatureCollection","features": [{ "type": "Feature", "id":"", "properties": { "nom":"Ain (01)", "CODE_DEPT":"01", "MARIE_2007":"242937", "CELIB_2007":"150068", "VEUF_2007":"31475", "DIVOR_2007":"32177", "MARIE_2011":"248332", "CELIB_2011":"162880", "VEUF_2011":"32059", "DIVOR_2011":"36617", "P11_POP":"603827", "P07_POP":"574391", "NAIS12":"7242", "NAIS11":"7265", "DECE12":"4577", "DECE11":"4305", "ENCTOT11":"4329", "ENCTOT10":"4828", "ENNTOT11":"27186" }, "geometry": { "type": "Polygon", "coordinates": [[ [4.92452011,45.80404],[4.91857895,45.8093526],[4.91976994,45.82948887],[4.933601220000001,46.51245471000001],[4.93475135,46.51332864000001],[4.94725813,46.51446477999999],[4.94737243,46.50843994000001],[4.95280079,46.50448051],[4.96265289,46.5065581],[4.970033120000001,46.51410222],[4.98021847,46.51520743],[5.006366140000001,46.50970907],[5.01059281,46.51107719],[5.01244901,46.50297671],[5.01424122,46.50045988000001],[5.05090592,46.48625806],[5.0547548,46.4842847],[5.06721345,46.48577781],[5.07144999,46.48582009],[5.09526702,46.49798349],[5.112817620000001,46.49296539],[5.85065585,46.26170731],[5.86085144,46.26877548000001],[5.867698190000001,46.26822003],[5.86918965,46.26498538000001],[5.89197324,46.28359891000002],[5.89462537,46.28661469],[5.909195170000001,46.28394973],[5.91592224,46.29281579000001],[5.91892961,46.30930141],[5.9259046,46.31377309],[5.93732476,46.30977235000001],[5.94152708,46.30926953],[5.94401041,46.31220679],[5.97513797,46.35030159000001],[5.984121710000001,46.36265843],[6.01338356,46.37599880000001],[6.031020600000001,46.38810776],[6.052803630000001,46.41141842],[6.06057745,46.41751374],[6.0640057,46.41623036],[6.09777972,46.40858757000001],[5.01668616,45.80561526],[5.0122926,45.80523386],[5.00120298,45.81012438],[4.996959160000001,45.80914469],[4.99291668,45.80780002000001],[4.980338380000001,45.8058461…
upvote count: 1
tagged with: geojson
type: Question
accepted answer: http://stackoverflow.com/a/26233319
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
answer count: 3
downvote count: 0
tagged with: javascript
has title: Get max and min value from a geojson
has answer: http://stackoverflow.com/a/26233213
favorite count: 0

http://stackoverflow.com/comment/80564071
comment on: http://stackoverflow.com/a/46600248
has text: This leads to `InAppBrowser: Error loading url file:///android_asset/www/assets/pdf/my.pdf:android.os.FileUriExposedException: file:///android_asset/www/assets/pdf/my.pdf exposed beyond app through Intent.getData()` for me, mostly because of the enhanced security measures in API Level 24+ (see https://stackoverflow.com/a/38858040/1902598)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41278575
comment on: http://stackoverflow.com/q/26266029
has text: Does that help figure out what she wants me to do?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41253297
score: 0
type: Comment
has text: @RobG - isn't it in all versions of javascript (not just ES5), that variables that have not been initialized yet by your own code have a value of `undefined`?
comment on: http://stackoverflow.com/a/26291206
type: AnswerComment

http://stackoverflow.com/a/26258777
accepted answer of: http://stackoverflow.com/q/26258618
score: 1
has body: Well, you already have promises (or at least, deferreds) in your code, so there is no good reason to look for different coding pattern. You can however flatten your callback pyramid by chaining the promise callbacks with the allmighty then method instead of nesting them (with done): $.wait(1000).then(function() { // ^^^^ //Do something return $.wait(5000); // ^^^^^^ }).then(function() { // ^^^^ //Do something else return $.wait(2000); // ^^^^^^ }).then(function() { // ^^^^ //Do something else }); which is exactly equivalent to your code.
answers question: http://stackoverflow.com/q/26258618
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41279514
has text: thnks sir for your response i have this pb only in firefox i had to replace every space with '+' to avoid spaces in url
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26241378
type: AnswerComment

http://stackoverflow.com/comment/41236437
has text: there is no element with class iconlink In your code
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26282261

http://stackoverflow.com/a/26304935
has body: Javascript is OO, not with classes, but with prototypes. First when you declare Parenizor, you're declaring a 'constructor'. You probaly want this: function Parenizor(){ var value = null; this.setValue = function(val){ value = val; }; this.getValue = function(){ return value; }; this.toString = function(){ return String(value); }; } Or also, setting into the object prototype: function Parenizor(){} Parenizor.prototype._value = null; Parenizor.prototype.setValue = function(){...}; Parenizor.prototype.getValue = function(){...}; Parenizor.prototype.toString = function(){...};
answers question: http://stackoverflow.com/q/26304736
score: 0
type: Answer

http://stackoverflow.com/q/26272506
has comment: http://stackoverflow.com/comment/41218731
has comment: http://stackoverflow.com/comment/41220724
score: 4
has comment: http://stackoverflow.com/comment/41220688
possible better answer: http://stackoverflow.com/a/26273813
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/26273813
has comment: http://stackoverflow.com/comment/41219746
accepted answer: http://stackoverflow.com/a/26274136
downvote count: 0
has title: Jquery scroll has to fire more often
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41219520
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41218679
has comment: http://stackoverflow.com/comment/41220937
has body: I have the code: $(window).bind('scroll', function() { //doing funny things here }); But I have to fire it a lot when it scrolls, like firefox does. Firefox fires this multiple times when you scroll, but IE and Chrome fires it only once. How can I force IE and Chrome to fire it more often in one scroll? Or is there an alternative way for this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26274136
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41219304
has comment: http://stackoverflow.com/comment/41219257
type: Question

http://stackoverflow.com/a/26309360
has comment: http://stackoverflow.com/comment/41286379
upvote count: 2
answers question: http://stackoverflow.com/q/26306067
has comment: http://stackoverflow.com/comment/41286868
has comment: http://stackoverflow.com/comment/41286783
downvote count: 0
has comment: http://stackoverflow.com/comment/41286811
has comment: http://stackoverflow.com/comment/41286723
has comment: http://stackoverflow.com/comment/41287112
has comment: http://stackoverflow.com/comment/41286327
type: Answer
has comment: http://stackoverflow.com/comment/41287004
has comment: http://stackoverflow.com/comment/41286682
score: 2
has comment: http://stackoverflow.com/comment/41287165
has body: i think that you problem is in the url because 'meers/client' in not a route $.ajax({ type: 'POST', url: "&lt;?php echo $this-&gt;Html-&gt;url(array('controller' =&gt; 'YourController','action' =&gt; 'YourAction')); ?&gt;", datatype:'json', cache: false, data: {myVal:'Success!'}, success: function(){alert('AjaX Success')}, error: function(){alert('AjaX Failed')} }) .done(function(){ alert('AjaX Done!'); }); or can probe giving a router: $.ajax({ type: 'POST', url: "&lt;?php echo Router::url(array('controller' =&gt; 'YourController', 'action' =&gt; 'YourAction'), true); ?&gt;", datatype:'json', cache: false, data: {myVal:'Success!'}, success: function(){alert('AjaX Success')}, error: function(){alert('AjaX Failed')} }) .done(function(){ alert('AjaX Done!'); }); you can see other examples: http://www.dereuromark.de/2014/01/09/ajax-and-cakephp/ Making jquery ajax call from view to controller in cakephp 2.x
has comment: http://stackoverflow.com/comment/41287010
has comment: http://stackoverflow.com/comment/41286903

http://stackoverflow.com/q/26257568
duplicate of: http://stackoverflow.com/q/1634748
has title: Remove a Particular Query string from URL
has body: I am trying to create a function to remove a particular querystring and its value from the url . For eg: if i have a url like var url = www.foo.com/test?name=kevin&amp;gender=Male&amp;id=1234 If i pass name -> it should remove the key and value for name. the url should become www.foo.com/test?gender=Male&amp;id=1234 i have a Function ReturnRefinedURL(key,url) and i am doing this in the Function function ReturnRefinedURL(key,url) { var Value = getParameterByName(key); // This returns kevin var stringToBeRemoved = 'key +'='+ Value+'&amp;'; // string becomes 'name=kevin&amp;' return url.replace(stringToBeRemoved, ''); } //Found this in Google: function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&amp;]" + name + "=([^&amp;#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } So when i call the method ReturnRefinedURL('name',window.location.href); This works!!! But looking for a more elegant and fool proof method. * This wont work if name parameter is the second one in the query string. (the '&amp;' will still be retained)
has answer: http://stackoverflow.com/a/26257685
has answer: http://stackoverflow.com/a/26257722
type: Question
downvote count: 0
tagged with: javascript
tagged with: query-string
tagged with: jquery
linked to: http://stackoverflow.com/q/1634748
upvote count: 3
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26257714
possible better answer: http://stackoverflow.com/a/26257685
favorite count: 0
accepted answer: http://stackoverflow.com/a/26257722
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/41258646
type: Comment
comment on: http://stackoverflow.com/a/26281656
has text: @MoaLarssonn I'd advise you to use the function (`uniqueId()` -> watch the parentheses). And don't forget to put the `uuid` var _outside_ the function. That way everytime you'll get a new id. If you don't use the function you should increase the variable yourself each time (`++uuid`)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26232429
type: AnsweredQuestion
has body: I am making an GCM app, so when I need a server to match a fair. There is a code made by Node js. var http = require('http'); var express = require('express'); var app = express(); app.use(express.static('public')); app.use(express.bodyParser()); app.use(app.router); var gcm = require('node-gcm'); var message = new gcm.Message(); var message = new gcm.Message({ collapseKey: 'demo', delayWhileIdle: true, timeToLive: 3, data: { key1: '안녕하세요.', key2: 'saltfactory push demo' } }); var server_access_key = '~'; var sender = new gcm.Sender(server_access_key); var registrationIds = []; var registration_id = '~-~-~-~-~~~-~'; // At least one required registrationIds.push(registration_id); app.post('/enroll',function(request,response){ var my_number = Number(request.param('myphonenumber')); var another_number = Number(request.param('anotherphonenumber')); console.log(my_number); console.log(another_number); response.send(my_number); response.send(another_number); response.json({success:1}); response.json({success:"my_number"}); response.json({success:"another_number"}); }); http.createServer(app).listen(52273,function(){ console.log('Server Running'); }); And when I execute POST at POST-MAN , I get nothing in browser and my terminal shows this error code : NaN NaN Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:689:11) at ServerResponse.res.setHeader (/Users/~) at ServerResponse.res.set.res.header (/Users/~) at ServerResponse.res.send (/Users/~) at ServerResponse.res.json (/Users/~) at /Users/~ at callbacks (/Users/~) at param (/Users/~) at pass (/Users/~) at Router._dispatch (/Users/~) NaN is caused by console.log(my_number); console.log(another_number); I don't know why NaN is printed. I obviously insert Key : myphonenumber, anotherphonenumber &amp; value : 12345678, 98765432.
has answer: http://stackoverflow.com/a/26233582
has comment: http://stackoverflow.com/comment/41144940
type: Question
answer count: 1
tagged with: javascript
has title: Node js : HTTP POST : Error: Can't set headers after they are sent
tagged with: http-post
accepted answer: http://stackoverflow.com/a/26233582
score: 0
tagged with: node.js

http://stackoverflow.com/q/26292072
tagged with: windows-phone-8
has body: var applicationData = Windows.Storage.ApplicationData.current; var path = applicationData.localFolder.path; path = path.replace('\\LocalState', ''); var folder = Windows.Storage.StorageFolder.getFolderFromPathAsync(path).done(function () { }); folder.deleteAsync().done(function () { }); window.close(); Executing the code i get the exception that im not allowed to access hidden folder and i have to change the file attribute of it. Please suggest me a solution. Please note that i want to delete entire application folder and not just application data.
type: Question
tagged with: winjs
tagged with: javascript
has comment: http://stackoverflow.com/comment/41481093
has comment: http://stackoverflow.com/comment/41307122
score: 0
has comment: http://stackoverflow.com/comment/41286718
type: UnansweredQuestion
tagged with: windows
has title: How to Delete Application folder in Javascript/Html Metro App for windows
answer count: 0
tagged with: windows-phone-8.1

http://stackoverflow.com/a/26196424
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26195558
has body: My Mistake. i defined initSelection inside the ajax. Should have defined it outside ajax. now defined initSelection() after the ajax ajax: { type:"post", url: url, dataType: 'json', quietMillis: 100, data: function(term, page) { return { term: term, //search term page_limit: 10 // page size }; }, results: function(data, page) { var newData = []; $.each(data, function (index,value) { newData.push({ id: value[id], //id part present in data text: value[text] //string to be displayed }); }); return { results: newData }; } }, initSelection : function (element, callback) { var data = {id: element.val(), text: element.val()}; callback(data); }
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26195558

http://stackoverflow.com/q/26252728
tagged with: javascript
has comment: http://stackoverflow.com/comment/41182870
has comment: http://stackoverflow.com/comment/41182347
tagged with: jquery
type: UnansweredQuestion
has title: jQuery, behaviour changing when I call the jQuery function outerHeight()
has body: I am using the elevateZoom plugin of jQuery. By default, the lens does not closes when the mouse pointer reaches the corner: http://jsfiddle.net/qozp328p/ But if I add a mouseover event, where I call outerWidth(), then, the lens closes when the mouse reaches the corner of the image: http://jsfiddle.net/z48fs7vL/ How can it be? how can calling this function, changing a script behaviour? (I am using Firefox 31.1.0) thanks.
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/41182180
type: Question

http://stackoverflow.com/comment/41109859
comment on: http://stackoverflow.com/a/26213921
type: AnswerComment
has text: Where would I place this?
score: 0
type: Comment

http://stackoverflow.com/q/26268048
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Object.bindProperties() Method of Nashorn
downvote count: 0
score: 1
tagged with: java
type: Question
tagged with: nashorn
tagged with: javascript
has body: I have two questions about the Object.bindProperties() method in Nashorn: Is there a comprehensive documentation for this method, except at https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions#Nashornextensions-loadWithNewGlobal ? Is it a bug as shown below? The following code does not bind the x, y, and z properties of obj2 to obj because obj already has properties with the same names. Is it documented somewhere? var obj = {x:10, y:20, z:30}; var obj2 = {x:100, y:200, z:300}; // bind properties of 'obj2' to 'obj' Object.bindProperties(obj, obj2); print(obj.x, obj.y, obj.z); print(obj2.x, obj2.y, obj2.z); --------------------------------- 10 20 30 100 200 300 -------------------------------- Now, let us add a new property to obj2. The new property is bound to obj, but obj reads the new property's value as null: var obj = {x:10, y:20, z:30}; var obj2 = {x:100, y:200, z:300}; // Add a new property to obj2 obj2.u = 600; // bind properties of 'obj2' to 'obj' Object.bindProperties(obj, obj2); print(obj.x, obj.y, obj.z, obj.u); // obj.u is null. Why? print(obj2.x, obj2.y, obj2.z, obj2.u); --------------------------------- 10 20 30 null 100 200 300 600 -------------------------------- And, here is another variant of the code that works. This time, I started the target object as empty. Now, adding the new property to the source works fine. var obj = {}; var obj2 = {x:100, y:200, z:300}; // Add a new property to obj2 obj2.u = 600; // bind properties of 'obj2' to 'obj' Object.bindProperties(obj, obj2); print(obj.x, obj.y, obj.z, obj.u); // obj.u is correct.It is 600 print(obj2.x, obj2.y, obj2.z, obj2.u); ---------------------------- 100 200 300 600 100 200 300 600 ---------------------------- I am using JDK version 1.8.0_20. Thanks Kishori
has answer: http://stackoverflow.com/a/30041857

http://stackoverflow.com/comment/41325981
comment on: http://stackoverflow.com/q/26330761
score: 0
has text: @avrilalejandro sorry? I don't understand the relevancy...
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26336796
accepted answer of: http://stackoverflow.com/q/26336719
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41336606
answers question: http://stackoverflow.com/q/26336719
has body: Reset button type should be "reset" instead of "cancel"

http://stackoverflow.com/a/26214401
type: Answer
has body: Try to invoke the .attr() function over wrapped jQuery object, alert($(this).attr('id')); this is a plain JavaScript object and it won't contain a member function called .attr() Full code would be, $('.quater').on('click', function() { var $value = $(this).children('.target'); $value.each(function() { alert($(this).attr('id')); }); }); test
answers question: http://stackoverflow.com/q/26214393
has comment: http://stackoverflow.com/comment/41110784
score: 4
has comment: http://stackoverflow.com/comment/41110762
has comment: http://stackoverflow.com/comment/41110905
upvote count: 4
has comment: http://stackoverflow.com/comment/41110923
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26214393

http://stackoverflow.com/comment/41229093
type: QuestionComment
has text: what's about HTML bit ?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26278286

http://stackoverflow.com/q/26243927
downvote count: 0
answer count: 1
tagged with: google-earth-plugin
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41171482
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26246635
accepted answer: http://stackoverflow.com/a/26246635
tagged with: javascript
tagged with: kml
has body: First, I want to thank you for the efforts in answering. Second, I created a site that contains a plug-in of Google Earth, and I want to use a local KML file to show two coordinates. HTML code: KML code: <?xml version="1.0" encoding="UTF-8"?> Simple placemark Attached to the ground. Intelligently places itself at the height of the underlying terrain. -122.0822035425683,37.42228990140251,0 I searched Google for some answers, but nothing helped me to understand how to combine between the HTML and KML (Google Earth Plug-in). please help me. Thank you very much, Orian.
has title: How to combine HTML and KML with Google-Earth-Plugin?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41113109
type: AnswerComment
comment on: http://stackoverflow.com/a/26215626
type: Comment
score: 0
has text: I don't need insert content script to all frames. For example I need copy html from iframe to textarea in main document.

http://stackoverflow.com/comment/41310665
has text: +1 for such a simple, readable, obvious-what-it-does, easy-to-maintain solution even for regex beginners.
comment on: http://stackoverflow.com/a/26322921
type: AnswerComment
score: 4
type: Comment

http://stackoverflow.com/a/26333573
has comment: http://stackoverflow.com/comment/41371945
has comment: http://stackoverflow.com/comment/41334501
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41371823
has comment: http://stackoverflow.com/comment/41383691
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41370292
has body: I hope this is what you are looking for, I refactored the code a bit, added class clickMe to button, it makes id unnecessary. the JS code var clickedButton; $(document).ready(function(){ $('.clickMe').click(function(){ clickedButton = this; $( "#table_dialog_1" ).dialog(); }); $( '#table_dialog_1 tr').click(function(){ var tds = $(this).children(); $(clickedButton).parent().prev().find('input').val(tds.eq(0).html()); $(clickedButton).next('a').text(tds.eq(2).html()+','+tds.eq(1).html()); $( "#table_dialog_1" ).dialog('close'); }); });
accepted answer of: http://stackoverflow.com/q/26331913
has comment: http://stackoverflow.com/comment/41370549
has comment: http://stackoverflow.com/comment/41334454
type: Answer
answers question: http://stackoverflow.com/q/26331913

http://stackoverflow.com/comment/41386997
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26262413
type: AnswerComment
has text: hmmm I reviewed it but I don't fully understand it =/

http://stackoverflow.com/q/26324091
score: 0
answer count: 1
has title: How can I instantiate a circle of objects in Javascript?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41312888
has comment: http://stackoverflow.com/comment/41312757
type: Question
has answer: http://stackoverflow.com/a/26324256
accepted answer: http://stackoverflow.com/a/26324256
has body: I'm trying to build a circle with dynamic scripting in Javascript. Normally, I've been able to do it pretty easily in C# using Math.cos and Math.sin. I'm using EaselJS/CreateJS as my base library, and came up with this: function BuildTileCircle() { var countNumberSlots = BlockArray.length; var radius = 10; for (var i = 0; i &lt; countNumberSlots; i++) { var angle = i * Math.PI * 2 / countNumberSlots; console.log(angle); var tempTile = new createjs.Sprite(Tiles, 0); WorldContainer.addChild(tempTile); tempTile.x = Math.cos(angle) * 100; tempTile.y = Math.sin(angle) * radius * 100; } } It.. SORT of works. The circle it builds however, is highly skewed and not perfectly round. Am I on the right track?
tagged with: arrays
tagged with: javascript
tagged with: createjs

http://stackoverflow.com/comment/41186683
type: AnswerComment
comment on: http://stackoverflow.com/a/26223958
type: Comment
has text: I had posted the wrong JSFIDDLE. Now updated and uploaded. "Works" on iOS but has an evil skipping if you are at the bottom and still scrolling. Have no android, please feed back.
score: 0

http://stackoverflow.com/comment/41296222
has text: @Apul Gupta, Yes, I m using jquery UI tabs. Could u please let me know what events I can attach?
type: Comment
comment on: http://stackoverflow.com/q/26314823
type: QuestionComment
score: 0

http://stackoverflow.com/q/26328835
upvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41321772
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26329199
accepted answer: http://stackoverflow.com/a/26329199
possible better answer: http://stackoverflow.com/a/26329153
tagged with: php
tagged with: safari
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: AJAX not firing in Safari or Safari mobile
has comment: http://stackoverflow.com/comment/41321912
has answer: http://stackoverflow.com/a/26329153
tagged with: javascript
has body: For some reason, my AJAX event does not fire in Safari on my Mac or my iPad/iPhone. I'm new to this, so it may be (and probably is) programmers' error, but here's my code: &lt;form class='send-form'&gt; &lt;input type="hidden" name="csv-val" value=""&gt; &lt;input type="hidden" name="img-val" value=""&gt; &lt;button type='button' class='send-it' onclick='$(sendTheData(event))'&gt; Manual Submit &lt;/button&gt; &lt;/form&gt; &lt;script&gt; function sendTheData(event){ var sendButton = $(event.target); var theForm = sendButton.parents('form'); var theFormClass = sendButton.parents('form').attr('class'); console.log("Parent form is " + theFormClass); $.ajax({ async: "true", type: 'GET', url: 'save.php', data: $(theForm).serialize() }).done(function( msg ) { alert( "Data Saved: " + msg ); }); return false; } &lt;/script&gt; Note that the element with the class send-form is appended to the document by a different jQuery script and isn't on the page upon the initial load, so that might affect things; I'm not sure.
has comment: http://stackoverflow.com/comment/41321685
has comment: http://stackoverflow.com/comment/41322082
answer count: 2

http://stackoverflow.com/comment/41312595
type: Comment
has text: Please do not use "bootstrap" tag, use "twitter-bootstrap" since it means something else
type: QuestionComment
comment on: http://stackoverflow.com/q/26240446
score: 0

http://stackoverflow.com/q/26206788
score: 0
has comment: http://stackoverflow.com/comment/41096679
has comment: http://stackoverflow.com/comment/41108428
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41108285
tagged with: iframe
has comment: http://stackoverflow.com/comment/41096720
tagged with: each
type: Question
has title: Get each element from iframe
has comment: http://stackoverflow.com/comment/41096682
has comment: http://stackoverflow.com/comment/41096699
tagged with: javascript
tagged with: jquery
has body: I'm trying to make a small website checker and i'm trying to make it work with iframe so i can still get the CSS of each element. I looked time after time in this forum and on Google and i tried everything but for some reason it doesn't work for me.. This is the code i tried. I tried many variations, also Javascript but nothing worked.. document.domain = document.domain; $("#mainFrame").contents().find("li").each(function() { alert($(this).text()); }); How can i get it to work please? Thanks for any help
has comment: http://stackoverflow.com/comment/41097629

http://stackoverflow.com/comment/41282072
score: 3
comment on: http://stackoverflow.com/q/26306715
has text: I have formatted your question code to be "readable" one and you can't imagine how painful it was so please give some "care" to your code.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41205500
has text: To set the val you would need: `$(this).val($(this).val().substr(0,$(this).val().length-1));`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26265233
score: 1

http://stackoverflow.com/a/26335707
has comment: http://stackoverflow.com/comment/41334744
has comment: http://stackoverflow.com/comment/41334995
has body: If your comparing 2 html input element, you might want to check only the id attribute. Since #planungtext is already a unique identifier. $($current).attr('id') !== 'planungtext'
has comment: http://stackoverflow.com/comment/41334891
score: 0
has comment: http://stackoverflow.com/comment/41335018
type: Answer
has comment: http://stackoverflow.com/comment/41334848
has comment: http://stackoverflow.com/comment/41335088
answers question: http://stackoverflow.com/q/26335622

http://stackoverflow.com/a/26343464
downvote count: 0
type: Answer
has body: The whole point of pdf.js is to render .pdf documents in HTML5. So what you're saying should be achievable. The project is quite well documented on Github and should be a good starting point. As far as the navigation and other toggle buttons for zooming and paning are concerned, they have been clearly implemented here and here. So you could start by viewing the source of these demos first and then go through the documentation to fit your needs. Hope this gets you started in the right direction. I'm posting some relevant code snippet from one of the demos: var pdfDoc = null, pageNum = 1, pageRendering = false, pageNumPending = null, scale = 0.8, canvas = document.getElementById('the-canvas'), ctx = canvas.getContext('2d'); /** * Get page info from document, resize canvas accordingly, and render page. * @param num Page number. */ function renderPage(num) { pageRendering = true; // Using promise to fetch the page pdfDoc.getPage(num).then(function(page) { var viewport = page.getViewport(scale); canvas.height = viewport.height; canvas.width = viewport.width; // Render PDF page into canvas context var renderContext = { canvasContext: ctx, viewport: viewport }; var renderTask = page.render(renderContext); // Wait for rendering to finish renderTask.promise.then(function () { pageRendering = false; if (pageNumPending !== null) { // New page rendering is pending renderPage(pageNumPending); pageNumPending = null; } }); }); // Update page counters document.getElementById('page_num').textContent = pageNum; } /** * If another page rendering in progress, waits until the rendering is * finised. Otherwise, executes rendering immediately. */ function queueRenderPage(num) { if (pageRendering) { pageNumPending = num; } else { renderPage(num); } } /** * Displays previous page. */ function onPrevPage() { if (pageNum &lt;= 1) { return; } pageNum--; queueRenderPage(pageNum); } document.getElementById('prev').addEventListener('click', onPrevPage); ... /** * Asynchronously downloads PDF. */ …
upvote count: 2
answers question: http://stackoverflow.com/q/26342743
score: 2

http://stackoverflow.com/comment/41280240
type: QuestionComment
has text: this looks rather promising, given how small scale my app actually is. Thank you, sir
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26284997

http://stackoverflow.com/q/26337163
tagged with: watermark
tagged with: html5-canvas
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 8
accepted answer: http://stackoverflow.com/a/26347070
tagged with: http://stackoverflow.com/tag/html
score: 8
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41348000
tagged with: overlay
has body: I have a camera video feed and a canvas. The canvas takes the image of the feed when user clicks Submit Submit After user has clicked Submit, he can click Share to upload the picture. I want to be able to overlay another png on top of the image prior to user Submitting the 1st snap by clicking on share button. JS for uploading pic: function uploadEx() { var canvas = document.getElementById("canvas"); var dataURL = canvas.toDataURL("image/png"); document.getElementById('hidden_data').value = dataURL; var fd = new FormData(document.forms["form1"]); var xhr = new XMLHttpRequest(); xhr.open('POST', 'uploadscript.php', true); xhr.upload.onprogress = function(e) { if (e.lengthComputable) { var percentComplete = (e.loaded / e.total) * 100; console.log(percentComplete + '% uploaded'); alert('Image uploaded'); } }; xhr.onload = function() { }; xhr.send(fd); }; How do I overlay a 2nd image on top (like watermark) when uploading?
type: Question
has title: How to add a watermark to a canvas that already has an image?
has answer: http://stackoverflow.com/a/26347070
tagged with: javascript

http://stackoverflow.com/a/26300909
type: Answer
answers question: http://stackoverflow.com/q/26297935
has comment: http://stackoverflow.com/comment/43085021
has body: many thanks for your answer. I've plugged in your code into the JavaScript and ticked a few of the checkboxes on the form. When the code runs I get the first prompt message, but not the message box with a the value of valString ?. It's obviously something I'm doing wrong - as I said I'm a complete novice and struggling to get to grips with this system I seem to have inherited (not through choice!) Current code looks like this, and any pointers to my latest mistake would be much appreciated function batch_move() { var combo = document.getElementById("cbo_title"); var move_to = combo.options[combo.selectedIndex].text; var move_to_id = combo.options[combo.selectedIndex].value; if (move_to.length==0) { alert("Please select the location you want to move the costumes to."); return; } var resp_move = confirm("Are you sure you want to MOVE the selected costumes to "+move_to+" ?"); var valString = ""; var list = document.querySelectorAll('input[type ="checkbox"]'); for(var node in list) { if(list[node].checked) { valString += list[node].name + ','; } } alert(valString); if (resp_move==true) { alert("Lets move em"); window.open ("http://path-to-server/costume/batch-move-costume.php?loc="+move_to_id+"&amp;items=2,3,4,5","mywindow","menubar=1,resizable=1,width=350,height=250"); } }
score: 0

http://stackoverflow.com/a/26222198
type: Answer
answers question: http://stackoverflow.com/q/26205143
score: 0
has body: Have you tried appending to document.body instead of document.head? ...Tom

http://stackoverflow.com/comment/41095209
type: Comment
comment on: http://stackoverflow.com/a/26205965
score: 0
type: AnswerComment
has text: @PrakashWadhwani Update your question with an appropriate test case.

loops
tags question: http://stackoverflow.com/q/26237578
tags question: http://stackoverflow.com/q/26257013
tags question: http://stackoverflow.com/q/26253858
tags question: http://stackoverflow.com/q/26340746
tags question: http://stackoverflow.com/q/26352841
tags question: http://stackoverflow.com/q/26235544
tags question: http://stackoverflow.com/q/26225764
tags question: http://stackoverflow.com/q/26346924
tags question: http://stackoverflow.com/q/26352960
type: Tag
tags question: http://stackoverflow.com/q/26258427
tags question: http://stackoverflow.com/q/26262356
tags question: http://stackoverflow.com/q/26214393
tag name: loops
tags question: http://stackoverflow.com/q/26337613
tags question: http://stackoverflow.com/q/26301252
tags question: http://stackoverflow.com/q/26236600
tags question: http://stackoverflow.com/q/26351853
tags question: http://stackoverflow.com/q/26203027

http://stackoverflow.com/a/26277129
has comment: http://stackoverflow.com/comment/41226999
upvote count: 1
answers question: http://stackoverflow.com/q/26277049
downvote count: 0
type: Answer
has body: Yes. Within the JSNI for myFIRSTJsniMethod(), use the normal JSNI syntax for calling a Java method. For example, if these two methods are in the class com.mycompany.Test, you could call mySECONDJsniMethod() like so: public native JavaScriptObject myFIRSTJsniMethod(String name) /*-{ var secondVar = this.@com.mycompany.Test::mySECONDJsniMethod(Ljava/lang/String;)(name); //.. return firstVar; }-*/; See the GWT documentation on Accessing Java Methods and Fields from JavaScript for more information. EDIT: Here is a complete compilable example: package com.mycompany.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.JavaScriptObject; public class SO26277049 implements EntryPoint { @Override public void onModuleLoad() { final JavaScriptObject firstVar = myFIRSTJsniMethod("hello world!"); } public native JavaScriptObject mySECONDJsniMethod(String name) /*-{ var secondVar = { name: name }; return secondVar; }-*/; public native JavaScriptObject myFIRSTJsniMethod(String name) /*-{ var secondVar = this.@com.mycompany.client.SO26277049::mySECONDJsniMethod(Ljava/lang/String;)(name); $wnd.alert(secondVar.name); var firstVar = secondVar; return firstVar; }-*/; }
has comment: http://stackoverflow.com/comment/41227340
score: 1

http://stackoverflow.com/q/26334773
score: -1
has body: Do you guys know of a method to convert a base64 string to a PNG with javascript. I basically want to display it in a website. Example string: "imageData": "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAC9JREFUOI1jYaAyYKGdgYse/6fIpDhZRlQDqQRGDRw1cNTAUQPpbSC0PKOegVQCADCrA81JwUxoAAAAAElFTkSuQmCC"
downvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/41332946
upvote count: 1
has answer: http://stackoverflow.com/a/26334817
has comment: http://stackoverflow.com/comment/41349589
favorite count: 0
linked to: http://stackoverflow.com/q/16968945
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/png
has comment: http://stackoverflow.com/comment/41445316
has answer: http://stackoverflow.com/a/26334895
has title: Base64 to PNG with JS
type: Question
tagged with: javascript
tagged with: base64

http://stackoverflow.com/comment/41352820
has text: I should've specified this, the server has to do quite a bit of work to generate the response, it isn't a static page by any means. I'd prefer not to hit it twice. Sometimes the page can take 15 seconds just to generate (hence the need for a progress bar haha).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26345522
score: 0

http://stackoverflow.com/comment/41099497
type: Comment
type: QuestionComment
has text: @BojanPetkovski you do not understand, what I meant is that he used conditions within the "CASE" and not within the "SWITCH", ie used in the wrong way "cases", so everyone will ALWAYS "boolean"
score: 0
comment on: http://stackoverflow.com/q/26207772

http://stackoverflow.com/a/26316174
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26315732
has body: You are trying to assign $scope.symbols to $scope.options.symbols or Options.symbols before the symbols array exists in the object returned by the Options service, so it ($scope.symbols) is assigned undefined rather than a reference to the symbols object. You can see this by adding a couple console statements before you attempt the assignments. Since the symbols object doesn't yet exist, your $scope.symbols variable can't reference it. This isn't a problem with people or cities because you're accessing them through the $scope.options object which references the Opt object returned by the Options service. Since the base reference remains constant, your ng-repeats see changes to the people and cities children objects. If you really want to assign Options.symbols to $scope.symbols, you could accomplish it with a watch on $scope.options.symbols: $scope.$watch('options.symbols', function(value) { $scope.symbols = value; }); Edit after the example plunker was updated The revised plunker still exhibits the same behavior because the initialized people, cities, and symbols are being overwritten in the $timeout. If you want to keep the reference the same you must not use the = operator in the $timeout. One option would be to iterate through the returned list and add each item with a push: $timeout(function () { results = [ {name: "Pi", descr: "circles"}, {name: "Phi", descr: "ratios"}, {name: "Psi", descr: "waves"}, {name: "Chi", descr: "distributions"} ]; angular.forEach(results, function(result) { Opt.symbols.push(result); }); }, 2000); Here is a revised plunker with my suggested changes. There may be better ways to accomplish this, but the key point is you can not reassign Opt.symbols to some other object (even if that other object is also an array). Another approach would be to change Opt.symbols to be an object with an array inside it, your reference $scope.symbols points to the object (Opt.symbols) and can look at the internal values. Opt = { people: [], symbols: {}, ci…
answers question: http://stackoverflow.com/q/26315732
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41300399
type: Answer
has comment: http://stackoverflow.com/comment/41300025
has comment: http://stackoverflow.com/comment/41305618

http://stackoverflow.com/a/26272025
downvote count: 0
score: 1
has body: This is not json format ["23", "19"] e.g this is an array var d3data = ["23", "19"]; $('#donut').data('donut', d3data[0]); $('#donut1').data('donut',d3data[1]);
has comment: http://stackoverflow.com/comment/41218866
has comment: http://stackoverflow.com/comment/41218621
answers question: http://stackoverflow.com/q/26271783
upvote count: 1
has comment: http://stackoverflow.com/comment/41219120
has comment: http://stackoverflow.com/comment/41219628
type: Answer

http://stackoverflow.com/q/26307734
answer count: 2
has answer: http://stackoverflow.com/a/26319444
tagged with: ios
tagged with: javascript
tagged with: notifications
tagged with: android
downvote count: 1
has answer: http://stackoverflow.com/a/26368495
favorite count: 0
upvote count: 0
has body: Hello everyone I know this has probably has been asked a lot and I have tried to search but can't find the answers I'm looking for. I'm trying to build a application for Android and iOS where the user can download the app and once its downloaded everytime there is a new article on the blog it will give the user a notification and when they click on the notification it will take them to the browser of their choice and to the blog article on the web. I was just wondering what the best way to do this is without having to use a third party. Basically in a nut shell, just a application that syncs up with the RSS evey so often and if there is a new article it would give them a notification that links to the new blog article on the web. as for the actual visual of the app i was just going to put some information and maybe what time intervals to sync with the RSS. If any of this didn't make since please tell me and ill try to explain it better. Thanks everyone for the help in advance, Zach
tagged with: rss
type: UnansweredQuestion
has title: RSS Notification Android Application
score: -1
type: Question

http://stackoverflow.com/comment/53509854
score: 0
type: Comment
has text: let appState = { func: function() { // blah blah blah } };
type: AnswerComment
comment on: http://stackoverflow.com/a/29977213

http://stackoverflow.com/comment/41307350
type: QuestionComment
has text: What browser did you test with? In Chrome and IE 11, the array literal is consistently faster when testing in jsfiddle.
comment on: http://stackoverflow.com/q/26321028
score: 0
type: Comment

http://stackoverflow.com/comment/41145721
type: AnswerComment
has text: What was wrong with my fiddle?? Both the fiddles looks like twins. @panther
score: 0
comment on: http://stackoverflow.com/a/26233000
type: Comment

http://stackoverflow.com/comment/41217674
type: Comment
has text: Hi Abdul, Thanks for your response. Actually i have looked Google CryptoJS already. My concern here is, all the algorithm Google provides, gives the long has value (like 16, 32 and so on). Since it is promo code feature, I need it readable random (like 5 to 10 characters). Can you understand my point?
comment on: http://stackoverflow.com/a/26271769
score: 0
type: AnswerComment

http://stackoverflow.com/a/26312604
downvote count: 0
answers question: http://stackoverflow.com/q/26311943
upvote count: 2
type: Answer
has body: This will be slow in any language. It's just especially noticeable in this case since it's blocking your UI. JavaScript engines execute a single threaded event loop. You can always use web workers to execute slow processing tasks in the background.
score: 2

http://stackoverflow.com/a/26261445
accepted answer of: http://stackoverflow.com/q/26261238
answers question: http://stackoverflow.com/q/26261238
score: 0
type: AcceptedAnswer
has body: myApp.config(function($routeProvider) { $routeProvider. when('/', { controller: 'handleCtrl', templateUrl: 'handler.html' }). when('/chat', { controller: 'MyController', templateUrl: 'chat.html' }). when('/login', { controller: 'loginCtrl', templateUrl: 'login.html' }). otherwise({ redirectTo: '/handler' }); }); The $routeProvider.when() method in the above code actually creates a route with the given configuration. And the three .when()'s are creating three different routes. But in your $routeProvider.otherwise('/handler'), you are telling angular to go to a route called /handler if the user tries to navigate anywhere outside the configured routes. The mistake you are doing here is, you did not define a route at /handler. So you need to first define that route and then use it in .otherwise(). Try changing your configuration to reflect the below. myApp.config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider. when('/handler', { controller: 'handleCtrl', templateUrl: 'handler.html' }). when('/chat', { controller: 'MyController', templateUrl: 'chat.html' }). when('/login', { controller: 'loginCtrl', templateUrl: 'login.html' }). otherwise({ redirectTo: '/handler' }); });
has comment: http://stackoverflow.com/comment/41198243
type: Answer
has comment: http://stackoverflow.com/comment/41198950

http://stackoverflow.com/a/26331382
has body: Change getFooOldSchool: function(callback) { to getFooOldSchool: function(successCallback, errorCallback) { $http.get(...).success(successCallback).error(errorCallback); and pass in two handlers: mainInfo.getFooOldSchool(function(data){ ...success callback }, function(data){ ...error callback });
type: AcceptedAnswer
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26331251
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26331251
score: 1

http://stackoverflow.com/comment/41193732
has text: **Never** ever pass strings to `setTimeout`. Pass a function!
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26257871

http://stackoverflow.com/q/26226017
has comment: http://stackoverflow.com/comment/41134009
has comment: http://stackoverflow.com/comment/41134076
tagged with: javascript
has title: How do you handle routing in a Node + Ember application?
linked to: http://stackoverflow.com/q/24835493
has comment: http://stackoverflow.com/comment/41133857
has body: I have a Node + Ember application. I ran into an issue around routes. Both Node and Ember handle routes and I have some routes that I would like Node to handle but some, I want Ember to handle. For instance, when the page loads, Node's router kicks in so any route I declare in Ember is useless. Assume that I have a route called 'settings' in Ember JS. When I navigate to 'http://myapp.com/settings' by using the {{#link-to}} helper from another view in Ember, I can see the page. However, once I am on that page and hit reload, I get a 404 because Node's router is called and that route is not declared in Node. How do I resolve this?
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26237834
has comment: http://stackoverflow.com/comment/41133874
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
has comment: http://stackoverflow.com/comment/41133783
tagged with: node.js
has comment: http://stackoverflow.com/comment/41133725
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/26259954
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31281166
has title: NVD3 Cumulative line chart displays wrong y values
has body: I have converted a line chart into a cumulative line chart and its y values are not displayed correctly. The range of the y axis should be 80.00 - 140.00 but instead I get -0.08 - 0.20. Has anyone managed to tweak their normalization code below to make it work with all kinds of ranges? line.values = line.values.map(function(point, pointIndex) { point.display = { 'y': (lines.y()(point, pointIndex) - v) / (1 + v) }; return point; }) Any help will be greatly appreciated.
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26267883
tagged with: javascript
score: 0
tagged with: nvd3.js

http://stackoverflow.com/q/26294575
has title: Rails 4: Turbolinks sends request twice and reloads the page
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26565572
upvote count: 3
type: Question
score: 3
tagged with: javascript
answer count: 2
has body: I am working on on a Ruby on Rails application using Rails 4.1.1 and Ruby 2.1.0. I have set up the app to use Turbolinks, which is causing an issue with AJAX links. When I click on a link that calls an AJAX function three things happen: 1. The AJAX call is made 2. The same link is reloaded 3. The application server runs all the requests twice. How can I make these links function as standard AJAX links? For reference, here is the relevant portion of my GemFile: gem 'turbolinks' gem 'jquery-turbolinks' Here is how I included the JavaScript libraries in application.js: //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require turbolinks And here is how I included the JavaScript files in the application layout: &lt;%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt; &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;
tagged with: turbolinks
downvote count: 0
has answer: http://stackoverflow.com/a/28079565
tagged with: ruby-on-rails-4.1
favorite count: 0
tagged with: ajax
tagged with: ruby

http://stackoverflow.com/q/26219212
has comment: http://stackoverflow.com/comment/41119866
type: Question
has comment: http://stackoverflow.com/comment/41120776
has body: I read a JavaScript book and it gives you a piece of code to run but when I do I don't get anything. It runs but displays nothing. var theNumber = Number(prompt("Pick a number", "")); alert("Your number is the square root of " + theNumber * theNumber); I'm running this piece of code inside a Harp project, where _layout.jade looks like: doctype html head link(rel="stylesheet" href="/main.css") body != yield &lt;script src="main.js" type="text/javascript"&gt;&lt;/script&gt; and main.js var theNumber = Number(prompt("Pick a number", "")); alert("Your number is the square root of " + theNumber * theNumber); I know that configuration is ok because I've been running another pieces of code before that one. Google Chrome runs the code but doesn't displays any window. I thought it could be adPause but it wasn't. Anyone knows what could it be happening? Thanks
score: -2
has comment: http://stackoverflow.com/comment/41119982
answer count: 1
has comment: http://stackoverflow.com/comment/41121530
tagged with: javascript
has comment: http://stackoverflow.com/comment/41120348
has comment: http://stackoverflow.com/comment/41119871
has title: Why hasn't effects this piece of JavaScript code?
favorite count: 0
has comment: http://stackoverflow.com/comment/41119922
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26219402
has comment: http://stackoverflow.com/comment/41120995
has comment: http://stackoverflow.com/comment/41119901
downvote count: 3

http://stackoverflow.com/q/26254495
has title: using lightbox on webpage with the same js code multiple times
has comment: http://stackoverflow.com/comment/41185143
has answer: http://stackoverflow.com/a/26254605
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I'm using a really great lightbox script from osvaldas.info. With this script the following html code is needed: The next gallery on the page would be used with data-imagelightbox="b" or something like that. At the end of my HTML File I have to define this gallery like the following: var selector = 'a[data-imagelightbox="a"]'; var lightbox = $( selector ).imageLightbox( { quitOnDocClick: false, onStart: function() { overlayOn(); closeButtonOn( lightbox ); arrowsOn( lightbox, selector ); }, onEnd: function() { overlayOff(); closeButtonOff(); arrowsOff(); }, onLoadStart: function() { }, onLoadEnd: function() { $( '.imagelightbox-arrow' ).css( 'display', 'block' ); } }); This works really great so far, but I don't know what to do if I have an unknown number of gallery's on my page. The html output is generated from an database. Is it possible to change the js-code so that it always work if there is a data-imagelightbox="" parameter? I don't want to repeat the js Code at the bottom of my html page multiple times, just for changing one letter. Thanks
type: UnansweredQuestion

http://stackoverflow.com/q/26264653
has title: why can't I add a method to window.external object in Internet Explorer but working on other browsers
answer count: 1
has comment: http://stackoverflow.com/comment/41205163
tagged with: javascript
tagged with: external
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/37268091
downvote count: 0
has body: The following javascript code is working on both Chrome and Firefox but not working on Internet Explorer. window.external.vals = function(){alert("asdf");} I have tried on the respective console, every other browser is working appropriately but IE throws the following error "Object doesn't support this property or method" Any idea ?
score: 6
type: Question
tagged with: internet-explorer
upvote count: 6

http://stackoverflow.com/a/26229347
answers question: http://stackoverflow.com/q/26229257
has body: www.google.com and other sites use a X-Frame-Options HTTP header that specifies that embedding is only allowed from the same origin: x-frame-options:SAMEORIGIN Browsers respect this header and prevent you from embedding the site
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26229257

http://stackoverflow.com/comment/41308186
has text: What is undefined? You can learn more about functions in a JavaScript tutorial: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26321495

http://stackoverflow.com/comment/41344015
type: QuestionComment
has text: `#showEntity` has no content, no width, no height ---> no `hover` possible.
comment on: http://stackoverflow.com/q/26340375
score: 0
type: Comment

http://stackoverflow.com/comment/41226865
type: AnswerComment
score: 0
type: Comment
has text: what is your output from "netstat -tulpn | grep :80" enter this into the ssh console
comment on: http://stackoverflow.com/a/26277194

http://stackoverflow.com/q/26220137
has comment: http://stackoverflow.com/comment/41121966
has comment: http://stackoverflow.com/comment/41123410
has comment: http://stackoverflow.com/comment/41121915
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41121825
has answer: http://stackoverflow.com/a/26220177
accepted answer: http://stackoverflow.com/a/26220177
has comment: http://stackoverflow.com/comment/41122418
has title: X's Replaces O's
downvote count: 3
has comment: http://stackoverflow.com/comment/41122217
favorite count: 0
has comment: http://stackoverflow.com/comment/41123966
has comment: http://stackoverflow.com/comment/41121999
score: -3
tagged with: tic-tac-toe
has comment: http://stackoverflow.com/comment/41121852
type: AnsweredQuestion
upvote count: 0
has body: i'm making the tic tac toe game and im trying to fix a bug that i have now. When i play the game and i click on the O's it changes to X how can i fix this? I thought it would be something like: If (turn == 0 &amp;&amp; ('td') == "") { But that doesn't work var newGame = function () { $('td').one('click', function (event) { if (turn == 0) { $(this).text(human); boardCheck(); checkWin(); turn == 1; compMove(); boardCheck(); checkWin(); } }); }; // VARIABLES var human = 'x'; // turn = 0 var computer = 'o'; // turn = 1 var compMove; var turn = 0; // toggles btw 0 and 1 for switching turns var boardCheck; // function to check value in each cell var a1; // value within each cell var a2; var a3; var b1; var b2; var b3; var c1; var c2; var c3; var checkWin; // function that checks the board for winning combo var xWin = false; // true if X wins var oWin = false; // true if O wins var winAlert; // function that declares winner and restarts game var newGame; var clearBoard; // PLACES AN X OR O IN THE BOX WHEN CLICKED. TOGGLES. var newGame = function () { $('td').one('click', function (event) { if (turn == 0) { $(this).text(human); boardCheck(); checkWin(); turn == 1; compMove(); boardCheck(); checkWin(); } }); }; // INITIALIZES GAME - keep after var newGame $(document).ready(function () { newGame(); }); // COMP MOVE AI DETECTS IF THERE ARE TWO IN A ROW NEXT TO AN EMPTY CELL AND PLACES MOVE THERE var compMove = function () { if (a1 == "" &amp;&amp; ((a3 == "x" &amp;&amp; a2 == "x") || (c3 == "x" &amp;&amp; b2 == "x") || (c1 == "x" &amp;&amp; b1 == "x"))) { $('#a1').text("o"); turn = 0; } else { if (a2 == "" &amp;&amp; ((a1 == "x" &amp;&amp; a3 == "x") || (c2 == "x" &amp;&amp; b2 == "x"))) { $('#a2').text("o"); turn = 0; } else{ if (a3 == "" &amp;&amp; ((a1 == "x" &amp;&amp; a2 == "x") || (c1 == "x" &amp;&amp; b2 == "x") || (c3 == "x" &amp;&amp; b3 == "x"))) { $('#a3').text("o"); turn = 0; } else{ if (c3 == "" &amp;&amp; ((c1 == "x" &amp;&amp; c2 == "x") || (a1 == "x" &amp;&amp;…
has comment: http://stackoverflow.com/comment/41121993
has comment: http://stackoverflow.com/comment/41122702
type: Question

http://stackoverflow.com/q/26304528
has body: here is an example. function parentOne(){ //do something function ChildOne(){ // do something }; }; function parentTwo(){ //how can I input data into ChildOne() from here? }; I am trying to fix a bug. ParentTwo will only work once childOne has been hit. Thats because when childOne is hit in my code it starts the direction API. After that I can use parentTwo to change the to or from value in my form and it will submit. Its kinda hard to explain but I need parentTwo to init childOne if the user didnt do it through the parentOne function first. I know javascript but I have never tried this before and if seems kinda fishy to me.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26304651
has title: Javascript, Can I get to another functions child
has comment: http://stackoverflow.com/comment/41277603
possible better answer: http://stackoverflow.com/a/26304708
has comment: http://stackoverflow.com/comment/41277296
type: Question
tagged with: javascript
tagged with: parent-child
score: 0
answer count: 2
tagged with: nested
has comment: http://stackoverflow.com/comment/41277304
has answer: http://stackoverflow.com/a/26304651
has answer: http://stackoverflow.com/a/26304708

google-maps-api-3
tags question: http://stackoverflow.com/q/26337101
tags question: http://stackoverflow.com/q/26251275
tags question: http://stackoverflow.com/q/26294996
tags question: http://stackoverflow.com/q/26264759
tags question: http://stackoverflow.com/q/26283423
tags question: http://stackoverflow.com/q/26255253
tags question: http://stackoverflow.com/q/26259439
tags question: http://stackoverflow.com/q/26198934
tags question: http://stackoverflow.com/q/26330001
tags question: http://stackoverflow.com/q/26278864
tags question: http://stackoverflow.com/q/26258635
tags question: http://stackoverflow.com/q/26313986
tags question: http://stackoverflow.com/q/26240344
tags question: http://stackoverflow.com/q/26273575
tags question: http://stackoverflow.com/q/26345758
tags question: http://stackoverflow.com/q/26295797
tags question: http://stackoverflow.com/q/26319196
tags question: http://stackoverflow.com/q/26197073
tags question: http://stackoverflow.com/q/26280356
tags question: http://stackoverflow.com/q/26236687
tags question: http://stackoverflow.com/q/26283525
tags question: http://stackoverflow.com/q/26275566
tags question: http://stackoverflow.com/q/26239412
tags question: http://stackoverflow.com/q/26309309
tags question: http://stackoverflow.com/q/26277221
tags question: http://stackoverflow.com/q/26284461
tags question: http://stackoverflow.com/q/26308353
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/26338733
tags question: http://stackoverflow.com/q/26350558
tags question: http://stackoverflow.com/q/26209427
type: Tag
tags question: http://stackoverflow.com/q/26314206
tags question: http://stackoverflow.com/q/26268514
tags question: http://stackoverflow.com/q/26298346
tags question: http://stackoverflow.com/q/26311336
tags question: http://stackoverflow.com/q/26317161
tags question: http://stackoverflow.com/q/26346076
tags question: http://stackoverflow.com/q/26331994
tags question: http://stackoverflow.com/q/26316227
tags question: http://stackoverflow.com/q/26213540
tags question: http://stackoverflow.com/q/26210904
tags question: http://stackoverflow.com/q/26338704
tags question: http://stackoverflow.com/q/26318272

http://stackoverflow.com/q/26244369
tagged with: javascript
score: 0
has title: How can we perform automated tests on Chrome packaged apps (ex. Chromebook apps) using InternJS
tagged with: android
has answer: http://stackoverflow.com/a/26244715
has body: I need to automate tests for Chrome packaged App &amp; Android App on Chromebook and Nexus 10 respectively. I'm using InternJS to write automate tests for browser version of the app in Chrome. Can InternJS automate the tests for Chrome Packaged App and Android Apps? Thanks for the help in advance.
type: UnansweredQuestion
tagged with: google-chrome
type: Question
tagged with: chromebook
answer count: 1
tagged with: intern

http://stackoverflow.com/a/26285187
has comment: http://stackoverflow.com/comment/41241994
has comment: http://stackoverflow.com/comment/41241878
answers question: http://stackoverflow.com/q/26285098
has comment: http://stackoverflow.com/comment/41242189
has comment: http://stackoverflow.com/comment/41242244
downvote count: 4
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41242188
type: Answer
has comment: http://stackoverflow.com/comment/41242227
has comment: http://stackoverflow.com/comment/41241974
accepted answer of: http://stackoverflow.com/q/26285098
score: -4
has body: Below is the code that I came up with to solve this naively. Please feel free to ask questions as to why it works or what could be done to improve it. var calculate = function () { var arg1 = arguments[0]; if (arguments.length === 2) { return arg1 + arguments[1]; } if (arguments.length === 1) { return function (secondNum) { return secondNum + arg1; } } } As you can see, there are a few concepts at work in this function. The arguments array is available inside any JavaScript function. It allows you to examine all the arguments that were passed into the function. As you can see, I first check if we have 2 arguments, that clues me in to the fact that I should add them together. In the second case, I only got one argument, so I'll return a function that will help me accomplish the function(x)(y) case.
has comment: http://stackoverflow.com/comment/41242313
has comment: http://stackoverflow.com/comment/41241943
has comment: http://stackoverflow.com/comment/41242200

http://stackoverflow.com/q/26301106
has comment: http://stackoverflow.com/comment/41271021
downvote count: 0
answer count: 1
has body: Can someone explain me how this function works? I know the ternary operator, so I understand the part, that he checks if flag is true, and if not then use the 2. value. But I don't understand why flag is a Boolean in the first place and why it switches from true to false and vice versa when animate() is being called... flag = $texte.data('animToggle'); $texte.data('animToggle', !flag); $texte.animate({ 'left': flag ? '-51%' : '0' })
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41270999
has comment: http://stackoverflow.com/comment/41271036
has title: How does this function work in particular?
accepted answer: http://stackoverflow.com/a/26301211
has comment: http://stackoverflow.com/comment/41271048
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41270951
type: Question
has answer: http://stackoverflow.com/a/26301211

http://stackoverflow.com/q/26233271
type: AnsweredQuestion
tagged with: base64
answer count: 1
tagged with: javascript
has body: I am encoding an image using a function that uses a canvas element to encode an image to base64. Then I try to post the Base64 string through AJAX to my php ajax_controller: function submitParticipation(name,email,phone,city) { encodeImage(uploadedImg, function(encodedImage) { uploadedImg = encodedImage; }); var ajax = new XMLHttpRequest(); var params = 'uid='+ facebookUserId + '&amp;name=' + name + '&amp;email=' + email + '&amp;phone=' + phone + '&amp;city=' + city + '&amp;img_string=' + base64Img + '&amp;facebook_name=' + facebookUserFullName + '&amp;facebook_pic=' + facebookProfilePic + '&amp;facebook_email=' + facebookUserEmail; ajax.open("POST", "main_ajax_controller.php?m=store_participation", true); ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajax.send(params); ajax.onreadystatechange = function() { if (ajax.readyState == 4 &amp;&amp; ajax.status == 200) { var response = ajax.responseText; } //If an error occur during the ajax call. if (ajax.readyState == 4 &amp;&amp; ajax.status == 404) { } } } The base64Img though does not go through the AJAX call - it goes through empty. Any idea why? The base64Img variable is defined just fine - I can see this because I log it in the console right before defining it in the params variable of the Ajax call.
has answer: http://stackoverflow.com/a/26233365
accepted answer: http://stackoverflow.com/a/26233365
tagged with: ajax
score: 0
has title: Vanilla JS Ajax and base64img issue
type: Question

http://stackoverflow.com/comment/41323162
type: QuestionComment
comment on: http://stackoverflow.com/q/26329615
type: Comment
score: 2
has text: the "concept" is called "click outside"... http://stackoverflow.com/q/152975/104380

http://stackoverflow.com/a/26213820
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26213628
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26213628
has body: You can only do this sort of thing at current in MongoDB with mapReduce. The reason is that is is presently the only place that can hold a "global" variable, and that is basically what you need for a "running total": db.collection.mapReduce( function(){ totals += this.a; emit(this._id, {"a": this.a, "cs": totals}); }, function() {}, // nothing to reduce here { "out": { "inline": 1 }, "scope": { "totals": 0 } } ); So there is "no actual grouping here", but you could do so if you wanted to. The point is that this maintains a "running total" per record, which is what you seem to be asking. The "mapReduce" command has an aspect called "scope" used here to implement a "global" variable that can be used for such a task.
score: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26257368
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: &lt;input type="text" name="from" id ="from"&gt; Call example: var request = $.ajax({ url: "file.php", type: "POST", data: { email : $('#from').val() } }); request.done(function( msg ) { //handle HTML }); request.fail(function( jqXHR, textStatus ) { //Handle problem at server side }); PHP Side &lt;?php $email = $_POST["email"] function spamcheck($field) { // Sanitize e-mail address $field=filter_var($field, FILTER_SANITIZE_EMAIL); // Validate e-mail address if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return 'valid'; } else { return 'no_valid'; } } echo spamcheck($email);
answers question: http://stackoverflow.com/q/26257230
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26257230
has comment: http://stackoverflow.com/comment/41190353

http://stackoverflow.com/comment/61060136
comment on: http://stackoverflow.com/a/26318211
type: AnswerComment
score: 0
has text: `dijit/registry` is for objects inheriting from dijit widget. while `dojo/dom` is for DOM elements. This text box is an asp.net control, so I would not be able to access it through registry. The issue was when you navigate to a page that has login/password saved with autocomplete to where you just have to click a 'login' button, or when a password autocomplete feature is enabled on the browser, that it would get notified of the autocomplete filling in the password.
type: Comment

http://stackoverflow.com/q/26255824
has body: I have created an application using ng-table , the application is workign fine but when i wrote a jasmine test case i am getting. Error: [$injector:unpr] Unknown provider: TableParamsProvider Can anyone please tell me how to mock the ngTableParams and test its functionality My code is as given below jasmine test case describe('Testing Controllers', function() { describe('Testing WorkController Controller', function() { var WorkController, $scope; beforeEach(module('wsd.workstations')); beforeEach(inject(function($controller, $rootScope) { $scope = $rootScope.$new(); WorkController = $controller('WorkController', { $rootScope: $rootScope, $scope: $scope }); })); it('should searchDocuments when searchDocuments() is called', function() { $scope.searchDocuments(); }); }); }); script angular.module('wsd', ['restangular', 'ngTable', 'wsd.models', 'wsd.workstations', 'wsd.workperiods', 'ngRoute']) .config(function(RestangularProvider, $routeProvider) { RestangularProvider.setBaseUrl('/rest/myuser'); $routeProvider.when('/wd', { templateUrl: 'main/workstation/main.tpl.html', controller: 'WorkController', resolve: { myWorkDocuments: function(Documents) { return Documents.getWorkDocuments(); } } }).when('/wp', { templateUrl: 'main/workperiod/main.tpl.html', controller: 'PeriodController', resolve: { myWorkPeriods: function(Periods) { return Periods.getWorkPeriods(); } } }).otherwise({ redirectTo: '/wd' }); }); workstation/main.js angular.module('wsd.workstations', []) .controller('WorkController', function($rootScope, $scope, $filter, ngTableParams) { $scope.myValues = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", a…
tagged with: ngtable
has title: AngularJS - mocking ngTableParams in jasmine test case
tagged with: javascript
has answer: http://stackoverflow.com/a/26298966
score: 6
tagged with: karma-jasmine
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26301572
downvote count: 0
tagged with: jasmine
favorite count: 0
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/26298966
answer count: 2
has answer: http://stackoverflow.com/a/26298912
upvote count: 6
possible better answer: http://stackoverflow.com/a/26298912

http://stackoverflow.com/q/26223976
type: Question
has comment: http://stackoverflow.com/comment/41144875
has title: Dojo's array.some isn't parsing the array?
tagged with: arrays
tagged with: javascript
score: 0
type: UnansweredQuestion
tagged with: dojo
answer count: 0
has body: array.some(resourceList, function (resource) { //stuff happens }, this); resourceList is [Object{...}] resource - doesn't exist //stuff happens doesn't happen What am I missing?
has comment: http://stackoverflow.com/comment/41129789

http://stackoverflow.com/q/26244876
has comment: http://stackoverflow.com/comment/41168903
has body: UPDATED CODE I have my code posted and Fiddle : http://jsfiddle.net/02kcmzzn/ I updated my code thanks to some of your help, I appreciate it a lot. I want to know how can I close the station_info div when it is being clicked again because it disapears if I refresh the page only. CSS: body { margin:0px auto; width:80%; height:80%; } #map_size { width:1190px; height:1300px; background:#0099FF; border-style: solid; border-color: black; position: relative; } #desk_box { width: 23px; height: 10px; border: 4px solid black; padding:10px; } #station_info { display: none; width:150px; height:150px; border:4px solid black; background-color:white; } JS: PHP while($row = mysqli_fetch_assoc($coord_result)){ //naming X,Y values $id = $row['coordinate_id']; $x_pos = $row['x_coord']; $y_pos = $row['y_coord']; //draw a box with a DIV at its X,Y coord echo " id:".$id." "; echo " Hello the id is:".$id." Section:".$sec_name." "; }//end while loop
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
answer count: 4
linked to: http://stackoverflow.com/q/992115
has answer: http://stackoverflow.com/a/26249955
score: 1
has comment: http://stackoverflow.com/comment/41168429
upvote count: 1
has comment: http://stackoverflow.com/comment/41168678
has comment: http://stackoverflow.com/comment/41168639
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26245503
has answer: http://stackoverflow.com/a/26245224
has comment: http://stackoverflow.com/comment/41168510
tagged with: javascript
has title: How can I use JQuery toggle for multile DIVs?
has comment: http://stackoverflow.com/comment/41182409
accepted answer: http://stackoverflow.com/a/26249955
possible better answer: http://stackoverflow.com/a/26245224
has comment: http://stackoverflow.com/comment/41242073
type: Question
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26245570
has comment: http://stackoverflow.com/comment/41182434
favorite count: 0

http://stackoverflow.com/comment/41346269
type: Comment
comment on: http://stackoverflow.com/q/26341294
score: 3
has text: [Ajax can't be used to download a file.](http://stackoverflow.com/a/9970672/978961)
type: QuestionComment

http://stackoverflow.com/a/26343371
score: 1
answers question: http://stackoverflow.com/q/26225826
has body: Sorry if this seems like too simple of a thing to try, but since Node and Express are both JavaScript, have you tried simply using decodeURIComponent('punk’d')? It looks to me that it's simply a standard encoded URI. I think you're getting that weird output from iconv because you're converting from the wrong encoding.
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41356547
has comment: http://stackoverflow.com/comment/41356687
has comment: http://stackoverflow.com/comment/41361379
has comment: http://stackoverflow.com/comment/41356720
has comment: http://stackoverflow.com/comment/41361274
downvote count: 0

http://stackoverflow.com/comment/41171077
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26245820
score: 0
has text: I'm guessing this is a timing issue. The page expression {{...}} is getting evaluated prior to secondsToAnswer getting set. Try making secondsToAnswer a function that returns the value you are interested in.

http://stackoverflow.com/q/26282001
has title: Submit Additional Form Data without setting formData
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: jquery-file-upload
has body: I am following How-to-submit-additional-form-data and have a working fileupload that is submitting the additional form data, ie. the additional textarea input field, description[], with chunking and multiple file support without setting formData:{ } on .fileupload(). My problem is that I am only able to submit the field as an array, description[], and I am unable to come up with some logic to associate the appropriate description[i] with the appropriate file. I am using asp.net mvc which should not matter in this case. The View: &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#btnContinue').prop('disabled', true); $('#fileupload').fileupload({ url: '@Url.Action("UploadChunk", "Upload")', maxChunkSize: 1048576, }).addClass('fileupload-processing') .bind('fileuploadalways', function (e, data) { if ($('#fileIds').val().indexOf(';' + data.result.id + ';') == -1) { var pre = $('#fileIds').val() == "" ? ';' : ''; var append = $('#fileIds').val() + pre + data.result.id + ';'; $('#fileIds').val(append); } }) .bind('fileuploaddone', function (e, data) { $('#btnContinue').prop('disabled', false); }); $.ajax({ url: $('#fileupload').fileupload('option', 'url'), dataType: 'json', context: $('#fileupload')[0] }).always(function () { $(this).removeClass('fileupload-processing'); }); }); &lt;/script&gt; @using (Html.BeginForm("FileSet", "Upload", FormMethod.Post, new { id = "fileupload" } )) { @Html.AntiForgeryToken() @Html.Hidden("fileIds", "", new { @id = "fileIds" }) &lt;div class="form-horizontal"&gt; &lt;hr /&gt; @Html.ValidationSummary(true, "", new { @class = "text-danger" }) &lt;div class="row fileupload-buttonbar"&gt; &lt;div class="col-lg-7"&gt; &lt;!-- The fileinput-button span is used to style the file input field as button --&gt; &lt;span class="btn btn-success fileinput-button"&gt; &lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; &lt;span&gt;Add files...&lt;/span&gt; &lt;input type="file" name="files[]" multiple&gt; &lt;/span&gt; &lt;butto…
has answer: http://stackoverflow.com/a/26438572
type: UnansweredQuestion
upvote count: 3
tagged with: multiple-file-upload
type: Question
tagged with: chunked-encoding
score: 3

http://stackoverflow.com/comment/41180087
type: AnswerComment
has text: Include the html and javascript from your form page to your question please
type: Comment
comment on: http://stackoverflow.com/a/26250757
score: 0

http://stackoverflow.com/q/26284612
tagged with: javascript
upvote count: 3
downvote count: 1
answer count: 1
favorite count: 0
has body: The goal is to find if any combination of integers in the array equal the largest integer in the array. function ArrayAdditionI(arr) { arr.sort(function(a,b){ return a - b; }); var largest = arr.pop(); function recursion(target,array){ if(array.length === 0){ return target === 0; } var n = array[0]; array = array.slice(1); return recursion(target,array) || recursion(target - n, array); } return recursion(largest,arr); } This solution seems to works but I cannot follow it. At the bottom of the recursion function when it reaches the right side of the OR operator I would think it would almost always return false, however it continues recursing. Can someone explain?
has answer: http://stackoverflow.com/a/26285066
accepted answer: http://stackoverflow.com/a/26285066
score: 2
type: AnsweredQuestion
tagged with: subset
has title: JavaScript Recursion
type: Question
tagged with: recursion
tagged with: sum

http://stackoverflow.com/comment/41263518
comment on: http://stackoverflow.com/a/26297120
has text: can u please refer my jsfiddle.. I see an error here, they all launch as minus's and when you click on it turns into the propper icon it should be
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41328358
comment on: http://stackoverflow.com/q/26332189
has text: When you want to run JS on an ASP file, you have to look at what the actual generated HTML is when it gets to the browser because that's what the JS operates on. View/Source in the browser is your friend here to see the actual HTML.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41327571
type: Comment
comment on: http://stackoverflow.com/a/26331931
score: 0
type: AnswerComment
has text: "was" as in "no longer", or as in "how it got the way it is now" ?

http://stackoverflow.com/comment/41310614
has text: You're creating a regexp and setting it equal to a boolean value giving the result of password validation, then trying to use that regexp to test against email, so it's not surprising it's not working.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26322921

http://stackoverflow.com/comment/41349689
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26343774
has text: @Toontje, you're welcome. You wanted "eager" validation, where "lazy" validation is this plugin's default. See my edits.
score: 0

http://stackoverflow.com/comment/41102516
has text: huh? submitting by ajax. php redirect doesn't make sense
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26209799
score: 0

datetimepicker
type: Tag
tag name: datetimepicker
tags question: http://stackoverflow.com/q/26197304

http://stackoverflow.com/comment/41313836
score: 0
type: AnswerComment
type: Comment
has text: Hey Mixerman123, one more question if you don't mind. How do I make it stop? On mouse down it's moving out of the screen and keeps going! Thanks for all your great, nicely done!
comment on: http://stackoverflow.com/a/26320495

http://stackoverflow.com/comment/41217045
has text: @isim Done. Still not working
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26271020

http://stackoverflow.com/a/26314102
downvote count: 0
has body: You can do this: var matrix1 = JSON.parse(matrix1string); var matrix2 = JSON.parse(matrix2string);
accepted answer of: http://stackoverflow.com/q/26314073
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41294276
answers question: http://stackoverflow.com/q/26314073
has comment: http://stackoverflow.com/comment/41315005
score: 1
has comment: http://stackoverflow.com/comment/41294322
has comment: http://stackoverflow.com/comment/41322232
has comment: http://stackoverflow.com/comment/41294312
type: AcceptedAnswer

http://stackoverflow.com/a/26306898
accepted answer of: http://stackoverflow.com/q/26306819
answers question: http://stackoverflow.com/q/26306819
has comment: http://stackoverflow.com/comment/41281708
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41282111
score: 0
downvote count: 1
type: Answer
has body: You can never modify the DOM before the page loads because at that point the DOM isn't ready. Any DOM manipulation should be done after onload event is fired.

http://stackoverflow.com/q/26271463
has answer: http://stackoverflow.com/a/26271524
has answer: http://stackoverflow.com/a/26271533
has comment: http://stackoverflow.com/comment/41217042
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26272207
has title: function to append in different type of calls
has comment: http://stackoverflow.com/comment/41216869
has body: i want to create a function that append the parameter values. The important thing is that it should accept the bellow given function calls concat('hello', 'world'); concat('hello')('world'); both of these should return "helloworld". How is that possible?
has comment: http://stackoverflow.com/comment/41216836
type: Question
possible better answer: http://stackoverflow.com/a/26271524
has comment: http://stackoverflow.com/comment/41216859
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41217163
has answer: http://stackoverflow.com/a/26271606
accepted answer: http://stackoverflow.com/a/26271606
tagged with: jquery
has comment: http://stackoverflow.com/comment/41217065

http://stackoverflow.com/comment/41111365
score: 1
comment on: http://stackoverflow.com/q/26214560
has text: I think this question should be moved to [Code Review Stack Exchange](http://codereview.stackexchange.com/)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41353119
has text: Edited, now it works if the array only contains strings.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26345780

http://stackoverflow.com/comment/41174921
comment on: http://stackoverflow.com/a/26242200
type: AnswerComment
score: 0
type: Comment
has text: Thanks, this worked perfectly. No nasty flicker, and I can style it with my PHP. yay!

http://stackoverflow.com/q/26348701
type: Question
has comment: http://stackoverflow.com/comment/41358628
tagged with: session
tagged with: javascript
has comment: http://stackoverflow.com/comment/41358411
has body: How can I reload a page without resetting the data stored in $_SESSION? I'm making AI for a Tic Tac Toe game, and when the AI chooses its move I need the page to update so the character can be placed on the board. echo " "; causes $_SESSION to be reset, it seems.
score: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41358365
has comment: http://stackoverflow.com/comment/41358364
has title: How to reload page without resetting $_SESSION?
answer count: 0
has comment: http://stackoverflow.com/comment/41358569

http://stackoverflow.com/comment/85067884
has text: This answer really does need updating to put the callback approach first, otherwise it's doing people a disservice. Perhaps I'll try another edit having had my attempt to underline the risks that @ChristopherCamps pointed out, reverted by the author.
comment on: http://stackoverflow.com/a/26254086
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41235653
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26281759
type: Comment
has text: @Dan O, I get the undefined on the mouseout.

http://stackoverflow.com/a/26331401
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26331325
accepted answer of: http://stackoverflow.com/q/26331325
type: Answer
downvote count: 0
score: 2
has comment: http://stackoverflow.com/comment/41326857
upvote count: 2
has body: I'd recommend using a regex for form input validation. Check examples below: shouldFailTooShort = 'ts'; shouldFailSpace = 'has space'; shouldPass = 'no-spaces'; validationRule = /^\S{3,}$/; validationRule.test(shouldFailTooShort) === false; validationRule.test(shouldFailSpace) === false; validationRule.test(shouldPass) === true; Using regular expressions one can have all validation against a field performed in one regular expression check, like presented above. For usability however I'd recommend having one rule for each validation requirement. Then different validation rules can produce different messages and user does not get confused having to read one and always same message. Have a peek on my favourite regular expression reference. Edit: As requested in comment, herein I present my proposal of deploying the solution. I suggest not using alert function in production, but display the message on the page itself, e.g. in a span element. HTML: First Name: Validate now JavaScript: validateForm = function () { return checkName(); } function checkName() { var x = document.myForm; var input = x.name.value; var errMsgHolder = document.getElementById('nameErrMsg'); if (input.length < 3) { errMsgHolder.innerHTML = 'Please enter a name with at least 3 letters'; return false; } else if (!(/^\S{3,}$/.test(input))) { errMsgHolder.innerHTML = 'Name cannot contain whitespace'; return false; } else { errMsgHolder.innerHTML = ''; return undefined; } } Check live example in jsfiddle.

http://stackoverflow.com/comment/41363356
comment on: http://stackoverflow.com/q/26350345
score: 0
has text: I don't get what you try to do? Are you trying to manipulate some library like jQuery? Because the original, default "onreadystatechange" property of the freshly constructed XMLHttpRequest instance is null and it can be redefined by libraries to whatever they want, including making it unwritable and unconfigurable
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41247448
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26287859
has text: Not that I'm aware of, but what really happens with `ajax` callbacks (or `setTimeout`, or any other 'asynchronous logic') is that when it fires it is added to the event queue, then executed once the event loop gets to that spot. So rather than representing it visually via control flow you might instead draw a representation of the event queue and have things feeding it. Note that this is slightly different than concurrency and very different than parallel threads.
score: 0

http://stackoverflow.com/q/26343449
has comment: http://stackoverflow.com/comment/41348872
score: 0
has comment: http://stackoverflow.com/comment/41348807
answer count: 1
has comment: http://stackoverflow.com/comment/41348751
has body: I create a function that contain parameter , and i alert the response in another function , that's why i create a global variable "imageServer" and i want to alert the imageServer in the "AlertFunction" function. var imageServer ; function win(r) { console.log("Response = " + r.response); imageServer = r.response; } function AlertFunction() { alert(imageServer); } i want to alert the r.response in the "AlertFunction" function, but nothing is displaying
has comment: http://stackoverflow.com/comment/41348695
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41348677
has comment: http://stackoverflow.com/comment/41348675
has answer: http://stackoverflow.com/a/26343551
type: Question
has title: Alert a variable in function

http://stackoverflow.com/comment/41374499
type: AnswerComment
score: 0
type: Comment
has text: You can store your JWT in a cookie.
comment on: http://stackoverflow.com/a/26356301

greasemonkey
tags question: http://stackoverflow.com/q/26329894
type: Tag
tag name: greasemonkey
tags question: http://stackoverflow.com/q/26247653
tags question: http://stackoverflow.com/q/26289830
tags question: http://stackoverflow.com/q/26331773
tags question: http://stackoverflow.com/q/26268816

http://stackoverflow.com/comment/41356871
has text: Each drawn object might be independent and be hooked directly to rAF. If an object is removed another object responsible might cancel its rAF to 'kill' him. Both ideas are stupid : rAF's overhead is big, so much better draw everything in a single handler. And removal by cAF method is hacky. Well, no use !!
score: 1
comment on: http://stackoverflow.com/q/26347893
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41137782
comment on: http://stackoverflow.com/a/26228388
score: 0
type: Comment
has text: Actually, sending all data will output data once at once. I need to output data for each request. If some error occurs at backend, it will be outputted without interrupting rest of the process. :)
type: AnswerComment

http://stackoverflow.com/comment/41188076
comment on: http://stackoverflow.com/q/26255098
score: 0
has text: Could your share part of the javascript code where you're using the map control, it will help to understand where it comes from.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41202465
score: 1
has text: Have the script (after successful code sequence) add a class to the div in which the animation is defined. Something like `#div1.animate`. And in the js, just have the success apply the class, like `('#div1').addClass('animate');`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26263667

http://stackoverflow.com/comment/41312514
comment on: http://stackoverflow.com/a/26323890
type: Comment
has text: From your code seems that in success of asynchronous call you try to fade in and after 5 secs fade out the parent div. This should work if everything else is correct. Take a look here http://jsfiddle.net/AlexChariz/ah7ap0dy/3/
score: 0
type: AnswerComment

http://stackoverflow.com/a/26339421
has comment: http://stackoverflow.com/comment/41346935
accepted answer of: http://stackoverflow.com/q/26339105
type: Answer
answers question: http://stackoverflow.com/q/26339105
has comment: http://stackoverflow.com/comment/41373166
has comment: http://stackoverflow.com/comment/95776239
score: 5
upvote count: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41341383
downvote count: 0
has body: Browser.msgBox is indeed only available in the spreadsheet interface, not in webapps. You have a lot of alternatives to throw alerts but you should mention wether you use UiApp or HTML Service. In UiApp you can create a popupPanel for example while in HTML you can throw alerts (throw new Error('sample alert')) or use JQuery Ui elements to do that.

http://stackoverflow.com/a/26232489
type: Answer
has comment: http://stackoverflow.com/comment/41161023
downvote count: 1
has comment: http://stackoverflow.com/comment/41160948
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/26232374
has body: It is not working because the content is generated dynamically You can remove the click event from each item and just assign a class to them. For example .mylist. $('body').on('click', '.mylist', function(e){ // DO SOMETHING | YEAH! }); Goodluck buddy.

http://stackoverflow.com/q/26289506
tagged with: parse-platform
has title: Javascript - Delete duplicates in class
type: Question
has comment: http://stackoverflow.com/comment/41318563
has answer: http://stackoverflow.com/a/26369203
has body: I have a class in parse called testItem here is a snap shot of this class So I am trying to write a could code function to remove this. So there are not more duplicates. This is what I have tried Parse.Cloud.job("removeDuplicateItems", function(request, response) { function checkDuplicate(school) { var TestItem = Parse.Object.extend("TestItem"); var testItemsQuery = new Parse.Query(TestItem); testItemsQuery.equalTo('school', schoolArray[i]); testItemsQuery.each(function(testItem) { var item = testItem.get('item'); var school = testItem.get('school'); var diningHallNum = testItem.get('diningHallNumber'); var testItemsQueryCheck = new Parse.Query(TestItem); testItemsQueryCheck.equalTo ('item', item); testItemsQueryCheck.equalTo ('school', school); testItemsQueryCheck.equalTo ('diningHallNumber', diningHallNum); //then delete Item } var schoolArray = ['Union College (NY)', 'University of Albany', 'Rensselaer Polytechnic Institute']; for (var i = 0; i &lt; schoolArray.length; i++) { checkDuplicate(schoolArray[i]); } } but this doesn't work because it will always come true I need a way to see if this is the second time this item has come up. How would I go about doing this? Thanks for the help in advance!!! EDIT If I have this data It deletes one of the cheese items and the something item?
has comment: http://stackoverflow.com/comment/41274394
score: 0
tagged with: cloud
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26369203
has comment: http://stackoverflow.com/comment/41301113
has comment: http://stackoverflow.com/comment/41319444
type: AnsweredQuestion

http://stackoverflow.com/comment/41311731
has text: I added a way to have them go 5 seconds after each other.
type: Comment
comment on: http://stackoverflow.com/a/26323520
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41298214
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26307919
has text: I was thinking that the third party code was really hard to maintain so I created my own drop down script. Works standalone but again seems to fail in conjuction with isotope : (. Tried applying the upper method with jquery click events but didnt work. The code is really small, maybe you want to have a look. http://stackoverflow.com/questions/26316109/click-events-from-two-scripts-on-same-element

http://stackoverflow.com/comment/41311711
type: Comment
comment on: http://stackoverflow.com/a/26323520
type: AnswerComment
score: 0
has text: Ah! Silly me. I'm still getting the same logs though :\

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

http://stackoverflow.com/q/26241037
favorite count: 0
has title: How to add angular js html5mode under controller
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41175956
has body: I am new in Angular js.I try to make html5 mode true in one of my controller .In my angular js app there is 3 controller but i need to html5 mode true in one of them not in all controller. I am using App.config(function($locationProvider) { $locationProvider.html5Mode(true); }); But this config effect all of my controller.I need to add html5mode true under one of my controller.I don't know is it possible or not .
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41161265
downvote count: 1
has comment: http://stackoverflow.com/comment/41217109
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41162043
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26241153

http://stackoverflow.com/q/26297337
has body: the Code is supposed to update the score only if there is no score with the same email greater than the current score, instead it displays the error: Error: Error: ER_BAD_FIELD_ERROR: Unknown column 'li' in 'where clause' function postScores(useremail, username, scoreValue, leaderboardName) { if (leaderboardName === "GHOSTS" || leaderboardName === "PACMAN" || leaderboardName === "OVERALL") { connection.query('UPDATE SCORES_' + leaderboardName + ' SET SCORES=' + scoreValue + ' WHERE SCORES &lt; ' + scoreValue + ' AND USER_EMAIL=' + useremail, function(err, rows, fields) { if (err) { console.log("Failed to Update. Attempting to Insert."); console.log("Error: " + err); connection.query( 'INSERT INTO SCORES_' + leaderboardName + '(USER_EMAIL, USER_NAME, SCORES) VALUES (?,?,?)', [ useremail, username, scoreValue ], function(err, rows, fields) { if (err) { console.log("Total Failure. Systems down"); } else { console.log("Success. Inserted new Scores"); } }); } }); } else { // Reference to Non-Existent Leaderboard return console.log('Specified Leaderboard of the name ' + leaderboardName + ' does not Exist'); } }
tagged with: sql
has comment: http://stackoverflow.com/comment/41263738
tagged with: node.js
favorite count: 0
has title: Javascript SQL request Bad Field Error in where clause
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26297450
accepted answer: http://stackoverflow.com/a/26297450
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41263811
tagged with: javascript

http://stackoverflow.com/comment/41077961
comment on: http://stackoverflow.com/a/26196012
has text: Would you mind explaining how this works, this looks like gibberish :) ?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26207586
has comment: http://stackoverflow.com/comment/41098829
has comment: http://stackoverflow.com/comment/41098280
type: Question
possible better answer: http://stackoverflow.com/a/26212956
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I am a beginner of javascript and jquery and i have 11 image tags in html. I want to basically change sources of these tags using js and jquery. This code is not working and I am not getting any errors in firebug, can some one please tell me where I am doing wrong? var imagesArray2=["01.png","02.png","03.png","04.png","05.png","06.png","07.png","08.png","09.png","10.png","11.png"]; var elementArray2 = ["#img1","#img2","#img3","#img4","#img5","#img6","#img7","#img8","#img9","#img10","#img11"]; var imagesArray,elementArray; var elementInArray; document ready $(function(){ setInterval(Myfunction(),1000);}); my function code which has a loop based on elementsInArray variable value and it calls imageFadeAnimations function function Myfunction(){ if(elementsInArray === 0){ imagesArray = imagesArray2; elementArray = elementArray2; elementsInArray = elementArray.length; var imageChanges = Math.floor(Math.random()*elementsInArray); imageFadeAnimations(imageChanges); } else { elementsInArray=elementArray.length; imageChanges = Math.floor(Math.random()*elementsInArray); imageFadeAnimations(imageChanges); } } takes an integer as argument function imageFadeAnimations(imageChanges){ for(var k = 0;k&lt;imageChanges;k++){ var element = Math.floor(Math.random()*elementsinArray); var image=Math.floor(Math.random()*elementsinArray); imageChanger(elementArray[element],imageArray[image]); elementArray.splice(element,1); imagesArray.splice(image,1); } } function imageChanger(b1,b2){ $(b1).fadeOut(500,function(){ $(b1).attr("src",b2); $(b1).fadeIn(500); }); }
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41099288
has answer: http://stackoverflow.com/a/26208476
has comment: http://stackoverflow.com/comment/41098376
has title: Changing multiple images source using jquery (and some other thing as well)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26212956
accepted answer: http://stackoverflow.com/a/26208476

http://stackoverflow.com/q/26202597
has body: I have a check-box for each user and the value of the check-box is the user id What is the best suitable JavaScript Which disables the delete a.button until have clicked the correct corresponding check-box If button is disabled I would like to be able to use bootstraps disabled="disabled" <?php echo $column_username;?> <?php echo $column_status;?> <?php echo $column_date_added;?> <?php echo $column_action;?> <?php if ($users) { ?> <?php foreach ($users as $user) { ?> <input type="checkbox" name="selected" value="<?php echo $user['user_id']; ?>" /> <?php echo $user['username']; ?> <?php echo $user['status']; ?> <?php echo $user['date_added']; ?> <a href="<?php echo $user['edit']; ?>" class="btn btn-primary" role="button"> Edit User <a href="<?php echo $user['delete']; ?>" class="btn btn-danger" role="button"> Delete User <?php } ?> <?php } ?>
has answer: http://stackoverflow.com/a/26202708
favorite count: 0
has title: check-box check before delete
type: AnsweredQuestion
tagged with: twitter-bootstrap
score: 1
accepted answer: http://stackoverflow.com/a/26202708
upvote count: 1
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/a/26195589
answers question: http://stackoverflow.com/q/26195518
has comment: http://stackoverflow.com/comment/41076516
score: 0
has body: if element #add-row-first is created after the document is created you can't use it that way. You can use the .on() with another parameter so it will find the element like this instead $("#table").on("click", "#add-row-first",addrowfirst); If I am understanding your issue correctly, this should do it. The documentation is a little hard to digest, but basically, the first element #table needs to exist at the time of the document being loaded, and the element #add-row-first can be added to the DOM later, as long as it is a child of #table jQuery knows how to find it.
has comment: http://stackoverflow.com/comment/41076492
has comment: http://stackoverflow.com/comment/41076420
type: Answer
has comment: http://stackoverflow.com/comment/41076526

window
tags question: http://stackoverflow.com/q/26275535
tags question: http://stackoverflow.com/q/26226099
tags question: http://stackoverflow.com/q/26214338
tags question: http://stackoverflow.com/q/26238068
tags question: http://stackoverflow.com/q/26301703
tag name: window
type: Tag

http://stackoverflow.com/q/26344089
has comment: http://stackoverflow.com/comment/41350109
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/53761412
has body: In viewmodel object, below is the property: public IList&lt;CollegeInformationDTO&gt; CollegeInformationlist { get; set; } In VIEW, javascript is as follow: var obj = JSON.stringify('@Model.CollegeInformationlist'); alert(obj[1].State); //NOT WORKING, giving string char $.each('@Model.CollegeInformationlist', function (i, item) { var obj = JSON.stringify(item); var r = $.parseJSON(obj); alert(r.State); //just giving undefined. }); Please guide here, how i can get JSON object in javascript.
type: Question
has title: How to get JSON object from Razor Model object in javascript
has comment: http://stackoverflow.com/comment/41349852
tagged with: asp.net-mvc
tagged with: javascript
answer count: 6
tagged with: asp.net-mvc-5
has answer: http://stackoverflow.com/a/26344334
has answer: http://stackoverflow.com/a/48773856
has comment: http://stackoverflow.com/comment/41349924
downvote count: 0
score: 110
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/26344334
possible better answer: http://stackoverflow.com/a/48773856
has answer: http://stackoverflow.com/a/26353465
upvote count: 110
has answer: http://stackoverflow.com/a/49698444
linked to: http://stackoverflow.com/q/4072762
has answer: http://stackoverflow.com/a/70474804
type: AnsweredQuestion

http://stackoverflow.com/comment/41270251
has text: Thanks for the clear answer! Like your answer best but am unable to vote it up for lack of badge points (hint).
type: AnswerComment
comment on: http://stackoverflow.com/a/26299662
score: 0
type: Comment

http://stackoverflow.com/q/26317456
has answer: http://stackoverflow.com/a/26317701
has comment: http://stackoverflow.com/comment/41301137
has comment: http://stackoverflow.com/comment/41300603
tagged with: javascript
has body: I have a problem with changing type of input in javascript. When I change from hidden to text is ok and is proper displayed but when I change to file input isn't showing. &lt;script type="text/javascript"&gt; function show(x,y) { if (document.getElementById(y).checked) { document.getElementById(x).setAttribute('type', 'file'); } else { document.getElementById(x).setAttribute('type', 'hidden'); } } &lt;/script&gt;
answer count: 3
accepted answer: http://stackoverflow.com/a/26317598
has comment: http://stackoverflow.com/comment/41300763
favorite count: 0
has comment: http://stackoverflow.com/comment/41301097
tagged with: http://stackoverflow.com/tag/html
has title: Change input from hidden to file
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26317642
upvote count: 2
has answer: http://stackoverflow.com/a/26317642
score: 1
has answer: http://stackoverflow.com/a/26317598
downvote count: 1
type: Question

http://stackoverflow.com/q/26309999
has comment: http://stackoverflow.com/comment/41287794
type: Question
has comment: http://stackoverflow.com/comment/41287469
has comment: http://stackoverflow.com/comment/41287699
has comment: http://stackoverflow.com/comment/41287985
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/26310225
downvote count: 0
has answer: http://stackoverflow.com/a/37594795
favorite count: 0
possible better answer: http://stackoverflow.com/a/37594795
has comment: http://stackoverflow.com/comment/61614972
score: 6
has body: This is a borderline question, but I figured it was worth asking. Is the below the most concise way to check if underscore.js is loaded, and are there any draw-backs to this approach. typeof _ == "function" ? console.log('yes') : console.log('no'); Honestly my "real" question is as follows. Basically this is a plugin that is going to be used on alot of front-end frameworks. Some will have underscore and some will not. In order to make it universal and to use the methods provided by underscore I want to check for underscore and provide fallback if not present while electing to use it when I can. Is this bad practice and should I not even bother with using underscore when it is present? NOTE: Unfortunately lodash.js is not an option because I foolishly shimmed underscore.js into the require config, and people don't seem to understand the necessity of AMD compatible modules.
has title: Detecting if Underscore.js is loaded
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26310225

http://stackoverflow.com/comment/41326184
has text: There are instance specific members and members on the prototype that are shared. By creating an instance of parent to be used as the prototype of child you are putting instance specific members of patent on child.prototype. you're not re using parent constructor either that would shadow those members and hide the mistake (parent.call(this)) more info here: http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711
score: 0
comment on: http://stackoverflow.com/q/26325970
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41172134
has text: A [jsFiddle](http://jsfiddle.net) would be handy so we can tweak it ourselves and play around with it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26246930
score: 0

http://stackoverflow.com/q/26294656
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41276729
tagged with: client-server
answer count: 3
has comment: http://stackoverflow.com/comment/41291551
upvote count: 1
favorite count: 0
has body: While developing for mobile platform which is the right place to do formatting for numbers and dates? Number and date formatting seems to be easier in Java than Javascript. Is it better to send date as standard format from server and format at client or send nicely formated date from server? Also, if multiple date formats are supposed to be displayed at few places, is it ok for server to send couple of date strings, each formated in one pattern?
has comment: http://stackoverflow.com/comment/41276272
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41299561
has answer: http://stackoverflow.com/a/26295662
downvote count: 0
has answer: http://stackoverflow.com/a/26294932
has answer: http://stackoverflow.com/a/26294881
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/41277165
has title: What is the right place to do formating- client or server
tagged with: formatting

http://stackoverflow.com/comment/41261648
type: AnswerComment
has text: In NopCommerce AppendScriptParts are build in Descending orders.I have that file in that folder.But the problem is, if file not found then it should show a 404 in console. But there is no errors.
type: Comment
comment on: http://stackoverflow.com/a/26295837
score: 0

http://stackoverflow.com/a/26269914
has comment: http://stackoverflow.com/comment/41214234
score: 0
has comment: http://stackoverflow.com/comment/41214180
has body: var customer = [];//create array var person = {};// create object var input = prompt("...");//your prompt var results = input.split(", "); //create an array from the input person.name = results[0];//add result with 0 index person.address = results[1];//add result with 1 index person.phone = results[2];//add result with index 2 customer[0] = person;//add the person object to the array. The above code should do as you wish. I'm having a hard time seeing why you would iterate a prompt to the same user?? So try this first then go on. http://jsfiddle.net/zkc2swmp/1/ Don't go irratating your users with prompt boxes, use a form. Also don't iterate something like that, and your condition in the for loop basically creates an infinite loop which is also bad My code could be a lot better, such as if conditions, and exactly how to use this with a form. Though frankly it seems as though you are far from that. So I've started you off, try it and see if you can implement this the way you want, then comment with suggestions for helping you do something else.
type: Answer
answers question: http://stackoverflow.com/q/26269791

http://stackoverflow.com/comment/41267404
score: 0
comment on: http://stackoverflow.com/a/26298972
type: Comment
type: AnswerComment
has text: I had thought it might be (which is why I mentioned it), but then I saw this [question](http://stackoverflow.com/questions/21401822/run-once-when-controller-loads-angular) which made me think otherwise.

http://stackoverflow.com/q/26327022
accepted answer: http://stackoverflow.com/a/26879781
type: Question
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/26327640
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26327640
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26879781
has title: How to save canvas image to mySQL without php, jquery
upvote count: 1
has body: Recently I started using canvas and was successful in drawing lines on a image using different colours, sizes and finally save it using dataUrl. Now I need to save this image into mySQL database. By surfing internet..., yes; I found lot of code which does this work; but using php and jquery. Seriously, I don't know ABCD of both of them. Is there any way to save the image into mySQL database without using php and jquery. Here I paste my code which I am using for annotating the image and saving it as image. <%@ taglib uri="/struts-tags" prefix="s" %> Success: Upload User Image <img id="result" src="images/<s:property value="userImageFileName"/>" hidden="true" width="565" height="584" class="annotatable"/> Please use a modern browser like Firefox, Chrome, Safari Write your feed back with respect to colors you used to draw on image Red Blue Green White Pen Sketch It is working fine. I am just pasting code for a reference. Also here I am having a 'textarea' which is also needed to be saved in mySQL. Thankyou in advance
has comment: http://stackoverflow.com/comment/41319195
type: AnsweredQuestion
score: 1
tagged with: mysql

http://stackoverflow.com/comment/41160754
score: 0
has text: possible duplicate of [Where is the best place to put tags in HTML markup?](http://stackoverflow.com/questions/436411/where-is-the-best-place-to-put-script-tags-in-html-markup)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26240989

http://stackoverflow.com/comment/41314824
comment on: http://stackoverflow.com/a/26325105
type: Comment
has text: I think we may be talking about different issues, but CSS `height: 100%` definitely works (even for floated elements) so long as there's a defined height on the parent, see the [second demo](http://jsfiddle.net/davidThomas/kgfLcasv/2/).
score: 0
type: AnswerComment

http://stackoverflow.com/q/26221204
downvote count: 2
tagged with: css
has body: I am transferring my website to my own server, I built it using a free online service with a theme. I downloaded the archive of files however trying to get it to work is giving me errors. The only thing that isn't working is the javascript slideshow i have a syntax error and cant figure out what the problem is. here is the code: &lt; script type='text/javascript'&gt; (function (jQuery) { function init() { wSlideshow.render({ elementID: "401544824517155183", nav: "numbers", navLocation: "bottom", captionLocation: "bottom", transition: "slide", autoplay: "1", speed: "5", aspectRatio: "auto", showControls: "false", randomStart: "true", images: [{ "url”:”uploads/2/0/6/1/20616634/5573326.png", "width":"333", "height": "208" }, { "url”:”uploads/2/0/6/1/20616634/6952116.png", "width": "400", "height": "250" }, { "url”:”uploads/2/0/6/1/20616634/116529.png", "width": "400", "height": "250", "link": "/iosapplication.html" }, { "url”:”uploads/2/0/6/1/20616634/6185044.png", "width": "333", "height": "208", "link": "/puffinbook.html" }, { "url”:”uploads/2/0/6/1/20616634/6694718.png", "width": "333", "height": "208", "link": "/cyrenians.html" }] }) } jQuery ? jQuery(init) : document.observe('dom:loaded', init) })(window._W &amp;&amp; _W.jQuery) &lt; /script&gt; Can anyone help me out? Thanks
has answer: http://stackoverflow.com/a/26223943
score: 0
has comment: http://stackoverflow.com/comment/41124043
has comment: http://stackoverflow.com/comment/41124011
has comment: http://stackoverflow.com/comment/41124131
tagged with: slideshow
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26223943
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Javascript syntax error for slideshow
favorite count: 0
type: Question
upvote count: 2

http://stackoverflow.com/comment/41091564
score: 0
comment on: http://stackoverflow.com/a/26203621
type: Comment
has text: I really don't understand i tried changing the variable name too but still I am getting the same error...
type: AnswerComment

http://stackoverflow.com/a/36935864
type: Answer
has body: Maybe these options are solving the problem: $.hotkeys.options.filterInputAcceptingElements = false; $.hotkeys.options.filterTextInputs = false;
has comment: http://stackoverflow.com/comment/68208361
answers question: http://stackoverflow.com/q/26272806
score: 0

http://stackoverflow.com/a/26195616
has comment: http://stackoverflow.com/comment/42048031
answers question: http://stackoverflow.com/q/26195514
has comment: http://stackoverflow.com/comment/42056858
has body: You want to add 'selector' option $('.post-info a').tooltip({ selector: '.post-info a'; }); Example from documentaion: http://jsbin.com/zopod/1/edit
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/42041006
has comment: http://stackoverflow.com/comment/42038917

http://stackoverflow.com/a/26239062
has comment: http://stackoverflow.com/comment/41157081
score: 0
has comment: http://stackoverflow.com/comment/41157365
has comment: http://stackoverflow.com/comment/41157604
has comment: http://stackoverflow.com/comment/41158470
answers question: http://stackoverflow.com/q/26238303
has body: I don't know how is your code structure, but it seems like a case where you could do the following: $('a[data-toggle="tab"]').on('click','show.bs.tab', function(e) { if ($(e.target).attr('href') == '#local' &amp;&amp; !LocalStorage.isLoaded()) { // Set Evercam Camera ID LocalStorage.options.cameraId = '&lt;%= @camera['id'] %&gt;'; // OR // // Using api_id and api_key LocalStorage.options.api_id = '&lt;%= current_user.api_id -%&gt;'; LocalStorage.options.api_key = '&lt;%= current_user.api_key -%&gt;'; // Finally Load the widget LocalStorage.Load(); } }); So it'll consider both, if the right tab is clicked AND if the widget is loaded UPDATE Ok, got a little bit mistaken up there. $('a[data-toggle="tab"]').on('click', function(e) { // Check if the clicked tab is the right one // Also check if the widget is loaded if ($(this).attr('href') == '#local' &amp;&amp; !LocalStorage.isLoaded()) { // Set Evercam Camera ID LocalStorage.options.cameraId = '&lt;%= @camera['id'] %&gt;'; // OR // // Using api_id and api_key LocalStorage.options.api_id = '&lt;%= current_user.api_id -%&gt;'; LocalStorage.options.api_key = '&lt;%= current_user.api_key -%&gt;'; // Finally Load the widget LocalStorage.Load(); } }); I have no idea how your LocalStorage object works, is it a thrid party library? Is it your own? If the former, they probably have a method to check if there's a running instance. If the latter, you could do just LocalStorage.prototype.isLoaded = function() { //Here you write code to check if there is a running instance of the widget loaded return this.widget !== undefined } Or you could simply write the Load function in a way to allow only one instance to be running (Remove the 'show.bs.modal' reference. This is an event fired by bootstrap when you show the tab, it has nothing to do with the click http://getbootstrap.com/javascript/#tabs )
has comment: http://stackoverflow.com/comment/41157740
type: Answer
has comment: http://stackoverflow.com/comment/41157223
has comment: http://stackoverflow.com/comment/41157921
has comment: http://stackoverflow.com/comment/41157459
has comment: http://stackoverflow.com/comment/41157633

http://stackoverflow.com/q/26243827
tagged with: css
has answer: http://stackoverflow.com/a/26244097
answer count: 2
tagged with: easing
has answer: http://stackoverflow.com/a/26244129
score: 0
accepted answer: http://stackoverflow.com/a/26244097
possible better answer: http://stackoverflow.com/a/26244129
tagged with: jquery-animate
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I have two problems, 1) I have a div that expands onclick, (.panel) how can I use easing on it so it opens in a smooth way? 2) how can I make the ul list within the expanding div (.panel) fade in a few mili seconds after the div has expanded? click Coffee Tea Milk JS var next_move = "expand"; $(document).ready(function () { $(".panel").click(function () { console.log(next_move); var css = {}; if (next_move == "expand") { css = { width: '210px', height: '170px' }; next_move = "shrink"; } else { css = { width: '30px', height: '20px' }; console.log('hi'); next_move = "expand"; } $(this).animate(css, 200); }); }); .panel { width: 30px; height: 21px; overflow: hidden; color:white; background-color: grey; } .panel ul { margin-left:10%; color:white; } .mores { width: 210px; height: 170px; overflow: hidden; } here is the fiddle JSFiddle Many Thanks
type: Question
has title: How can I use easing effects to this div that expands onclick, as well as fade in effects on the elements inside it?

http://stackoverflow.com/q/26274877
tagged with: asp.net
has title: Find controls values inside any container
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41226869
has body: In my ASP.NET page, I have an Accordion containing Panes. Panes contains themselves differents controls like textbox, label, dropdownlist, checkbox, personnal web control... I need to check (client side) if textboxes, dropdownlists, textboxes &amp; dropdownlist inside my personnal webcontrol, are empty or not. I need a loop to check every Container. Can you help me ?
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41222581
score: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26311531
downvote count: 0
type: Answer
score: 9
upvote count: 9
has body: You can simply use Thread.sleep() for this purpose. But if you are working in a multithreaded environment with a user interface, you would want to perform this in the separate thread to avoid the sleep to block the user interface. try{ Thread.sleep(60000); // Then do something meaningful... }catch(InterruptedException e){ e.printStackTrace(); }
answers question: http://stackoverflow.com/q/26311470

http://stackoverflow.com/q/26225748
tagged with: javascript
score: 1
tagged with: jquery
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
accepted answer: http://stackoverflow.com/a/26226157
has title: How can I remove a class from the span nearest span using jQuery?
upvote count: 1
answer count: 1
has body: I have a page that allows visitors to add favorites to a list. It uses repeating rows to show items so generic classes are repeated. How can I show a single modal window (.closest or .prev?) if they all have the same class? Here is my fiddle: http://jsfiddle.net/psasj74L/ One. OK Show Modal jQuery: $('.jsShowMaxModal').click(function () { $(".jsCrateMaxModal").closest("span").removeClass("hide"); }); $('.most-wanted-modal-container').click(function () { $('.jsCrateMaxModal').addClass("hide"); });
has answer: http://stackoverflow.com/a/26226157
downvote count: 0

http://stackoverflow.com/comment/41216649
has text: only `paginator.posts` works for enumerating the posts for the language, for example `site.posts` doesn't work why?
type: Comment
comment on: http://stackoverflow.com/a/26270524
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41189032
type: AnswerComment
comment on: http://stackoverflow.com/a/26256328
type: Comment
has text: It seems to be a great idea, i've just looked the behavior of this method and looks good ! It works as my tricky idea mentioned in my first post so Thank you. Make your comment as an answer so I can mark it as the good one ! Or just edit this one
score: 0

function
tags question: http://stackoverflow.com/q/26248172
tags question: http://stackoverflow.com/q/26268681
tags question: http://stackoverflow.com/q/26219919
tags question: http://stackoverflow.com/q/26331815
tag name: function
tags question: http://stackoverflow.com/q/26284528
tags question: http://stackoverflow.com/q/26242007
tags question: http://stackoverflow.com/q/26271186
tags question: http://stackoverflow.com/q/26299703
tags question: http://stackoverflow.com/q/26285098
tags question: http://stackoverflow.com/q/26237700
tags question: http://stackoverflow.com/q/26340746
tags question: http://stackoverflow.com/q/26320302
tags question: http://stackoverflow.com/q/26275815
tags question: http://stackoverflow.com/q/26231915
tags question: http://stackoverflow.com/q/26274513
tags question: http://stackoverflow.com/q/26285658
tags question: http://stackoverflow.com/q/26209637
tags question: http://stackoverflow.com/q/26321495
tags question: http://stackoverflow.com/q/26329276
tags question: http://stackoverflow.com/q/26298835
tags question: http://stackoverflow.com/q/26226352
tags question: http://stackoverflow.com/q/26299762
type: Tag
tags question: http://stackoverflow.com/q/26210124
tags question: http://stackoverflow.com/q/26288353
tags question: http://stackoverflow.com/q/26203194
tags question: http://stackoverflow.com/q/26223650
tags question: http://stackoverflow.com/q/26290763
tags question: http://stackoverflow.com/q/26244871
tags question: http://stackoverflow.com/q/26198175
tags question: http://stackoverflow.com/q/26330267
tags question: http://stackoverflow.com/q/26250178
tags question: http://stackoverflow.com/q/26294612
tags question: http://stackoverflow.com/q/26268160
tags question: http://stackoverflow.com/q/26321797
tags question: http://stackoverflow.com/q/26320278
tags question: http://stackoverflow.com/q/26283125
tags question: http://stackoverflow.com/q/26256796
tags question: http://stackoverflow.com/q/26321832
tags question: http://stackoverflow.com/q/26329745
tags question: http://stackoverflow.com/q/26254852
tags question: http://stackoverflow.com/q/26199076
tags question: http://stackoverflow.com/q/26279539
tags question: http://stackoverflow.com/q/26308205

http://stackoverflow.com/q/26250758
has answer: http://stackoverflow.com/a/26251717
score: 1
tagged with: forms
tagged with: pug
has comment: http://stackoverflow.com/comment/41179095
answer count: 1
downvote count: 0
has title: What all is passed on clicking the submit button of a form?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41178871
favorite count: 0
accepted answer: http://stackoverflow.com/a/26251717
tagged with: http://stackoverflow.com/tag/html
has body: I am using node.js with jade templating engine. I am having a form in jade as follows: form.form-signin(style="padding-left:10px", action='/update', method='post') table.table.table-hover(style="background-color:#fff;align:center;border:1px solid #ddd;padding-left:10px")#myTable.tablesorter tbody - if (evententries.length &gt; 0) { each entry, i in evententries tr(style="height:5;font-size:12px;") td(style="background-color:#5c78b2;") p(style="color: #fff;text-align:center;") Team Name td(style="background-color:#5c78b2") p(style="color: #fff;text-align:center") Presenter(s) td(style="background-color:#5c78b2") p(style="color: #fff;text-align:center") Master td(style="background-color:#5c78b2") p(style="color: #fff;text-align:center") Manager tr(style="height:30px;background-color:#E5EDFC;color: #000;font-size:14px;align:center") td input(type='textbox', name='teamname', value='#{entry.teamname}', style='width:120px;', readonly='readonly') td input(type='textbox', name='presenters', value='#{entry.presenters}', style='width:120px;', readonly='readonly') td input(type='textbox', name='scrummaster', value='#{entry.master}', style='width:120px;', readonly='readonly') td input(type='textbox', name='manager', value='#{entry.manager}', style='width:120px;', readonly='readonly') tr td(style="background-color:#fff; vertical-align:middle") p(style="white-space:pre;word-wrap: break-word;text-align:center") Write-up td(style="background-color:#fff", colspan="2") input(type='textbox', name='writeup', value='#{entry.writeup}', style='width:120px;', readonly='readonly') td(style="background-color:#fff; vertical-align:middle") button#edit(type='submit') Edit I wish to know what all will this type of form submit as it has a table inside it with some readonly input fields.I want that on submitting the form only the input readonly fields should be passed.
tagged with: node.js
has comment: http://stackoverflow.com/comment/41179137
has comment: http://stackoverflow.com/comment/41179524
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41180702

http://stackoverflow.com/a/26266155
score: 0
answers question: http://stackoverflow.com/q/26265847
has comment: http://stackoverflow.com/comment/41208007
has body: Think you are complicating this a bit :) View: {{foo}} increment decrement update cancel Controller: .controller('ShadowController', function ($scope) { $scope.foo = 1; $scope.increment = function () { ++$scope.foo; $scope.cancel(); }; $scope.decrement = function () { --$scope.foo; $scope.cancel(); }; $scope.commit = function () { $scope.foo = parseFloat($scope.tempFoo); }; $scope.cancel = function () { $scope.tempFoo = $scope.foo; }; $scope.cancel(); }); An even fancier way would be to keep track of changes to the temporary value and only enable commit/cancel buttons if there is a diff between original and temp. View: {{data.original}} increment decrement update cancel Controller: .controller('ShadowControllerAdv', function ($scope) { var _dataWatcher; $scope.data = { original: 1 }; $scope.state = { hasChanged: false }; function _startWatcher() { _dataWatcher = $scope.$watch('data.edit', function (newValue, oldValue) { if (newValue !== oldValue) { $scope.state.hasChanged = true; } else { $scope.state.hasChanged = false; } }, true); } function _stopWatcher() { if (!_dataWatcher) { return; } _dataWatcher(); } $scope.reset = function () { _stopWatcher(); $scope.data.edit = $scope.data.original; $scope.state.hasChanged = false; _startWatcher(); } $scope.commit = function () { _stopWatcher(); $scope.data.original = parseFloat($scope.data.edit); $scope.reset(); } $scope.increment = function () { $scope.data.original = $scope.data.original + 1; $scope.reset(); }; $scope.decrement = function () { $scope.data.original = $scope.data.original - 1; $scope.reset(); }; $scope.reset(); });
type: Answer
has comment: http://stackoverflow.com/comment/41207544

http://stackoverflow.com/q/26306671
favorite count: 0
has title: How to Call a GWT method whenever an Async RPC is Made
type: AnsweredQuestion
upvote count: 2
tagged with: java
downvote count: 2
has answer: http://stackoverflow.com/a/26307067
type: Question
tagged with: gwt
has body: I have a website that utilizes GWT that is secured using Spring with a timeout of... let's say an hour. As part of the process, I am trying to implement a client-side session timeout warning 5 minutes before the session expires. I have the Javascript written out for it, which utilizes cookies. The timer works for initially setting the timer, and has a method for resetting the timer that can be used in GWT through native methods. function resetSessionTimeout() { //update the cookie for the expected timeout var date = new Date(); var timeoutTime = 55 * 60 * 1000; date.setTime(date.getTime() + timeoutTime); createCookie('timeout', date.getTime(), 1); } Whenever an RPC is made to the server, the server-based session timeout is refreshed, so the initial timer is no longer accurate after using any sort of async call. The function above would update the client side with the correct timeout time. The option that definitely works would be to call a native void that calls $wnd.resetSessionTimeout() from every single method I have with an Async call. However, this is a lot of methods, and is poor scalability and smells of poor implementation. Is there a way for me to set up the client portion to observe whenever an RPC has been made and received and then put the native void in there within the MVP level rather than at each method, i.e. are there RPC Observers or Listeners?
accepted answer: http://stackoverflow.com/a/26307067
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/41203245
score: 0
type: QuestionComment
has text: In my server is working, put a try catch between you **echo $_POST['dispo'];**
type: Comment
comment on: http://stackoverflow.com/q/26263722

require
tags question: http://stackoverflow.com/q/26269201
tag name: require
tags question: http://stackoverflow.com/q/26229222
tags question: http://stackoverflow.com/q/26235630
type: Tag

http://stackoverflow.com/q/26331744
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: web
accepted answer: http://stackoverflow.com/a/26331769
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26331769
type: AnsweredQuestion
type: Question
has title: Why is line break being written as a string?
score: 1
has body: I am trying to write a program that submits text on my website and I am having a lot of trouble trying to do a line break after the text because break line is being written as a string. var main = function() { var today = new Date(); var month = parseInt(today.getMonth() + 1); var day = parseInt(today.getDate()); var year = parseInt(today.getFullYear()); $(".btn").click(function() { var post = $(".status-box").val(); $("&lt;li&gt;").text(post + "&lt;br&gt;" + month + "/" + day + "/" + year).prependTo(".posts"); $(".status-box").val(""); $(".counter").text("140"); $(".btn").addClass("disabled"); }); $(".status-box").keyup(function() { var postlength = $(this).val().length; var charactersLeft = 140 - postlength; $(".counter").text(charactersLeft); if (charactersLeft &lt; 0) { $(".btn").addClass("disabled"); } else if (charactersLeft === 140) { $(".btn").addClass("disabled"); } else { $(".btn").removeClass("disabled"); } }); $(".btn").addClass("disabled"); }; $(document).ready(main);
upvote count: 1

http://stackoverflow.com/comment/41278453
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26305026
has text: pop-up blocker is installed but turned off on both machines.
score: 0

http://stackoverflow.com/comment/41217454
type: Comment
comment on: http://stackoverflow.com/a/26271669
has text: He don't `have to`. There is another solution.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41290419
score: 0
type: Comment
has text: i tried removing the tag and the if statement, still it's not working. Im still wondering why is it that in fiddle the code works well while in my php it doesn't.
type: QuestionComment
comment on: http://stackoverflow.com/q/26311225

http://stackoverflow.com/q/26335905
favorite count: 0
has body: Here is my script: HTML code: Frequency Run Time Schedule Duration SLA Type Title Actual Start Actual End Remark Done by td align="center"><?php echo $row['frequency']?> <?php echo $row['rts']?> <?php echo $row['duration']?> <?php echo $row['sla']?> <?php echo $row['type']?> <?php echo $row['title']?> Get Time i want to add an actual start time and end time on every row with the press of button on the function, but the problem is only the first field only outputs the time, nothing happens when i press get time on other column and rows.
has title: Call a timestamp function on every row PHP
has answer: http://stackoverflow.com/a/26336126
has comment: http://stackoverflow.com/comment/41335133
type: UnansweredQuestion
score: -3
tagged with: php
has comment: http://stackoverflow.com/comment/41335145
downvote count: 3
tagged with: mysql
has answer: http://stackoverflow.com/a/26336073
type: Question
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41160912
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26227728
has text: In my example parameter o is null...so then what object is square called on?
score: 0

http://stackoverflow.com/q/26262541
type: Question
tagged with: linkedin-jsapi
tagged with: linkedin-api
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has body: Hi as I found on some website by using linkedin api we can fetch your website user's linkedin recommendation to show it on your website as part of user profiles. So to do this I searched for its implementation & found 2 api code & I tried both but its not working for my side. First code ,I tried: Second code I tried: I am also using linkedin Member Profile Plugin in this we have to send user's profile-url to fetch his profile in data-id So should we have to do similar like this for fetching user's recommendtaion. Please help me for this. thanks in advance!!!
has title: Having difficulty in implementation of linkedin recommendation api to fetch linkedin recommendation on our website
has answer: http://stackoverflow.com/a/26268474

http://stackoverflow.com/comment/41202466
score: 0
type: AnswerComment
has text: @natan This is how mailto links work. They merely open your default email client, in your case this is Outlook. There is no way to send email automatically through a browser only. This would be a security nightmare!
type: Comment
comment on: http://stackoverflow.com/a/26260836

http://stackoverflow.com/comment/41138703
type: QuestionComment
has text: Presumably you are already setting the value OK and just want to stop editing. There is no way to **guarantee** that users can't enter any value they like into a form control. However, you can make it more difficult by making the text input readonly, then its value can only be set by script (but users can do that too if they want). Please tell users it's readonly so they don't get frustrated trying to manually edit it.
comment on: http://stackoverflow.com/q/26228773
score: 0
type: Comment

http://stackoverflow.com/q/26330548
type: Question
has title: JQuery Ajax PHP validating signup
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26330585
answer count: 1
favorite count: 0
score: 0
has body: I am currently trying to validate my sign up form with Jquery which runs after a user submits the form. I have following jquery function: $('#signupForm').submit(function() { if($('#email').val() == "" || $('#password').val() == "" || $('#repassword').val() == "" ){ alert('empty form'); return false; } if($('#password').val() != $('#repassword').val()){ alert('password does not match'); return false; } //check if email is available var isemailavailable = true; $.ajax({ url: "php_includes/registerlogic.php", type: "POST", data: {checkemail: $('#email').val()}, dataType: 'json', }).done(function(data){ var resultObject = $.parseJSON(JSON.stringify(data)); //alert(data); console.log(resultObject.data); if(resultObject.data=='taken') { //return false; console.log('inside taken'); isemailavailable = false; console.log(isemailavailable); }else{ alert($.trim(data)); isemailavailable = true; } }); if(isemailavailable == false){ alert("email already exists!"); return false; } }); Ajax hits this page for email availability: if(isset($_POST["checkemail"])){ $email = preg_replace('#[^a-z0-9]#i', '', $_POST['checkemail']); $query = $db-&gt;query('SELECT * FROM users WHERE user_email= :email LIMIT 1', array(':email'=&gt;$_POST['checkemail'])); $isavailable = ""; if(count($query) &lt; 1){ $isavailable = 'available'; }else{ $isavailable = 'taken'; } $respond = array("data" =&gt; $isavailable); $out = json_encode($respond); echo $out; exit(); } Ok so my problem here is with Jquery, everything works fine until where I have the if(isemailavailable == false) part. The code never goes inside the if even though isemailavailable is false. Hence the form will be submitted as "return false" is inside the if statement. I have also tried if(!isemailavailable) and it didnt work aswell. Any help or suggestion is much appreciated. Thankss
upvote count: 1
tagged with: php
downvote count: 1
accepted answer: http://stackoverflow.com/a/26330585
type: AnsweredQuestion

http://stackoverflow.com/comment/41224339
comment on: http://stackoverflow.com/a/26274773
score: 0
type: AnswerComment
type: Comment
has text: Yes I mean do all the pre logic inside the Form2SubmitOverloaded() method and remove posting thing from it. Basically can't you separate pre-processing part from form posting part?

http://stackoverflow.com/comment/44427047
score: 1
comment on: http://stackoverflow.com/a/26319606
has text: This results in different behavior in chrome and firefox. Any solution for this issue?
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26338322
tagged with: sapui5
possible better answer: http://stackoverflow.com/a/26340352
type: Question
has answer: http://stackoverflow.com/a/26359901
has title: SAPUI5 SmartFilterBar FilterType overview
has answer: http://stackoverflow.com/a/67316665
tagged with: javascript
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26340352
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26359901
downvote count: 0
score: 1
has body: SAPUI5 provides a SmartFilterBar control (package: sap.ui.comp.smartfilterbar), this control works with metadata provided by the oData service. According to the documentation there must be something like: * sap.ui.comp.smartfilterbar.ControlConfiguration.FILTERTYPE But I can't find anything like that. My problem, default behaviour of the search fields is "equal" but I need "contains". Example for ControlConfiguration: new sap.ui.comp.smartfilterbar.ControlConfiguration({ key : "Name", // string groupId : "_BASIC", // string visible : true, // boolean controlType : "auto", // string filterType : "auto", // string index : 1, // any }), Questions: 1. Where to find the available values for "controlType" 2. Where to find the available values for "filterType"

http://stackoverflow.com/a/26265953
answers question: http://stackoverflow.com/q/26263694
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41246726
upvote count: 2
type: Answer
has body: This is one way: Make an array of line coordinates that you wish to animate along. Calculate waypoints along those lines where you want your circle to visit and save them in an array. Create an animation loop. Inside the loop, (1) clear the canvas, (2) draw the isles, (3) draw the circle at the next point in the array. Here's example code and a Demo: // canvas and context references var canvas = document.getElementById("map"); var c = canvas.getContext("2d"); // set some context styles c.fillStyle = "white"; c.fillRect(0, 0, canvas.width, canvas.height); c.fillStyle = 'red'; var startTime; var interval = 50; // define lines that go up/down the isles var lines = [] lines.push({ x: 553, y: 454 }); lines.push({ x: 672, y: 378 }); lines.push({ x: 815, y: 368 }); lines.push({ x: 812, y: 70 }); lines.push({ x: 752, y: 71 }); lines.push({ x: 761, y: 365 }); lines.push({ x: 708, y: 364 }); lines.push({ x: 703, y: 76 }); lines.push({ x: 204, y: 72 }); lines.push({ x: 200, y: 454 }); // calculate points at intervals along each line // put all the calculated points in a points[] array var points = []; var pointIndex = 0; for (var i = 1; i &lt; lines.length; i++) { var line0 = lines[i - 1]; var line1 = lines[i]; for (var j = 0; j &lt; 100; j++) { var dx = line1.x - line0.x; var dy = line1.y - line0.y; var x = line0.x + dx * j / 100; var y = line0.y + dy * j / 100; points.push({ x: x, y: y }); } } var img = new Image(); img.onload = start; img.src = "https://dl.dropboxusercontent.com/u/139992952/multple/isles.png"; function start() { requestAnimationFrame(animate); } function animate(time) { // continue animating until we've reach the last point in points[] if (pointIndex &lt; points.length - 1) { requestAnimationFrame(animate); } // get the current point var p = points[pointIndex]; // clear the canvas c.clearRect(0, 0, canvas.width, canvas.height); // draw the isles c.drawImage(img, 0, 0); // draw the circle at the current waypoint c.beginPath(); c.arc(p.x, p.y, 5, 0, Math.PI *…
score: 2
accepted answer of: http://stackoverflow.com/q/26263694

http://stackoverflow.com/a/26207411
answers question: http://stackoverflow.com/q/26207146
has comment: http://stackoverflow.com/comment/41108244
has body: why don't you try to directly access the label value using jquery as given below if it has an id. var value = $('#&lt;%=txtValueResultMandays.ClientID%&gt;').val(); or try accessing it directly in java script using getElementById method instead of going through the grid.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41149330

http://stackoverflow.com/a/26253772
type: Answer
upvote count: 0
has body: Use this code. var json = "{'Object1':["+ "{'field1':'label1', 'field2':'Name1'},"+ "{'field1':'label2', 'field2':'Name2'},"+ "{'field1':'label3', 'field2':'Name3'}"+ "]}"; function getJSONObj(){ var gList = eval("(" + json + ")"); var jsonObj = {}; for(var i=0;i&lt;gList.Object1.length;i++){ jsonObj[gList.Object1[i].field1 ] = gList.Object1[i].field2; } alert(JSON.stringify(jsonObj)); } getJSONObj(); Link - http://jsfiddle.net/de5xoe3r/5/
answers question: http://stackoverflow.com/q/26252726
score: -1
downvote count: 1

http://stackoverflow.com/comment/50121912
type: AnswerComment
comment on: http://stackoverflow.com/a/26252059
score: 0
type: Comment
has text: I am using ASP:FileUpload not JQuery file upload

http://stackoverflow.com/q/26331474
has body: My problem is that I am trying to set a certain texture onto triangles via retrieving verticies from a text file. Basically I want to be able to go through each matrix and set a value for the texture I want it to set. Right now I have it set to only 1 texture for literally everything. I am taking this from an example, but this is straight webgl no libraries or anything I am strictly using this for de-engineering and learning purposes. There must be a way to do this for I am doing this for the x,y,z coordinates and texture coordinates. gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, rockTexture); gl.uniform1i(shaderProgram.samplerUniform, 0); I've looked up some documentation, and you can't bind an array to a texture like you can for bindBuffer, basically I am just trying to grab a value from a text file to determine which texture I want it to be. Some help, or even a step in the right direction with some explanation would do wonders. Example of how I am doing this with coordinates: (text file example) // Floor 1 -25.0 0.0 -25.0 0.0 25.0 -25.0 0.0 25.0 0.0 0.0 25.0 0.0 25.0 25.0 0.0 -25.0 0.0 -25.0 0.0 25.0 25.0 0.0 -25.0 25.0 25.0 25.0 0.0 25.0 25.0 0.0 // Ceiling 1 -25.0 4.0 -25.0 0.0 24.0 -25.0 4.0 25.0 0.0 0.0 25.0 4.0 25.0 24.0 0.0 -25.0 4.0 -25.0 0.0 24.0 25.0 4.0 -25.0 24.0 24.0 25.0 4.0 25.0 24.0 0.0 And then it parses and connects it through here: var lines = data.split("\n"); var vertexCount = 0; var vertexPositions = []; var vertexTextureCoords = []; for (var i in lines) { var vals = lines[i].replace(/^\s+/, "").split(/\s+/); if (vals.length == 6 &amp;&amp; vals[0] != "//") { // It is a line describing a vertex; get X, Y and Z first vertexPositions.push(parseFloat(vals[0])); vertexPositions.push(parseFloat(vals[1])); vertexPositions.push(parseFloat(vals[2])); // And then the texture coords vertexTextureCoords.push(parseFloat(vals[3])); vertexTextureCoords.push(parseFloat(vals[4])); vertexCount += 1; } } worldVertexPositionBuffer = gl.createBuf…
tagged with: textures
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26349698
tagged with: webgl
type: Question
answer count: 1
has title: binding multiple textures based on verticies
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26349698
score: 0

http://stackoverflow.com/a/26346619
has comment: http://stackoverflow.com/comment/41354546
has comment: http://stackoverflow.com/comment/41354819
has comment: http://stackoverflow.com/comment/41354578
answers question: http://stackoverflow.com/q/26346503
has comment: http://stackoverflow.com/comment/41354531
score: 0
has body: MDN provides a polyfill (read: the exact code) for Array.every. If we just modify this to remove the check that the property exists, it's easy: if (!Array.prototype.reallyEvery) { Array.prototype.reallyEvery = function(callbackfn, thisArg) { 'use strict'; var T, k; if (this == null) { throw new TypeError('this is null or not defined'); } // 1. Let O be the result of calling ToObject passing the this // value as the argument. var O = Object(this); // 2. Let lenValue be the result of calling the Get internal method // of O with the argument "length". // 3. Let len be ToUint32(lenValue). var len = O.length &gt;&gt;&gt; 0; // 4. If IsCallable(callbackfn) is false, throw a TypeError exception. if (typeof callbackfn !== 'function') { throw new TypeError(); } // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. if (arguments.length &gt; 1) { T = thisArg; } // 6. Let k be 0. k = 0; // 7. Repeat, while k &lt; len while (k &lt; len) { var kValue; // i. Let kValue be the result of calling the Get internal method // of O with argument Pk. kValue = O[k]; // ii. Let testResult be the result of calling the Call internal method // of callbackfn with T as the this value and argument list // containing kValue, k, and O. var testResult = callbackfn.call(T, kValue, k, O); // iii. If ToBoolean(testResult) is false, return false. if (!testResult) { return false; } k++; } return true; }; } I've just renamed it to Array.reallyEvery().
type: Answer
has comment: http://stackoverflow.com/comment/41354846

http://stackoverflow.com/q/26218584
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26218848
has answer: http://stackoverflow.com/a/26218848
downvote count: 0
has answer: http://stackoverflow.com/a/26219367
favorite count: 0
tagged with: backbone.js
upvote count: 1
type: AnsweredQuestion
has body: I've got a model with the following defaults: Entities.OrdersFilter = Backbone.Model.extend({ defaults: { 'start-date': '2014-09-01', 'end-date': '2014-10-01', 'status': 'OUTSTANDING' }, localStorage: new Backbone.LocalStorage('OrderFilters') }); These three attributes represent filters that can be changed by the user. I need to display a "Clear Filters" button, but only when the filters differ from the defaults. I know Backbone supplies a hasChanged state, but I believe that will just tell me if it's changed since the last set, not from the defaults. How do I check to see if a Model's current attribute values are different than the defaults?
score: 1
accepted answer: http://stackoverflow.com/a/26219367
has title: What is the easiest way to determine if a Model's current attributes are different than the defaults?
type: Question
answer count: 2

http://stackoverflow.com/comment/41202417
type: QuestionComment
comment on: http://stackoverflow.com/q/26263475
has text: Still something to maintain. I might use that as well. But my project is getting big and I want to split it up and autoload it completely dynamically so to add a new controller I just have to drop a new file into the controllers folder under my module.
score: 0
type: Comment

http://stackoverflow.com/comment/41157525
comment on: http://stackoverflow.com/q/26239049
score: 0
type: Comment
type: QuestionComment
has text: Not sure then. Need a full working example of the issue.

http://stackoverflow.com/comment/41169425
type: AnswerComment
comment on: http://stackoverflow.com/a/26237834
score: 0
type: Comment
has text: I understand. However, redirecting to the index.html file will fire off the index route by default since Ember doesn't have any context of what other route it needs to go to, correct? Here's my environment.js file: http://www.codeshare.io/WDVf8.

http://stackoverflow.com/comment/41124326
type: AnswerComment
type: Comment
has text: So instead of using a button how would you do this on `spacebar keydown`? Sorry I don't know `JQuery` so this looks super confusing to me
comment on: http://stackoverflow.com/a/26220619
score: 0

http://stackoverflow.com/a/26252030
has body: Change: {{actualDateformat}} To: This way, the select should recognize the item where the dateformat.code matches actualDateformat. This blog has some good examples about ng-options. To give you an example: Assume: $scope.array = [ { key: 1, value: 'Display text 1!' }, { key: 2, value: 'Display text 2!' }, { key: 3, value: 'Display text 3!' } ] Then, using the following options: Would result in: Display text 1! Display text 2! Display text 3! $scope.result would be set to these option elements' value attribute. If you initialize $scope.result as 2, "Display text 2!" should be selected.
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/80078934
answers question: http://stackoverflow.com/q/26251807
downvote count: 0

http://stackoverflow.com/a/26214446
has comment: http://stackoverflow.com/comment/41110861
has comment: http://stackoverflow.com/comment/41110876
has body: In your examples username and id should be quoted! That expression has to evaluate to a string which will be used to look up the object property. Please refer to the documentation again, and you will see that predicate is a variable which resolves to a string value. Solution: &lt;div ng-repeat="row in asd | orderBy:'username':true"&gt; {{row.username}} &lt;/div&gt; Also, reverse should evaluate to a boolean expression. Working fiddle for your data.
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26214232
type: Answer
answers question: http://stackoverflow.com/q/26214232

http://stackoverflow.com/comment/41192241
type: Comment
type: AnswerComment
has text: That worked, thank you very much. EDIT: yes it looks like the webpage has access to `lastError`
score: 0
comment on: http://stackoverflow.com/a/26254729

http://stackoverflow.com/comment/41306291
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26320507
score: 0
has text: It looks like your `ready` function is called before any modifications are made to body. Try `ionic.Platform.ready`

http://stackoverflow.com/a/26331399
type: Answer
answers question: http://stackoverflow.com/q/26331355
score: 0
has body: There is nothing wrong with passing parameters as part of the query string. But implementing a little REST service is probably more elegant. Based on your current implementation the REST service would provide the following resources: GET /cities/{cityname} Example: GET /cities/paris

http://stackoverflow.com/comment/41252238
has text: `innerText` is your problem here.
comment on: http://stackoverflow.com/q/26289133
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26247590
favorite count: 0
score: 0
has title: How do I create a responsive website design?
answer count: 3
possible better answer: http://stackoverflow.com/a/26247621
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26247604
has comment: http://stackoverflow.com/comment/41173278
has comment: http://stackoverflow.com/comment/41173526
upvote count: 2
downvote count: 2
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41173557
has answer: http://stackoverflow.com/a/26247643
type: Question
has answer: http://stackoverflow.com/a/26247604
has body: I am in the process of designing a website and I want it to work with all screen resolutions. Here is an example of what I want. http://www.fork-cms.com/ My question is, what is the best way to code something like this? Would I do something like if(resolution &lt; 768px) //resize page and or move elements around else if(resolution == 1080px) ////resize page and or move elements around
tagged with: javascript
has answer: http://stackoverflow.com/a/26247621

http://stackoverflow.com/comment/41145027
has text: @Lucia what line in your code should trigger an error of an undefined controller? What would that help you?
comment on: http://stackoverflow.com/a/26232243
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26276566
has comment: http://stackoverflow.com/comment/41228191
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41234259
has title: Populating paragraph with text from object in loop
has comment: http://stackoverflow.com/comment/41233650
has comment: http://stackoverflow.com/comment/41226365
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41226560
has comment: http://stackoverflow.com/comment/41226654
has comment: http://stackoverflow.com/comment/41226508
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41226600
has body: I have a form form that either has input/select fields in form when account status is active, in this state you are able to add/edit user info, in another state Frozen, I would use the same view but replace the input and select fields with paragraph tags &lt;p class="form-control-static"&gt; for read-only purpose. I am populating the field when entering to EDIT mode with jQuery: function fillFormFromObject(form, obj) { form.find("input, select").each( function (i, el) { console.log(el); $(el).val(obj[el.name]); } ); } Now in paragraph case, how can I set the text for it from the object as well? Getting lost in here. I know that for paragraph element I would call text() method. But what would I pass in?
has comment: http://stackoverflow.com/comment/41232306
type: Question
has comment: http://stackoverflow.com/comment/41226833
has comment: http://stackoverflow.com/comment/41227881
has comment: http://stackoverflow.com/comment/41225625
has comment: http://stackoverflow.com/comment/41227321
has comment: http://stackoverflow.com/comment/41227007
score: 0
has answer: http://stackoverflow.com/a/26281381
answer count: 1

http://stackoverflow.com/comment/41128002
comment on: http://stackoverflow.com/q/26223193
score: 0
type: QuestionComment
type: Comment
has text: Looks like this should work: http://stackoverflow.com/questions/13159180/set-attribute-without-value

http://stackoverflow.com/a/26349698
score: 0
type: AcceptedAnswer
has body: Generally if you want 2 or more textures on the same model you merge them into a texture atlas. you can see a live example as the last example on this page Otherwise if you really want to use 2 or more textures (hint: except for special cases most programs don't do this) then you make your textures // for each texture var tex1 = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, tex1); gl.texImage2D(....); reference more than 1 texture in your shader uniform sampler2D u_tex1; uniform sampler2D u_tex2; Decide on how to choose 1 or the other texture in your shader. vec4 color1 = texture2D(u_tex1, v_coordsForTex1); vec4 color2 = texture2D(u_tex2, v_coordsForTex2); vec4 color = mix(color1, color2, mixAmount); It's up to you to decide how to set mixAmount. It could be a uniform, a formula, it could come from a varying that comes from an attribute so each vertex can choose the texture, etc... At render time Bind the textures to texture units gl.activeTexture(gl.TEXTURE0 + unitForTexture1); gl.bindTexture(gl.TEXTURE_2D, tex1); gl.activeTexture(gl.TEXTURE0 + unitForTexture2); gl.bindTexture(gl.TEXTURE_2D, tex2); Tell the shader which units you put the textures on gl.uniform1f(locationOfUTex1, unitForTexture1); gl.uniform1f(locationOfUTex2, unitForTexture2); Note: To clarify, many programs use multiple textures when drawing but usually those textures are a color map, a normal map, maybe a glow map, an environment map, an ambient occlusion texture, etc.. But very few programs use multiple color maps for a single draw. Instead they use a texture atlas. The one common exception I know of is terrain rendering where sometimes they'll have say dirt, grass, and snow textures and blend between them. It's usually rather uglier though than hand draw transitions with a texture atlas. It was mostly used in the early 2000s when 4meg of vram was common. Now most GPUs have 32x that as a minimum.
answers question: http://stackoverflow.com/q/26331474
type: Answer
accepted answer of: http://stackoverflow.com/q/26331474

http://stackoverflow.com/q/26269720
has answer: http://stackoverflow.com/a/26271010
has body: This is in my routes/product.js file in my node.js/express project which is using express-myconnection. How do I return multiple data sets for the view to use? I have the data object and the dropdown object being populated by the same query. I want to keep the data object like it is, but populate the dropdown object with a different query. exports.edit = function(req, res) { var id = req.params.id; req.getConnection(function (err, connection) { connection.query('SELECT * FROM products WHERE product_id = ?', [id], function (err, rows) { if (err) console.log("Error Selecting : %s ", err); res.render('products\\edit', { page_title: "Product : Edit", save_button_title: "Update", data: rows, dropdown:rows}); }); }); }
answer count: 1
tagged with: javascript
tagged with: express
score: 0
tagged with: node.js
has title: Returning multiple datasets to a Node.js View
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26271010
type: Question
linked to: http://stackoverflow.com/q/18008479

http://stackoverflow.com/comment/41214332
score: 2
has text: Worry about correctness, the performance difference here is not important.
comment on: http://stackoverflow.com/q/26270092
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26564978
accepted answer of: http://stackoverflow.com/q/26310828
type: Answer
answers question: http://stackoverflow.com/q/26310828
has body: I ended up setting up a proxy server for image downloads. Thanks a lot for pointers!
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41105321
comment on: http://stackoverflow.com/a/26211195
type: AnswerComment
score: 0
type: Comment
has text: One word: awesome. You made my day! :-)

angular-strap
tag name: angular-strap
type: Tag
tags question: http://stackoverflow.com/q/26333600

http://stackoverflow.com/comment/41143357
type: QuestionComment
comment on: http://stackoverflow.com/q/26219881
has text: Similar topic: http://help-forums.adobe.com/content/adobeforums/en/marketing-cloud-forum/adobe-marketing-cloud.topic.html/forum__1uim-hi_for_a_dtmimpl.html
score: 0
type: Comment

http://stackoverflow.com/q/26195903
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26200729
has title: Ext Js panel empty time field
answer count: 1
tagged with: extjs
tagged with: extjs-mvc
type: AnsweredQuestion
tagged with: extjs4.2
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26200729
type: Question
has body: I am new to ext js I am sorry if I couldn't explain my problem properly My problem is the time field in grid is displays as blank It displays the value if change both the type to string from date in model and disable rendering function formatTime . Below is the part of response json,model and view. I have copied the code from another working site. Please tell me how can debugg and find the solution and what will be possible reasons Extjs 4.2 mvc Value in json response "actualstarttime":"02:00 AM" model {name: 'actualstarttime', type: 'date'}, View { header: 'Time', dataIndex: 'actualstarttime', width: 85, renderer: this.formatTime, editor: { xtype: 'timefield', id : 'e_actualstarttime', /*allowBlank: false,*/ minValue: '12:00 AM', maxValue: '23:00 PM', increment: 30, anchor: '100%', editable : false, format: 'h:i A', submitFormat: 'h:i A', listeners: { change: function(roweditor, changes, record, rowIndex) { me.calculateInterval(roweditor, changes, record, rowIndex); }, afterrender: function( roweditor, changes, record, rowIndex ) { //TECHNOKRAFTS: Added Listner to apply validation depending on the status me.checkstatusvalidation(roweditor, changes, record, rowIndex); } } } } Formattime function called in render formatTime : function (value){ return value ? Ext.Date.dateFormat(value, 'g:i A') : ''; }

http://stackoverflow.com/a/26258587
type: Answer
has body: Based on @goleztrol's solution, I've created an alternate solution specifically for my situation (it might not work for everyone). I just ask the exact time when it's needed with this function, to know the exact miliseconds passed: var start = new Date(); var msPassed = function() { var now = new Date(); var ms = now.getTime() - start.getTime(); return ms } msPassed(); //returns time passed in ms I needed to position objects (on creation) depending on how much time passed until their creation, so for my case this is a perfect solution. However, my initial question asks for the perfect timer, and this is not it. Anyway, here it is for future reference.
accepted answer of: http://stackoverflow.com/q/26257805
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26257805
score: 0

http://stackoverflow.com/comment/41221454
comment on: http://stackoverflow.com/q/26273982
score: 0
has text: Can you include in your description the HTML structure of #catalog-body?
type: Comment
type: QuestionComment

gmail
type: Tag
tag name: gmail
tags question: http://stackoverflow.com/q/26217548

http://stackoverflow.com/a/26330146
accepted answer of: http://stackoverflow.com/q/26324033
upvote count: 3
answers question: http://stackoverflow.com/q/26324033
has body: If changing the markup is acceptable there is a possibility to achieve a somewhat similarly looking page without using JavaScript to show or hide, here is the Fiddle I have removed more ... line and made elements of event class to get hide when it is necessary I also made them to appear when hovering over more ... . The CSS I have added: .event:nth-child(n){ display: none; } .event:nth-child(1),.event:nth-child(2),.event:nth-child(3),.event:nth-child(4){ display: block; } .event:nth-child(5){ text-indent: -9999px; position: relative; display: block; color: black; border: none; background-color: #FFF; } .event:nth-child(5)::before{ position: absolute; text-indent: 0px; content: "more ..."; display: block; } .event:nth-child(5):hover{ position: static; text-indent: 0; border: 1px solid #3a87ad; background-color: #3a87ad; color: whitesmoke; } .event:nth-child(5):hover::before{ display:none; } .event:nth-child(5):hover ~ .event:nth-child(n){ display: block; } And for .event-box class I have commented out max-height: 76px; because in my browser 76px was not equal to the height of four .event elements stacked. Also removed update function.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3

http://stackoverflow.com/a/26329029
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/26328874
has body: try this without any plugin for dynamic creation of elements. Its pure javascript and JQuery: &lt;script&gt; var myDivs = ""; for(var i=0; i &lt;10; i++) { myDivs+= "&lt;div class='cover'&gt;&lt;/div&gt;"; } $(".coverflow").html(myDivs); &lt;script&gt; I think it clear your concept. Hope this works.
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41186889
comment on: http://stackoverflow.com/q/26254534
score: 0
has text: as like this http://plnkr.co/edit/WTQREUzelTxzFUxzvOx4?p=preview
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41283709
type: QuestionComment
has text: Yes. jQuery UI framework has a modal dialog, Bootstrap has a modal dialog, any many others (pretty much any UI framework worth looking into) comes with some kind of modal dialog functionality out of the box. You can usually configure them as to whether they block input with an overlay or not.
score: 1
comment on: http://stackoverflow.com/q/26307951
type: Comment

http://stackoverflow.com/comment/41287623
type: QuestionComment
comment on: http://stackoverflow.com/q/26309549
score: 0
has text: Not working for me either. npm install express@4.8.5 works.
type: Comment

http://stackoverflow.com/a/26227058
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26226598
answers question: http://stackoverflow.com/q/26226598
type: AcceptedAnswer
downvote count: 0
has body: All you need to do is dump the raw data in your HTML code between script tags: &lt;script&gt; &lt;?php echo rawurlencode($rawdata); ?&gt; console.log(qdb_numcols); // &lt;-- the data is now available &lt;/script&gt;

http://stackoverflow.com/q/26347202
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/45254266
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26347821
score: 1
has title: Using jqueryDataTables in Angular, getting childNodes error in Controller
has body: I'm using jqueryDataTables to sort data in tables in my app. Rather then using a script tag on the page which it needs to be on, figured I could just include it inside of my Angular Controller code for that view, however I'm and getting a strange error. I've used a mix of jQuery before inside of Angular, so not sure why it's not working in this case. Error and code below: TypeError: Cannot read property 'childNodes' of undefined // Controller for Manage Users app.controller('ManageUsersController', function($scope) { // Init $scope.status_dropdown = false; $scope.deactivate_btn = false; // Check all users: this.checkAll = function(target) { var checkboxes = document.getElementsByName('checkboxUser'); var checkAll = document.getElementsByName('checkboxAll'); for(var i=0, n=checkboxes.length;i<n;i++) { checkboxes[i].checked = checkAll[0].checked; } }; alert('1'); $('#manage_users_table').DataTable(); alert('2'); }); HTML during first alert message: HTML during 2nd alert message, after DataTable() has been initialized: The alert pops up twice for each. HTML Gist: https://gist.github.com/leongaban/4f1de6bee8672b4177e5 ... hardcoded table data here
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/15697011
answer count: 3
has answer: http://stackoverflow.com/a/53213290
has answer: http://stackoverflow.com/a/45254266
has answer: http://stackoverflow.com/a/26347821

http://stackoverflow.com/q/26267508
has comment: http://stackoverflow.com/comment/41209914
has comment: http://stackoverflow.com/comment/41209895
has comment: http://stackoverflow.com/comment/41209888
type: Question
linked to: http://stackoverflow.com/q/10778426
tagged with: javascript
has title: Enable button on ASP.NET after HttpResponse
score: 0
answer count: 1
has body: I have button on my ASP.NET page which calls gets disabled on click(to prevent double click) and call this function: Private Sub ExportToExcel(ByVal nameReport As String, ByVal wControl As GridView, ByVal sTitle As String) Dim responsePage As HttpResponse = Response Dim sw As New StringWriter() Dim htw As New HtmlTextWriter(sw) Dim pageToRender As New Page() Dim form As New HtmlForm() wControl.AllowPaging = False wControl.EnableViewState = False wControl.DataSource = GetDataSource(False) wControl.DataBind() wControl.Caption = "" + sTitle + "" form.Controls.Add(wControl) pageToRender.Controls.Add(form) responsePage.Clear() responsePage.Buffer = True responsePage.ContentType = "application/vnd.ms-excel" responsePage.AddHeader("Content-Disposition", "attachment;filename=" & nameReport) responsePage.Charset = "UTF-8" responsePage.ContentEncoding = Encoding.Default pageToRender.RenderControl(htw) responsePage.Write(sw.ToString()) responsePage.End() End Sub Which I use to export some data to Excel. Now I need to re-enable the button on client side when the HttpResponse is finished. How can I do that?
tagged with: asp.net
has answer: http://stackoverflow.com/a/26267993
has comment: http://stackoverflow.com/comment/41209970
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41209763
has comment: http://stackoverflow.com/comment/41210213
tagged with: httpresponse

http://stackoverflow.com/q/26222604
has comment: http://stackoverflow.com/comment/41127085
possible better answer: http://stackoverflow.com/a/26222771
has title: Why is Array instanceof Object?
has comment: http://stackoverflow.com/comment/41126759
linked to: http://stackoverflow.com/q/23622695
has answer: http://stackoverflow.com/a/26222763
answer count: 4
type: AnsweredQuestion
has body: I was playing with instanceof in javascript and I stumbled upon the following. Array instanceof Object returns true Object instanceof Array returns false What is the relationship between Array and Object here ?
has answer: http://stackoverflow.com/a/26222649
downvote count: 0
tagged with: javascript
score: 6
has answer: http://stackoverflow.com/a/26222656
type: Question
accepted answer: http://stackoverflow.com/a/26222656
has answer: http://stackoverflow.com/a/26222771
upvote count: 6
favorite count: 0
has comment: http://stackoverflow.com/comment/41126955

konacha
type: Tag
tags question: http://stackoverflow.com/q/26200424
tag name: konacha

http://stackoverflow.com/comment/41083772
has text: @BjornTipling a generic polyfill wouldn't be. A context-specific implementation, where you manually nullify the links would be possible. So `Stack.prototype.kill = function () { delete registry[this.id]; }` is something you'd have to manually control, rather than just letting GC do it's thing (so it's prone to human error), but would serve the same purpose as WeakMap, and could just be ignored when WeakMap is widely available - something you made mention of, already.
comment on: http://stackoverflow.com/a/26199235
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41239183
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26271984
has text: I would suggest checking for the exceptional condition rather than letting it throw. It is far easier that way. See the second part of my answer.

http://stackoverflow.com/a/26268588
has body: you have to prevent the submit event to bubble up to avoid the default page refresh behavior. so your code would need to be changed to something like this (i moved your event handler assignment into javascript because it's cleaner) $('#Send_Chat').on('submit', function(e){ e.preventDefault(); //this prevents the refresh because it cancels the default event bubbling $.ajax({ //make sure your form data gets to the server ... type: "POST", url: &lt;% toDB() %&gt;, data: $(this).serialize(), success: function() { //done - you've submitted your message } }); $('#T_Body_FieldID').on("keydown", function() { if (event.keyCode == 13) { $('#Send_Chat').submit(); // Submit form code } }); and your html &lt;form name="Send_Chat" id="Send_Chat" action="#" method="post"&gt; &lt;textarea name="T_Body_Field" id="T_Body_FieldID"&gt;&lt;/textarea&gt; &lt;input type="submit" value="send"&gt; &lt;/form&gt;
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26268286
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41226946
type: AnswerComment
comment on: http://stackoverflow.com/a/26276871
type: Comment
has text: @IsmaelMiguel : I tried to take his code and make it working with minimal alterations. That was the attempt. :). I believe he is in a learning stage and its better not to confuse him with micro optimizations.
score: 0

http://stackoverflow.com/q/26258482
score: 2
tagged with: internet-explorer
answer count: 0
has title: javascript check if java enabled in IE WITHOUT running jar
has comment: http://stackoverflow.com/comment/41221945
tagged with: java
type: Question
downvote count: 0
tagged with: javascript
has body: I wanna detect if java is enabled in a browser without running any jars.I did this in Chrome and Firefox with the navigator.plugins and it's working great, but in IE its returning always true.Any ideas?Thanx in advance.
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: browser-detection
linked to: http://stackoverflow.com/q/121203
has comment: http://stackoverflow.com/comment/41194281

http://stackoverflow.com/q/26303392
accepted answer: http://stackoverflow.com/a/26316850
score: 0
tagged with: screen-resolution
tagged with: javascript
has body: I need that square image always be the same size on any screen (including mobile, tablet...). So if I take the ruler and measure image on any screen it have to be 5mm for example. It must be in JavaScript. I wonder if the size of that image depends only of screen's DPI or it depends of screen resolution also? If in JavaScript I detect screen's DPI (and resolution if needed) is there any formula (or some JavaScript function) to calculate image size to get always the same result? In the end, can I define image size in some unit which will ensure image to be always the same? I asked the question here because it is connected to JavaScript, if you think that it is more suitable for some other forum please let me know. Thanks...
tagged with: dpi
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26316850
tagged with: resolution
tagged with: screen
answer count: 1
has title: Always the same size of image on all screens

http://stackoverflow.com/comment/41240830
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26282749
has text: @Teemu according to MDN it returns an Object, not a reference (if you create var rect2 = span.getBoundingClientRect(); rect === rect2 // false) and in other browsers and IE8+ you can happily add properties. And, as you point out, it is a documented issue.
score: 0

http://stackoverflow.com/comment/41165734
comment on: http://stackoverflow.com/q/26243466
type: Comment
type: QuestionComment
score: 0
has text: You may be trying to call the function before the `.ready` is fired

http://stackoverflow.com/q/26206999
has comment: http://stackoverflow.com/comment/41097247
answer count: 2
has comment: http://stackoverflow.com/comment/41097533
tagged with: javascript
tagged with: jquery
has title: Automatically set height for parent div of absolute children
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I've got a situation, where i have a few divs with absolute position (for 3d flipping effect ). As a result, parent div's height is very small and absolute content overflows on top of lower content. Can't really set a fixed height for responsive reasons. I'm planning to give children divs relative position, and then gather height with a help of jquery and set the height based on it. But there really is a lot of elements and vars for responsive. Is there any other, more elegant way to make children fit the parent? http://jsfiddle.net/xyjrLa2p/ html Title Absolute Absolute Absolute css .parent { position:relative; background-color:yellow; } .absolute { position:absolute; } .absolute p { padding:5px; } .clearboth { clear:both; }
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26207375
has answer: http://stackoverflow.com/a/26207179
type: Question
has comment: http://stackoverflow.com/comment/41097469

http://stackoverflow.com/comment/41327729
comment on: http://stackoverflow.com/q/26331906
has text: i use it all the time in devtools to save typing, which alone makes it worth including...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26332366
has comment: http://stackoverflow.com/comment/41329326
downvote count: 2
linked to: http://stackoverflow.com/q/23740548
has comment: http://stackoverflow.com/comment/41329390
has comment: http://stackoverflow.com/comment/41329035
type: AnsweredQuestion
score: -2
accepted answer: http://stackoverflow.com/a/26333690
has title: Passing PHP variable directly to Javascript, bypassing AJAX, how?
type: Question
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41329738
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/41329093
favorite count: 0
tagged with: ajax
has body: I have the following javascript that verifies and passes the 'artwork' file to a PHP script on my server, which then has some redundant verification of its own (one can never be too safe) and then writes the file to /uploads. I need to dump the $basename PHP variable in its final state back to the javascript to then write that to a hidden input (ID="artwork_filename"). I can echo the $basename to the 'success' handler, but it feels so inelegant to then have to capture that $basename and strip it out of the result - I want an elegant solution, preferably passing $basename directly to a variable on the javascript. Javascript: PHP: <?php $allowedExts = array("zip", "rar"/*, "ai", "eps", "psd", "bmp", "jpg", "png", "tiff"*/); if (@$_FILES['file'] == null) { echo "' . "Please choose a file before clicking upload"; exit(); } else { $fileName = $_FILES["file"]["name"]; $fileTmpLoc = $_FILES["file"]["tmp_name"]; $fileType = $_FILES["file"]["type"]; $fileSize = $_FILES["file"]["size"]; $fileErrorMsg = $_FILES["file"]["error"]; $temp = explode(".", $_FILES["file"]["name"]); $name = pathinfo($_FILES["file"]["name"], PATHINFO_FILENAME); $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION); $i = ''; } //Check for max file size breach //OR NOT: stop it on JS side to prevent long file upload //and then alerting user that their file is too big! //(Also prevents sidestepping ugly PHP error kickout if file is too big. if ((($_FILES["file"]["type"] == "application/zip") || ($_FILES["file"]["type"] == "application/x-zip") || ($_FILES["file"]["type"] == "application/x-zip-compressed") //|| ($_FILES["file"]["type"] == "application/x-rar-compressed") /*|| ($_FILES["file"]["type"] == "application/postscript") || ($_FILES["file"]["type"] == "image/vnd.adobe.photoshop") || ($_FILES["file"]["type"] == "image/bmp") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/tiff")*/) && ($_FILES["file"]["size"] < 5…
has answer: http://stackoverflow.com/a/26332656
has answer: http://stackoverflow.com/a/26333690
tagged with: php
possible better answer: http://stackoverflow.com/a/26332656

http://stackoverflow.com/q/26303192
has body: I have allready Google tracking conversion. Now I need Facebook pixel tracking also. My Google Head Script looks like this: &lt;script&gt; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'XX-XXXXXXXX-X' 'auto'); ga('send', 'pageview'); &lt;/script&gt; My JavaScript Call for Google looks like this: if (typeof ga !== 'undefined') { ga('send', 'event', 'Blub', 'blub'); } Now I need to add Facebook tracking and I got this Script from Facebook: &lt;script&gt;(function() { var _fbq = window._fbq || (window._fbq = []); if (!_fbq.loaded) { var fbds = document.createElement('script'); fbds.async = true; fbds.src = '//connect.facebook.net/en_US/fbds.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fbds, s); _fbq.loaded = true; } })(); window._fbq = window._fbq || []; window._fbq.push(['track', 'XXXXXXXXXXXXX', {'value':'0.00','currency’:'XXX'}]); &lt;/script&gt; How can I integreat the Facebook code without to distrub the Google Code? And is there a problem if I use both? BR
answer count: 1
has answer: http://stackoverflow.com/a/26333307
tagged with: tracking
tagged with: facebook
has title: Facebook tracking AND Google tracking Script
tagged with: google-analytics
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26333307
score: 0

http://stackoverflow.com/q/26332905
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: php
score: 1
has body: I want to create a functionality where on each page there will be an option to download a PDF file which is page specific, and when user clicks on the button to download a popup will be created which will first ask the user to fill a form(Its a Hubspot form) and on clicking submit it will download the PDF file in user's local machine. Can any one help me with this!! I am new to Wordpress and PHP
tagged with: wordpress
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41330669
has answer: http://stackoverflow.com/a/26333616
tagged with: javascript
has title: Download pdf file after submitting the Hubspot form in Wordpress

http://stackoverflow.com/q/26219393
accepted answer: http://stackoverflow.com/a/26219692
tagged with: knockout.js
tagged with: javascript
has comment: http://stackoverflow.com/comment/41120813
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/26219692
possible better answer: http://stackoverflow.com/a/26219810
type: Question
has answer: http://stackoverflow.com/a/26219810
has body: My target is to show "noSets" template if observableArray length less 0 and render template with item details - "showSets", if observableArray length greater 0. I'd like to use templates for this purpose, but FireBug show error: Cannot find template with ID "templatename". Here is ViewModel: function SetsViewModel() { var self = this; self.usersets = ko.observableArray(); self.getTemplate = function () { return self.usersets().length > 0 ? "showSets" : "noSets"; } } $(document).ready(function () { ko.applyBindings(new SetsViewModel(), document.getElementById('user_sets')); }); And here is HTML markup: How can I fix it?
tagged with: templates
has title: Knockout.js dynamically selecting template error: "Cannot find template with ID''"
score: 0
answer count: 2

http://stackoverflow.com/a/64327242
answers question: http://stackoverflow.com/q/26327368
score: 0
type: Answer
has body: One has dynamic changed in DOM tree,another one doesn't. function querySelectorDelete(){ var box2 = document.querySelector("#box1").querySelectorAll(".box2"); Array.prototype.forEach.call(box2,function(el){ el.remove(); }) } function getElementsDelete(){ var box2 = document.getElementById("box1").getElementsByClassName("box2"); Array.prototype.forEach.call(box2,function(el){ el.remove(); }) } #box1{width:300px;height:300px;background:yellow;color:#fff;} .box2{width:50px;height:50px;background:red;margin:5px;} .box3{width:100px;height:100px;background:blue;margin:5px;} first second third forth Delete Box2 Delete Box2

http://stackoverflow.com/a/26325216
score: 1
answers question: http://stackoverflow.com/q/26325035
downvote count: 0
type: Answer
upvote count: 1
has body: If you modify your HTMLString by setting the value as the id or a data- attribute of the image and pass the reference to clicked button using this as follows: htmlStr += " " + " " + "" +" " +"" +" "+ photos[i].description + " total likes " + photos[i].likes + " " +" " +" " +" " You can then use jquery to access the corresponding images id like: function unlikePhoto(elm){ var photoId = $(elm).closest(".images").find("img").attr("id"); }; Side note: Having multiple elements with same id is invalid so change it to class name
has comment: http://stackoverflow.com/comment/41314844

http://stackoverflow.com/comment/41179437
type: Comment
score: 0
has text: 1. As far as I understood, this is a “static“ value, save it using `phpMySqlAdmin` or like. 2. Whether there is a problem with saving data to the database, please provide the code you use to write the value to database. 3. Is your page is set to be UTF-8 encoded? Try to change `"&#176;C"` to explicit `°C` and see, what’s being printed out.
type: AnswerComment
comment on: http://stackoverflow.com/a/26251020

http://stackoverflow.com/comment/41121474
has text: @gummage you mean (correct me if I'm wrong) you want to `setAttribute` to an empty `variable` ??
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26219858

http://stackoverflow.com/comment/41142258
type: Comment
comment on: http://stackoverflow.com/a/26230455
has text: but am not getting my pop up window open
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41118310
has text: where is badly formatted? why not put a online image url for img source.Try to solve what i want reading all comments and answers here
type: Comment
comment on: http://stackoverflow.com/a/26208759
type: AnswerComment
score: 0

http://stackoverflow.com/a/26262549
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41201306
has body: If you are using my fork of tablesorter, you can accomplish this at least two different ways: Add a sorter-digit class name to the headers Note use a Class name in the headers option (added in v2.17.0) - here is a demo: headers : { '.note' : { sorter: 'digit' } }
accepted answer of: http://stackoverflow.com/q/26257482
type: Answer
answers question: http://stackoverflow.com/q/26257482
score: 0

http://stackoverflow.com/q/26196928
tagged with: crud
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41085185
type: Question
has body: I am using AJAX to render my items partial so that I can create a new item directly in the index page. Right now the form sort of works. I can create an item and it will get added to the database, but in order to see the change on the index page I have to hit refresh. I can destroy really easy straight from the index page here is the code for that. I did try and rework this destroy to instead create, but that was unsuccessful. Any suggestions would be great. I am trying to keep the code fairly simple like the destroy function. destroy.js.erb $('.delete_item').bind('ajax:success', function() { $(this).closest('tr').fadeOut(); }); Here is my index.html. This is just the basic rails styling. Listing items Content Done <% @items.each do |item| %> <%= item.content %> <%= item.done %> <%= link_to 'Show', item %> <%= link_to 'Edit', edit_item_path(item) %> <%= link_to 'Destroy', item, method: :delete, data: { confirm: 'Are you sure?' }, remote: true, class: 'delete_item' %> <% end %> <%= render 'form' %> create.js.erb $('.new-item').html("<%= escape_javascript(render partial: 'items/form', locals: {item: @item}) %>"); Items Controller: class ItemsController < ApplicationController before_action :set_item, only: [:show, :edit, :update, :destroy] respond_to :html, :js # GET /items # GET /items.json def index @items = Item.all @item = Item.new #will rename later to @new_item respond_to do |format| format.html format.json format.js end end # GET /items/1 # GET /items/1.json def show end # GET /items/new def new @item = Item.new end # GET /items/1/edit def edit end # POST /items # POST /items.json def create @item = Item.new(item_params) respond_to do |format| if @item.save format.html { redirect_to @item, notice: 'Item was successfully created.' } format.json { render :show, status: :created, location: @item } else format.html { render :new } format.json { render json: @item.errors, status: :unprocessable_entity } end end end # PATCH/PUT /items/1 # PATCH/PUT /items/1.json def …
has comment: http://stackoverflow.com/comment/41090771
tagged with: javascript
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/26782101
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41129052
favorite count: 0
tagged with: ajax
has title: Rails 4 ajax not refreshing after hitting submit
type: UnansweredQuestion

http://stackoverflow.com/q/26218641
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: $(window).scroll(function() { var y = $("#pointed").scrollTop(); var title = $("#subTitle"); if (y > $("#hdr").height()) { if (!title.data("old")) { title.data("old", title.html()).html("").find("a").text("new title"); title.find("a").click(function(e) { e.preventDefault(); $.scrollTo(0, "fast"); }); } } else if (title.data("old")) { title.html(title.data("old")).data("old", null); } }); The code Above doesn't work. Pointed is ID modal header and hdr is ID header of website. and subtitle is id of title( title )..and i want to make a scroll modal from pointed to hrd and than replace title of subtitle with new title.
type: UnansweredQuestion
has title: How to scroll modal to replace Div/h4?
has comment: http://stackoverflow.com/comment/41119066
has comment: http://stackoverflow.com/comment/41119823
answer count: 0
tagged with: scroll
type: Question
tagged with: modal-dialog
has comment: http://stackoverflow.com/comment/41118907
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26269394
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41213438
type: Answer
downvote count: 0
has body: Assuming that your implementation does work in iOS 7, this is likely this known issue: https://forums.dropbox.com/topic.php?id=120846 Unfortunately, this is due to a bug in iOS 8, so it's up to Apple to fix.
score: 1
accepted answer of: http://stackoverflow.com/q/26269297
answers question: http://stackoverflow.com/q/26269297

http://stackoverflow.com/a/26246779
answers question: http://stackoverflow.com/q/26246701
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41172062
downvote count: 0
has body: You can e.g. use jquery.inview to start the animation as soon as an element that should be animated is in view when scrolled down. Example usage from there: $('div').bind('inview', function(event, isInView, visiblePartX, visiblePartY) { if (isInView) { // element is now visible in the viewport if (visiblePartY == 'top') { // top part of element is visible } else if (visiblePartY == 'bottom') { // bottom part of element is visible } else { // whole part of element is visible } } else { // element has gone out of viewport } }); Just a Fiddle I used in another answer as example for inview - when you scroll down, the dial get's animated as soon as an element to which inview is bound is in view.
type: Answer

http://stackoverflow.com/q/26246390
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41171215
has comment: http://stackoverflow.com/comment/41171255
has body: Hey I am checking if for existence of $_SESSION variable from javascript.. if (&lt;?php echo isset($_SESSION["variable"]); ?&gt;){ //alert ("lol"); } if it exists it works fine, otherwise it gives java script error. For example alert("&lt;?php echo isset($_SESSION["variable"]); ?&gt;"); gives empty alert, but it doesn't give errors What am i missing?
type: Question
has answer: http://stackoverflow.com/a/26246443
possible better answer: http://stackoverflow.com/a/26246561
tagged with: session
has answer: http://stackoverflow.com/a/26246561
tagged with: javascript
score: 0
answer count: 2
has title: Checking isset on session stops javascript
accepted answer: http://stackoverflow.com/a/26246443
has comment: http://stackoverflow.com/comment/41171199
tagged with: php

http://stackoverflow.com/q/26195623
tagged with: javascript
favorite count: 0
has body: I am trying to write a very simple JS program. I want it to generate 10 random numbers between 1 and 100 and display how many of them are even and how many are odd. I've been looking all over and I can't find why this isn't working. It's displaying 0 even numbers and 10 odd numbers, no matter the combination. What am I overlooking? function main() { var number = 0; var totalNumbers = 0; var evenNumbers = 0; var oddNumbers = 0; document.write("Here are ten random numbers between 1 and 100:&lt;br&gt;&lt;br&gt;"); while(totalNumbers &lt; 10) { number = document.write((Math.floor((Math.random()* 100)+1)) + "&lt;br&gt;"); if(number % 2 == 0) { evenNumbers++; } else { oddNumbers++; } totalNumbers++; } document.write("&lt;br&gt;&lt;br&gt;Even Numbers: " + evenNumbers + "&lt;br&gt;" + "Odd Numbers: " + oddNumbers); }
has title: What's wrong with this even/odd Javascript?
score: 0
has comment: http://stackoverflow.com/comment/41076619
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26195655
has comment: http://stackoverflow.com/comment/41076496
type: Question
accepted answer: http://stackoverflow.com/a/26195655
answer count: 1

http://stackoverflow.com/q/26314174
type: Question
score: 5
has comment: http://stackoverflow.com/comment/41294607
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41294539
has answer: http://stackoverflow.com/a/26318256
has body: I've just downloaded Visual Studio 2013 Express for Web and I want to know how I can deploy JavaScript, HTML5 and CSS3 only projects? I can't find a suitable template or way to do it. I already searched for JavaScript templates online, but still unsuccessful. I've even tried to download Visual Studio 2013 Express for Windows 8. Does anyone know how I can solve it and start developing for web using VS2013 Express?
has comment: http://stackoverflow.com/comment/41294816
has comment: http://stackoverflow.com/comment/41294653
answer count: 2
has comment: http://stackoverflow.com/comment/41294633
has comment: http://stackoverflow.com/comment/41294756
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: visual-studio-2013
accepted answer: http://stackoverflow.com/a/26318256
tagged with: css
has answer: http://stackoverflow.com/a/34843790
tagged with: visual-studio
has comment: http://stackoverflow.com/comment/41294785
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41294662
has title: JavaScript HTML5 CSS3 project template in Visual Studio 2013
possible better answer: http://stackoverflow.com/a/34843790
has comment: http://stackoverflow.com/comment/41295229
has comment: http://stackoverflow.com/comment/41294813

http://stackoverflow.com/q/26342246
tagged with: jquery
favorite count: 0
score: -3
linked to: http://stackoverflow.com/q/684672
duplicate of: http://stackoverflow.com/q/4244896
has comment: http://stackoverflow.com/comment/41346672
has comment: http://stackoverflow.com/comment/41347269
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26342319
downvote count: 3
has comment: http://stackoverflow.com/comment/41346535
type: Question
has title: Get value of object inside a for loop with dynamic variable
tagged with: javascript
has body: I'm trying to get a value of property (or more) that user provides inside a for loop. OBJECT: RULES: { "required": /.+/, "numeric": /^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$/ } FOR LOOP: $("input").keyup(function() { var inputVal = $(this).val(); var rules = $(this).data('rules').split(" "); for (var i = 0; i &lt; rules.length; i++) { console.log(rules[i]); // OK - return "required" and "numeric" console.log(RULES.required); // OK - return "/.+/" console.log(RULES.rules[i]); // NOT OK }; }); MARKUP &lt;input data-rules="required numeric" type="text"&gt; The problem is that it provokes an error: "Cannot read property '0' of undefined". So how can I look for the value of "rule[i]" and not "rule[i]" itself? Why does not translate by itself? Thank you in advance.
linked to: http://stackoverflow.com/q/4244896
tagged with: for-loop
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26342319

http://stackoverflow.com/a/26278484
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26278286
has body: As @karlingen mentioned I also didn't understand your question properly, You cant add a function inside another function. But in fact if you want to change the json value in angularjs on click action you can do like this JSFiddle var app = angular.module('myApp', []); app.controller('Controller', function ($scope) { $scope.start = function (records) { alert(records.col1); records.col1 = 'test1'; alert(JSON.stringify($scope.records)); } $scope.records = { col1: 'a1', col2: 'd1' }; }); Change
type: Answer
accepted answer of: http://stackoverflow.com/q/26278286
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41229619
has comment: http://stackoverflow.com/comment/41234813

http://stackoverflow.com/a/26349016
accepted answer of: http://stackoverflow.com/q/26348904
score: 0
has comment: http://stackoverflow.com/comment/41361517
type: Answer
has body: You need to specify which image you're uploading the caption for. As @dandavis said, $("img") will get ALL the images, which is why every picture is getting the caption. Inside the .each function, this refers to the current element. However, since you're inside the callback function of .getJson, you need to pass it in some way: //Option 1 - Using Closure var $this = $(this); $.getJSON(apiUrl, function(data){ $this.after(''+data.photo.title._content+ ' by ' +data.photo.owner.username+''); }) //Option 2 - Explicitly binding this $.getJSON(apiUrl, function(data){ $(this).after(''+data.photo.title._content+ ' by ' +data.photo.owner.username+''); }.bind(this))
answers question: http://stackoverflow.com/q/26348904
type: AcceptedAnswer

http://stackoverflow.com/q/26282210
has comment: http://stackoverflow.com/comment/41274454
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41241625
has comment: http://stackoverflow.com/comment/41268192
type: Question
has answer: http://stackoverflow.com/a/26305229
accepted answer: http://stackoverflow.com/a/26305229
tagged with: google-visualization
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/41274288
has title: How to show small values with large values in google charts?
answer count: 1
has comment: http://stackoverflow.com/comment/41274738
favorite count: 0
has body: You can see in this fiddle In the year 2004 I have values of 1000, and in the other years I have large values, for that reason in the scale the chart doesn't seems able to rendered, what can I do to show those values. I was reading this. Is there a way to do something like that in google chart? Here is the code The chart

http://stackoverflow.com/comment/41099722
comment on: http://stackoverflow.com/a/26199680
type: Comment
has text: @AllanNienhuis It's not universal. Among popular libraries, Backbone, Ember and React capitalize their namespace, Knockout, Angular, jQuery, and d3 do not. But it's certainly a very common convention and not wrong.
score: 1
type: AnswerComment

http://stackoverflow.com/q/26231208
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41148237
downvote count: 0
has answer: http://stackoverflow.com/a/26231546
favorite count: 0
has body: I have a webpage where admin users can edit the text on the page. But when they insert the text into the mysql database, it sometimes adds more and more white spaces before the acual content. If you place your cursur before the first word on the page and spam backspace for a while, the whitespace in the database dissappears. But over time, the more you keep editing the page, more and more whitespaces are added again. I did a lot of trouble shooting, but I just can't figure out what causes the whitespaces to be added. It does not always happen making it really difficult to troubleshoot. Here's my code: As my code is pretty long, I tried to translate most of the content to english. If you want to translate something that in't already translated, the original language is Dutch. over_ons.php - Shows edit button and page content from the database. //Active page: $pagina = 'over_ons'; ?> <input type='hidden' id='pagina' value='<?php echo $pagina; ?>'> <?php //Active user: if(isset($_SESSION['correct_ingelogd']) and $_SESSION['functie']=='admin'){ $editor = $_SESSION['gebruikersnaam']; ?> <input type='hidden' id='editor' value='<?php echo $editor; ?>'> <?php } ?> <?php //Get eddited page content from the database $query=mysql_query("SELECT inhoud FROM paginas WHERE naam_pagina='" .$pagina. "'"); while($inhoud_test=mysql_fetch_array($query)){ $inhoud=$inhoud_test[0]; } //Show Content ?> <?php echo $inhoud; ?> <?php if(isset($_SESSION['correct_ingelogd']) and $_SESSION['functie']=='admin') {?> <?php } javascript.js - Sents page content to the php file sent_data.php: //If the system is in edit mode and the user tries to leave the page, //let the user know it is not so smart to leave yet. $(window).bind('beforeunload', function(){ var value = $('#sent_data').attr('value'); //change the name of the edit button if(value == 'Verstuur bewerkingen'){ return 'Are you sure you want to leave the page? All unsaved edits will be lost!'; } }); //Make content editable and send page conten…
has answer: http://stackoverflow.com/a/26231650
possible better answer: http://stackoverflow.com/a/26231546
tagged with: http://stackoverflow.com/tag/html
has title: String value accumulating empty spaces in MySQL database
has answer: http://stackoverflow.com/a/26231810
tagged with: php
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26231624
score: 1
accepted answer: http://stackoverflow.com/a/26231810
tagged with: mysql

http://stackoverflow.com/comment/41291034
has text: @Bri.H. More complex doesn't always mean worse. You try debugging dynamically created inline attributes in two years' time! This would, of course, seem less complex if you didn't have to dynamically generate the `a` element.
comment on: http://stackoverflow.com/a/26312029
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41168613
type: AnswerComment
type: Comment
has text: Ember should serve the correct route even if you return the index.html page. Did it not work for you?
comment on: http://stackoverflow.com/a/26237834
score: 0

http://stackoverflow.com/comment/41098997
score: 0
has text: i have already describe that i need fake counter with random numbers and it did not change with reload page or refresh it will change randomly .
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26207689

http://stackoverflow.com/q/26209515
has answer: http://stackoverflow.com/a/26981182
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26981182
tagged with: zendesk
has title: Zendesk Update Ticket with several comments
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to update a ticket in Zendesk through their API with several comments. Apparently, it seems that I am using a wrong format for that, as the comments do not appear in my Zendesk dashboard... I am using the following format (JSON): { "ticket" : { "external_id": externalID, "created_at": incomingTicket.startDate, "updated_at": incomingTicket.lastModificationDate, "type": lType, "subject": incomingTicket.topic, "description": incomingTicket.description, "priority": lPriority, "status": lStatus, "comments": [{"id": 3456, "body": "First comment Fix"}, {"id": 3457, "body": "Second Command Fix"}], "due_at": incomingTicket.endDate, "tags": [incomingTicket.label] } }; Can anyone see what I am doing wrong? Thanks a lot in advance!
type: Question

http://stackoverflow.com/comment/41140522
type: QuestionComment
comment on: http://stackoverflow.com/q/26229860
score: 1
has text: use localStorage instead of cookies.
type: Comment

http://stackoverflow.com/comment/41167263
type: Comment
score: 0
type: AnswerComment
has text: @nevermind: That jsFiddle appears to be working. Though keep in mind that you still don't really need the `class`es at all. You can identify the target elements without them, so removing them makes the markup a little cleaner.
comment on: http://stackoverflow.com/a/26244004

http://stackoverflow.com/comment/41223974
score: 1
comment on: http://stackoverflow.com/q/26275186
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/24203492/transform-origin-on-svgs-in-firefox

http://stackoverflow.com/comment/41226533
type: AnswerComment
comment on: http://stackoverflow.com/a/26277052
type: Comment
score: 0
has text: it's giving undefined

http://stackoverflow.com/a/26336458
answers question: http://stackoverflow.com/q/26336229
upvote count: 1
downvote count: 0
has body: Let say if you are having dynamic URL, you can store it to the JavaScript variable like: var base = "&lt; ? php echo $phpstormurl; ? &gt;"; var relative = '/hello/world'; After that you can combine both of them to single one like: var absolute = base + relative; If you alert the path it will show you the full path.
has comment: http://stackoverflow.com/comment/41408305
type: Answer
score: 1

http://stackoverflow.com/q/26315885
tagged with: cryptography
linked to: http://stackoverflow.com/q/17382200
has comment: http://stackoverflow.com/comment/41315526
tagged with: cryptojs
score: -1
tagged with: aes
has comment: http://stackoverflow.com/comment/41440234
has comment: http://stackoverflow.com/comment/41341627
has body: I am trying to encrypt a data in java and decrypt the same in javascript. There is already a similar question in SO but it does not work for me. My question is - Encrypted Text given by Java code is not getting decrypted by Javascript. I have hardcoded the the encrypted text and key in my JS below. P.S. I know decryption on the UI is of no use as Key will be visible and any user can decode the code. But my requirement of doing so is to bypass a Penetration Testing tool. So please suggest how it can be done Java code - import java.security.Key; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base64; public class Crypt { private static final String ALGO = "AES"; private static final byte[] keyValue = new byte[] { 'A', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k','l', 'm', 'n', 'o', 'p'}; public static String encrypt(String Data) throws Exception { Key key = generateKey(); String keyForJS = Base64.encodeBase64String(keyValue); System.out.println("Key2 = " + keyForJS); Cipher c = Cipher.getInstance(ALGO); c.init(Cipher.ENCRYPT_MODE, key); byte[] encVal = c.doFinal(Data.getBytes()); String encryptedValue = Base64.encodeBase64(encVal).toString(); return encryptedValue; } private static Key generateKey() throws Exception { Key key = new SecretKeySpec(keyValue, ALGO); return key; } public static void main(String a[]) throws Exception { System.out.println("Encryption = " + Crypt.encrypt("Test")); } } execution of the above code in eclipse generate the following output - Key2 = [B@670b5064 Encryption = [B@3c8b22e5 Now i will use this data for my JS Code &lt;script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"&gt;&lt;/script&gt; &lt;script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/mode-ecb-min.js"&gt;&lt;/script&gt; var base64Key = "[B@670b5064"; // This is the output key from Java var key = CryptoJS.enc.Base64.parse(base64Key); var decryptedData = CryptoJS.AES…
has comment: http://stackoverflow.com/comment/41344045
upvote count: 3
has comment: http://stackoverflow.com/comment/41359767
has comment: http://stackoverflow.com/comment/41303566
has comment: http://stackoverflow.com/comment/41440149
answer count: 1
has title: Java Encryption and Javascript Decryption
has comment: http://stackoverflow.com/comment/41303443
has answer: http://stackoverflow.com/a/26475269
has comment: http://stackoverflow.com/comment/41297797
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41373382
has comment: http://stackoverflow.com/comment/41315851
downvote count: 4
has comment: http://stackoverflow.com/comment/41298045
has comment: http://stackoverflow.com/comment/41343602
has comment: http://stackoverflow.com/comment/41323966
has comment: http://stackoverflow.com/comment/41343711
has comment: http://stackoverflow.com/comment/41372204
has comment: http://stackoverflow.com/comment/41343276
has comment: http://stackoverflow.com/comment/41303474
has comment: http://stackoverflow.com/comment/41372107
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41303955
has comment: http://stackoverflow.com/comment/41342530

http://stackoverflow.com/comment/41263476
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26296980
has text: yes true @Dorvalla that is what problem I am facing...

http://stackoverflow.com/comment/41327791
type: QuestionComment
has text: Personal preference in this case.
type: Comment
comment on: http://stackoverflow.com/q/26332011
score: 0

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/26350330

http://stackoverflow.com/a/26228347
has comment: http://stackoverflow.com/comment/41138460
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/41137738
has body: It is because of the asynchronous nature of ajax, what you could try is something like process($("[input]")); function process($inputs) { if (!$inputs.length) { return; } var $input = $inputs.eq(0); var data = $input.val(); $.post('someurl.php', { data: data }, function (result) { console.log(result); }).always(function () { process($inputs.slice(1)) }); } Demo: Fiddle
has comment: http://stackoverflow.com/comment/41137675
upvote count: 7
type: Answer
answers question: http://stackoverflow.com/q/26228304

http://stackoverflow.com/comment/41104247
comment on: http://stackoverflow.com/q/26210668
type: Comment
type: QuestionComment
has text: Try to load jQuery from your host, not from `googleapis`.
score: 0

http://stackoverflow.com/comment/41303149
type: Comment
comment on: http://stackoverflow.com/q/26318458
type: QuestionComment
score: 0
has text: I think you're not sending an Ajax request then... Sounds like the form submits normal.

http://stackoverflow.com/q/26218821
score: 0
tagged with: mobile
has body: I'm developing a chronometer app in Tizen and I'm currently using the setInterval function to schedule the next time the text with the numbers will be updated: chrono : function() { SecondsChrono += 1; }, setInterval(chrono(), 1000); But when the device's screen is put on "sleep mode" the chronometer gets delayed. I want to know if anyone has experienced this and if you have some way to avoid it or if you have any advice for me to implement this chronometer in another way.
answer count: 1
duplicate of: http://stackoverflow.com/q/10739835
tagged with: javascript
has answer: http://stackoverflow.com/a/26218940
tagged with: tizen
tagged with: setinterval
has comment: http://stackoverflow.com/comment/41124573
type: UnansweredQuestion
has title: JavaScript setInterval delay when screen sleeps
linked to: http://stackoverflow.com/q/10739835
type: Question

http://stackoverflow.com/q/26301252
tagged with: for-loop
has comment: http://stackoverflow.com/comment/41271728
downvote count: 0
has title: Stop loop when condition variable (global var) changes in javascript
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26301591
has comment: http://stackoverflow.com/comment/41271833
has comment: http://stackoverflow.com/comment/41271808
answer count: 3
tagged with: while-loop
has comment: http://stackoverflow.com/comment/41272132
favorite count: 0
has answer: http://stackoverflow.com/a/26302051
has comment: http://stackoverflow.com/comment/41271230
has comment: http://stackoverflow.com/comment/41271903
upvote count: 1
has comment: http://stackoverflow.com/comment/41272095
has answer: http://stackoverflow.com/a/26301591
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41271238
has answer: http://stackoverflow.com/a/26301308
accepted answer: http://stackoverflow.com/a/26301308
score: 1
has body: I'm having a problem that I can't solve. I have a loop in javascript where the condition variable to stop depends on a global variable. The loop starts looping and when I change the value of that global variable it never stops. stop = false; var i = 0; while ((stop == false) &amp;&amp; (i&lt;100000)){ console.log("hi-"+i); i++; } While loop is running, if I do stop = true, it never stops. I do not know why is that. Any idea? Thanks!
tagged with: loops
type: Question

http://stackoverflow.com/comment/41361506
score: 2
has text: You need the `body-parser` middleware. If you generate a Express project using the `express` CLI generator it gets added for you.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26350516

http://stackoverflow.com/comment/41201866
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26263489
score: 0
has text: Related: [jquery 1.9.1 fails to parse JSON that contains escaped backslash](http://stackoverflow.com/q/25669978/218196)

http://stackoverflow.com/q/26286623
favorite count: 0
has title: How can I make this for only one element?
has comment: http://stackoverflow.com/comment/41244902
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41244794
has comment: http://stackoverflow.com/comment/41244923
downvote count: 6
has comment: http://stackoverflow.com/comment/41244846
has answer: http://stackoverflow.com/a/26286887
has comment: http://stackoverflow.com/comment/41245140
has answer: http://stackoverflow.com/a/26286877
has answer: http://stackoverflow.com/a/26287780
type: Question
upvote count: 0
tagged with: javascript
has body: This code works for all the spans in the page. Where should I put this for the specific one? var next = function(e) { var current = $('.active'); var prev = $('#prev'); pos = $('.active').attr('id'); $("#num").text('(' + pos + '/' + researchPlaces.length + ')'); $(current).next().attr("class", "active"); $(current).attr("class", "passive"); e.stopPropagation(); } Prev 0 Elgin Street 1 Elgin Street 2 Elgin Street 3 Elgin Street 4 Elgin Street 5 Elgin Street 6 Elgin Street 7 Elgin Street 8 Elgin Street 9 Elgin Street Next
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/41244894
score: -6

http://stackoverflow.com/a/26347389
answers question: http://stackoverflow.com/q/26347063
has body: demo var $tables = $('[id^=table]').filter(function(){ return +this.id.replace(/\D+/,'') &gt; 4; }); $tables.hide(); // Use example the above will get the number out of the selector ID and compare if greater than 4. $tables will now result in a collection of elements returned by the jQuery's filter() method. .replace(/\D+/,'') will remove all non-numeric (D+) Characters; the unary + will convert the String result to Number and &gt; 4 does the desired. For a micro-Plugin extension you can go for: // Retrieve elements from mixed ID str+number // Returns a collection of elements with ID number greather than the num argument $.fn.idNumGreaterThan = function(num){ return this.filter(function() { return +this.id.replace(/\D+/,'') &gt; num; }); }; $('[id^=table]').idNumGreaterThan(4).hide(); // Also with class selectors (element must have a mixed alphaNumeric ID) $('.element').idNumGreaterThan(4).hide();
score: 0
type: Answer

http://stackoverflow.com/comment/50150610
score: 1
type: AnswerComment
has text: I suspect that you are using some kind of js module loader (like require.js) that tells underscore to not pin itself as a global variable. If you are using, or the project you are on uses or at least defines the `define` function, underscore will use that function to load itself into your app as a module, thus not being available on `window`. You can check it out at the bottom of the source file: http://underscorejs.org/underscore.js
type: Comment
comment on: http://stackoverflow.com/a/26345313

http://stackoverflow.com/comment/41272603
has text: Thank you for the explanation. This is a very clean solution and looks like a good practice to keep going forward.
type: Comment
comment on: http://stackoverflow.com/a/26301758
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41362256
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26350800
has text: so in the `printNLAImages` function should I remove all the ["nla"]?

http://stackoverflow.com/comment/41266596
type: QuestionComment
type: Comment
score: 0
has text: init(); calls the second method not first one, check my fiddle.
comment on: http://stackoverflow.com/q/26298835

http://stackoverflow.com/q/26353523
accepted answer: http://stackoverflow.com/a/26353874
possible better answer: http://stackoverflow.com/a/26353888
downvote count: 1
type: Question
score: 3
tagged with: javascript
upvote count: 4
answer count: 3
has title: HTML: Can always the same identifier be used for name and id attributes?
has answer: http://stackoverflow.com/a/26353950
has answer: http://stackoverflow.com/a/26353874
favorite count: 0
has body: Basically the "name" attribute is used in server-side programming (name/value pairs are sent in requests) and the "id" attribute is used in client-side programming (i.e. Javascript and CSS). But both fulfill essentially the same function - provide a unique identification of an element. And to complicate things not too much, it is useful if a thing has only one identifier. Therefore the question(s) - for tags that need both "id" and "name": Is there any reason to choose different identifiers for the name and id attributes? Are there any use-cases for which different identifiers are required? Are there any differences in syntax? (for example you can use "myarray[123]" for the name attribute and PHP will understand that correctly and create an array, can that also be used in a similar manner for id-attributes in Javascript or CSS - and if not, is that a syntax-error or is it simply a valid identifier with brackets in it?) Are both case-sensitive?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26353888
type: AnsweredQuestion

http://stackoverflow.com/a/26288004
upvote count: 1
type: AcceptedAnswer
has body: Okay, so I think I know what you mean. The elements get hidden when deceasing the window size, but are not shown when increasing it, right? If I got the problem well, it's a simple fix. You just want to show all the images on every window resize, and then make the decision which elements to hide: $(window).resize(function () { $('.trends').children('.top-trends').show(); if (windowsWidth &lt; 400) { ... See the whole thing here (I got rid of all the slideFoward/slideFoward functions for clarity - you may want to remove all unnecessary code as well next time, it will make figuring the issue out much simpler).
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41248499
accepted answer of: http://stackoverflow.com/q/26287416
answers question: http://stackoverflow.com/q/26287416

http://stackoverflow.com/q/26271406
tagged with: performance-testing
has title: Best way to check memory consumption of web page & SPA
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/26271860
tagged with: javascript
has body: In the world of SPA, built with frameworks\library likes JQuery, AngularJS, ExtJs, Lodash &amp; various other JavaScript library, how can I check how much memory each page is consuming? I also want to know what are the parameters on which I should measure a page? How can I check how much memory each component\control is consuming in a page?
upvote count: 1
tagged with: firebug

http://stackoverflow.com/comment/41093137
type: QuestionComment
has text: Hm ... now I repeated the procedure and it is working. Strange, maybe something else affected this and maybe this is false alarm. For now I will assume it is working until I manage to reproduce it again.
comment on: http://stackoverflow.com/q/26204961
score: 0
type: Comment

http://stackoverflow.com/comment/41341109
score: 0
comment on: http://stackoverflow.com/q/26333091
type: Comment
type: QuestionComment
has text: Yes the timeframe that I have been allotted is very less to understand these things. But I am trying my best to understand what I am doing. I am not completely blind in this.

http://stackoverflow.com/comment/41111676
comment on: http://stackoverflow.com/q/26213750
type: Comment
has text: @RajaprabhuAravindasamy please add it as an answer so I can accept it. Thanks
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41240546
type: AnswerComment
comment on: http://stackoverflow.com/a/26284373
score: 0
type: Comment
has text: @tenfour Can you [fiddle](http://jsfiddle.net) it up, for us to fiddle around with? Or is it too much code?

http://stackoverflow.com/a/26229457
score: 0
has body: Use registerHelper method to add individual incremental counter DEMO
has comment: http://stackoverflow.com/comment/41157945
type: Answer
has comment: http://stackoverflow.com/comment/41160544
answers question: http://stackoverflow.com/q/26229278

http://stackoverflow.com/comment/41145889
score: 0
has text: Are u sure you attach auto generate script and that code `ga('create', 'xx-xxxxxxxx-x', 'auto');ga('send', 'pageview');` in MasterPage?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26232770

http://stackoverflow.com/comment/41097769
has text: This question should be asked at [UX.SE], with the implementation paragraph removed. If you want to ask about implementation, you're right at StackOverflow (except you want a library/[softwarerecs.SE]); but we would need a more detailed description of your problem (best with code).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26207223
score: 0

http://stackoverflow.com/q/26350322
score: -2
has title: What does "key" mean in Javascript Arrays?
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/41361203
type: Question
has body: I have seen something like this in javascript code: array[key]; What does that mean? I know that you can access different values of an array with their index like this: var myVar = arr[7]; But what does using the word "key" as an index mean? What does it do?
has answer: http://stackoverflow.com/a/26350346
tagged with: javascript
has comment: http://stackoverflow.com/comment/41361062
answer count: 2
has comment: http://stackoverflow.com/comment/41361083
favorite count: 0
has answer: http://stackoverflow.com/a/26350727
type: UnansweredQuestion

http://stackoverflow.com/a/62498739
answers question: http://stackoverflow.com/q/26211225
type: Answer
has body: Personal Name*<input id="name" type="text" class="input-field" name="Name" value="" Email*<input placeholder="Ex: csa123@yahoo.in" id="email" type="email" class="input-field" name="Email" value="" Phone*<input placeholder="+919853004369" id="mobile" type="text" class="input-field" name="Mobile" value="" Subject Choose Your Sub.. Appiontment Interview Regarding a post
downvote count: 1
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/110539332

http://stackoverflow.com/q/26278681
type: AnsweredQuestion
has title: How to add a close button to jQuery push side panel
possible better answer: http://stackoverflow.com/a/26278773
has answer: http://stackoverflow.com/a/26278773
has answer: http://stackoverflow.com/a/26279175
type: Question
has body: I am using Sidr plugin for a side panel, sample of html: One Two this is content this is content The jQuery is as follows: $(document).ready(function() { $('#edinburgh-menu').sidr({name: 'Edinburgh-menu',source: '#edinburgh-div'}); $('#glasgow-menu').sidr({name: 'Glasgow-menu',source: '#glasgow-div'});}); This makes the side panel open. How can I add a button/link, inside both panels, that would make them close? http://jsfiddle.net/0feug6g9/
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26279175

http://stackoverflow.com/comment/41226675
comment on: http://stackoverflow.com/q/26256956
type: Comment
type: QuestionComment
score: 1
has text: Indeed, right not zAxis isn't real axis. But for sure will be one day :)

http://stackoverflow.com/comment/41272289
has text: @chiapa While not starting with numbers is good practice and won't work in older versions of HTML, HTML 5 does not have this restriction.
score: 1
comment on: http://stackoverflow.com/q/26301215
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26331869
type: Answer
has body: Hmm, it appears that the bullet passes through the corner shared by the squares (2,3), (3,2), (2,4) and (3,4), if (0,0) is the bottom left most square. Does that count as an obstacle? Anyway I posted an extremely bad explanation before. I'll rewrite that coherently again here: I created a diagram to here for visual aid: https://www.desmos.com/calculator/zm8mayncqi You know the path of the bullet travels through the columns two and three, so create a function and determine all obstacles in column (other than the player, and target). We have a monster at (2,3) which could potentially be in the way. Next we find the equation as rupp has described, as represented by the blue line. If the gradient is negative, we want the opposite (positive) of the equation of the diagonal of the obstacle square, and vice versa. That, is we want the red dotted line which has a positive gradient. We use simultaneous equations to determine if the two intersect. If our two equations are: y=m1*x+c1 y=m2*x+c2 Then we can determine the x-coordinate by this: x=(c1-c2)/(m2-m1) Now the equation of the bullet only exists between the pixels 105px and 175px horizontally, So if 105 &lt;= x &lt;= 175 then we know that there is an intersection and thus an obstacle blocking the way. Hope that helps?
score: 2
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26331217

http://stackoverflow.com/a/43487700
answers question: http://stackoverflow.com/q/26311947
has body: found one more character should be replaced .replace(/\$/g, "%24")
score: 0
type: Answer

http://stackoverflow.com/comment/41232281
comment on: http://stackoverflow.com/q/26280006
has text: where is the "#informer" you're talking about anyway?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26251089
has comment: http://stackoverflow.com/comment/41179637
score: 0
has body: You can add a class for those elements. var element1 = $('#element1'); element1.addClass('clickable'); var element2 = $('#element2'); element2.addClass('clickable'); // for elements inside an iframe var iframeElement1 = $('#iframeElement1', $('iframe').contents()); iframeElement1.addClass('clickable'); // you can add more elements here $('.clickable').on('click', function (event) { // do click logic here })
has comment: http://stackoverflow.com/comment/41180679
type: Answer
answers question: http://stackoverflow.com/q/26250884

http://stackoverflow.com/q/26284479
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26284762
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/16083919
has comment: http://stackoverflow.com/comment/41240736
has comment: http://stackoverflow.com/comment/41240681
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41240776
score: 1
upvote count: 1
tagged with: local-storage
has body: I just need to store an array in localStorage and keep adding elements to that array so I could retrieve that stored array in my application. This must be a very simple thing to do with Angular Local Storage Module but it has got me troubling quite a bit, and I am hoping to get some help on this. Following is the angular code I have that I am using to store a queries into localStorage using angular-local-storage module: .factory('QueryService', ['localStorageService', function(localStorageService) { var queries = []; var factory = {}; factory.addQuery = function(query) { queries.push(query); localStorageService.set('queries', queries); return localStorageService.get("queries"); }; return factory; }]) Every time I add a query to the queries array, I get only the last element added returned in the result. So basically, localStorageService.get("queries") is giving me the last element added to the queries array. Could somebody please help me understand that why am I getting only the last element I am adding to the queries array returned? EDIT: After each element I am adding to the queries array I am refreshing the browser.
type: Question
has comment: http://stackoverflow.com/comment/41240828
has answer: http://stackoverflow.com/a/26284762
has comment: http://stackoverflow.com/comment/41240808
has title: Storing elements in an array in Local Storage using Angular Local Storage Module
tagged with: javascript
has comment: http://stackoverflow.com/comment/41240650
has comment: http://stackoverflow.com/comment/41240748
tagged with: angular-local-storage
tagged with: arrays

http://stackoverflow.com/q/26312001
tagged with: javascript
answer count: 1
tagged with: jquery
has title: Throttle Jquery UI drag event listener, and passing argument using underscore.js or other implementation
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41299548
has answer: http://stackoverflow.com/a/26322032
has comment: http://stackoverflow.com/comment/41303580
has body: I have a draggable element which triggers a resize of some component in my application. I would like to throttle this.dragAdjust( ui.offset ); using underscore.js or a jquery plugin. The issue is that I'm not sure how to pass along the argument, ui.offset. var self = this; $("#hs-resizer").draggable( { axis: "y", containment: "parent"//, //drag: function( event, ui ) { // self.dragAdjust( ui.offset ); //} }); $("#hs-resizer").drag( _.throttle( self.dragAdjust, 500 ) );
tagged with: underscore.js
score: 0
has comment: http://stackoverflow.com/comment/41308869
type: Question
tagged with: jquery-ui

http://stackoverflow.com/a/26287577
type: Answer
has body: Maybe something like this: var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(''), length = 2, i = 0, j = 0, step, comb; for (i; i &lt; possible.length; i++) { step = possible[i]; console.log("==============" + step + "=============="); for (j; j &lt; possible.length; j++) { comb = step + '' + possible.slice(j, j + (length - 1)).join(''); console.log(comb); } j = 0; }
score: 0
answers question: http://stackoverflow.com/q/26285215

http://stackoverflow.com/q/26217681
has title: Unit testing controller functions making external HTTP requests in NodeJS
has answer: http://stackoverflow.com/a/26218009
accepted answer: http://stackoverflow.com/a/26218009
score: 0
answer count: 1
has body: Hi all so I've totally reworded this and included some code I produced. Normally I'd have tests for this first however I'm at a lost as to how to approach this. I want to start off with unit tests for this function. exports.getMatches = function(callback) { var url = "http://football-api.comapi/?Action=today&amp;APIKey=" + secrets.APIKey + "&amp;comp_id=1204"; async.waterfall([ function(callback) { request(url, function (error, response, body) { if (error) return (error); var parsedJSON = JSON.parse(body); var todaysMatches = parsedJSON.matches; var schedule = new Schedule({ date: dates.today // external module matches: [] }); _.each(todaysMatches, function (match) { schedule.matches.push({ match_id: match.match_id, match_time: match.match_time, match_localteam_id: match.match_localteam_id, match_localteam_name: match.match_localteam_name, match_visitorteam_id: match.match_visitorteam_id, match_visitorteam_name: match.match_visitorteam_name }); }); callback(schedule); }); } ], function(schedule) { schedule.save(function (err) { if (err) return (err); }); done(); }); }; I'm really sorry for not providing any sort of headway because I'm just having a mental block here. There's only a few lines of code but there is so much going on and so much to test that I'm not sure where to start / what to mock / how to mock it.
has comment: http://stackoverflow.com/comment/41117352
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: testing
has comment: http://stackoverflow.com/comment/41117413
tagged with: javascript
tagged with: mocha.js

http://stackoverflow.com/comment/41178461
comment on: http://stackoverflow.com/q/26250545
type: Comment
score: 0
has text: Hey Just check the code, Unexpected token, it will show you the line number where the error is occuring (Hope you are using Inspect element feature of your browser.)
type: QuestionComment

http://stackoverflow.com/comment/41184310
has text: Try `json_encode` your return array and use the json in your ajax success
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26254048

http://stackoverflow.com/comment/41181795
type: QuestionComment
score: 0
has text: Post the whole head section of the *rendered* HTML, not the JSP
comment on: http://stackoverflow.com/q/26242004
type: Comment

http://stackoverflow.com/a/26331674
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26317718
has body: i got it: here Not with .next() Function, just got index of the element in my main-div... var imageIndex = $(this).index();
accepted answer of: http://stackoverflow.com/q/26317718
type: AcceptedAnswer

http://stackoverflow.com/q/26269601
tagged with: javascript
has title: Javascript not drawing in canvas properly in mobile devices
score: 0
tagged with: touchscreen
tagged with: canvas
has body: Please help me with the problem I'm having. I'm trying to create a canvas to save signature as byte image. It works fine from my PC. but when I browse it on my iPhone, it draws at the bottom of the corner rather than from the top of the corner.Here's my code: function signatureCapture() { var canvas = document.getElementById("txtSignature"); var context = canvas.getContext("2d"); canvas.width = 276; canvas.height = 180; context.fillStyle = "#fff"; context.strokeStyle = "#444"; context.lineWidth = 1.5; context.lineCap = "round"; context.fillRect(0, 0, canvas.width, canvas.height); var disableSave = true; var pixels = []; var cpixels = []; var xyLast = {}; var xyAddLast = {}; var calculate = false; { //functions function remove_event_listeners() { canvas.removeEventListener('mousemove', on_mousemove, false); canvas.removeEventListener('mouseup', on_mouseup, false); canvas.removeEventListener('touchmove', on_mousemove, false); canvas.removeEventListener('touchend', on_mouseup, false); document.body.removeEventListener('mouseup', on_mouseup, false); document.body.removeEventListener('touchend', on_mouseup, false); } function get_coords(e) { var x, y; if (e.changedTouches &amp;&amp; e.changedTouches[0]) { var offsety = canvas.offsetTop || 0; var offsetx = canvas.offsetLeft || 0; x = e.changedTouches[0].pageX - offsetx; y = e.changedTouches[0].pageY - offsety; } else if (e.layerX || 0 == e.layerX) { x = e.layerX; y = e.layerY; } else if (e.offsetX || 0 == e.offsetX) { x = e.offsetX; y = e.offsetY; } return { x : x, y : y }; }; function on_mousedown(e) { e.preventDefault(); e.stopPropagation(); canvas.addEventListener('mouseup', on_mouseup, false); canvas.addEventListener('mousemove', on_mousemove, false); canvas.addEventListener('touchend', on_mouseup, false); canvas.addEventListener('touchmove', on_mousemove, false); document.body.addEventListener('mouseup', on_mouseup, false); document.body.addEventListener('touchend', on_mouseup, false); empty = false; var xy = get_coo…
tagged with: mobile-devices
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41213743
answer count: 0
has comment: http://stackoverflow.com/comment/41216400
type: Question

http://stackoverflow.com/q/26273686
answer count: 1
tagged with: javascript
tagged with: sorting
upvote count: 11
has comment: http://stackoverflow.com/comment/46489860
has title: How to access the sorted rows in an Angular UI Grid?
has comment: http://stackoverflow.com/comment/41375621
favorite count: 0
has answer: http://stackoverflow.com/a/29681809
accepted answer: http://stackoverflow.com/a/29681809
tagged with: angularjs
downvote count: 0
has body: I am using the Angular UI Grid to display some data. Sorting is enabled and initialized as well as selecting a single row: vm.gridOptions = { enableSorting: true, enableRowSelection: true, multiSelect: false, noUnselect: true, columnDefs: [ { name: '#', field: 'ID' }, { name: 'Name', field: 'CODE', sort: { direction: 'asc', priority: 1 } }, { name: 'Comment', field: 'DESCR' }, ], data: [] }; I am able to select a row and the rows are sorted by the "Name" column in ascending order as configured. As shown in the UI Grid Tutorial 210, I have added logic to automatically select the first item after my data has been loaded and added to the grid: datacontext.getAllGcTab(vm.filter).then(function (result) { vm.gridOptions.data = result.results; vm.gridApi.selection.selectRow(vm.gridOptions.data[0]); }); But this code is selecting the first item of the unsorted data. There are about 500 items in my grid, which is not much and performs well, but in this case the selected item is somewhere down the line and invisible. Is there any option to directly access the rows or the sorted data of the UI Grid? I know that external sorting could solve that problem, because then I would assign the already sorted data to the grid. But this seems to me like an unnecessary overhead...
score: 11
type: AnsweredQuestion
tagged with: angular-ui-grid
type: Question

http://stackoverflow.com/q/26293316
has comment: http://stackoverflow.com/comment/41256688
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26296506
linked to: http://stackoverflow.com/q/5472938
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41256626
tagged with: internet-explorer-9
accepted answer: http://stackoverflow.com/a/26296506
has comment: http://stackoverflow.com/comment/41256764
type: Question
has body: I have that script: var information = function() { this.paco= function() { console.log("function called"); }; this.paco(); }(); and this: var information = function() { var paco= function() { console.log("function called"); }; paco(); }(); but this works: var information = function() { ... this.paco= function() { console.log("function called"); }; //this.paco(); ... }(); it works at Firefox but does not work at Internet Explorer and does not log any error to console. When I try to call a function inside information I get this log: Object doesn't support this action Here is some info: http://www.spilgames.com/javascript-bug-in-internet-explorer-8-and-older/ I can not put all the code because there are many scripts calls each other. Any ideas?
score: 0
has comment: http://stackoverflow.com/comment/41256655
answer count: 1
has comment: http://stackoverflow.com/comment/41256677
tagged with: javascript
has comment: http://stackoverflow.com/comment/41256775
has title: Internet Explorer Function Inside a Function Does Not Work

http://stackoverflow.com/a/26283215
has body: Try this: Demo on Fiddle HTML: Move Section Up change the bg_image CSS: #move_2 { height:200px; background:url(http://istheapplestoredown.com/images/dashboardwidget.png) no-repeat; padding-left:30px; margin-top:15px; vertical-align:middle; list-style:none; } #mv_txt_2 { padding-left:5px; cursor:pointer; font-size:14px; vertical-align:middle; } JavaScript: $('li').click(function position() { document.getElementById('move_2').style.background = 'url(http://istheapplestoredown.com/images/websitewidget.png) no-repeat'; });
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26282947
accepted answer of: http://stackoverflow.com/q/26282947
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41370068
type: AnswerComment
type: Comment
has text: yes it would work in an ng-repeat but i did it pure javascript, which means you'd have to use $scope to acces the variable
comment on: http://stackoverflow.com/a/26349879
score: 0

http://stackoverflow.com/comment/113150102
score: 1
type: AnswerComment
has text: @knguyen yes true I guess. But in most cases I guess the extra loop won't matter
type: Comment
comment on: http://stackoverflow.com/a/57113330

http://stackoverflow.com/a/26456293
type: Answer
has body: The most common way for javascript running on a web page to talk to a server these days is some kind of RESTful web service. You'll want to find a server-side programming language that runs on the Pi. Maybe node.js? It's like javascript but on a server, see here: http://weworkweplay.com/play/raspberry-pi-nodejs/ You then write whatever methods you want in the server-side language, methods which talk to the database, then have your client-side javascript call those methods. Google "REST services node.js" and you'll find plenty of how-tos.
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26304700
answers question: http://stackoverflow.com/q/26304700
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26247013
answer count: 1
tagged with: javascript
favorite count: 0
has title: Canjs changed event
has comment: http://stackoverflow.com/comment/41175130
downvote count: 1
upvote count: 0
type: Question
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/41185634
tagged with: canjs
tagged with: canjs-component
has body: Is there a way to detect list change in canjs and make the view redraw? I am changing the list but this is not shown on screen. At the moment i have view model TodosListViewModel = can.Map.extend({ todoCreated: function(context, element) { // new todo is created var Todo = this.Todo; new Todo({ name: can.trim(element.val()) }).save(); element.val(""); }, tagFiltered: function(context, element) { // filter todos according to tag this.todos = this.todos.filter(function(todo) { return todo.tag === element.val(); }); } }); And component can.Component.extend({ // todos-list component // lists todos tag: "todos-list", template: can.view("javascript_view/todos-list"), scope: function() { // make the scope for this component return new TodosListViewModel({ todos: new TodoList({}), Todo: Todo }); }, events: { "{scope.Todo} created": function(Todo, event, newTodo) { // todo created this.scope.attr("todos").push(newTodo); }, "{scope.todos} changed": function(a,b,c,d,e,f,g,h) { console.log("todo change",d,e); } } }); The markup &lt;input type="text" name="tagFilter" placeholder="Tag lookup" can-enter="tagFiltered" /&gt; The rest of code http://git.io/vrPCTQ
has answer: http://stackoverflow.com/a/26264192
accepted answer: http://stackoverflow.com/a/26264192

http://stackoverflow.com/comment/41198407
type: Comment
comment on: http://stackoverflow.com/a/26261646
type: AnswerComment
score: 0
has text: that's not what I had in mind to get it working as I thought Id need a loop to change the class content of each section element but that works brilliantly in just two lines :) that's spot on what I wanted :) Thanks a lot.

http://stackoverflow.com/q/26320689
tagged with: javascript
score: 1
tagged with: stripe-payments
favorite count: 0
has body: I seem to be having a problem with Stripe.js and I am using Laravel as a framework with cashier. I'm using stripe.js so I don't pass and credit card data through my server and also so I don't store any either. As of the current time, there seems to be an issue with browsers. Let me explain further, Chrome works and Firefox, Internet Explorer doesn't. On Chrome: Currently when you submit the field, the form behaves as expected. It will show card errors when you press the submit button. For example, the card number, expire month, etc (it validates it). On Firefox and IE: The form will not verify, instead it says: A network error has occurred, and you have not been charged. Please try again. And will automatically submit the form and not tell if the card number is accepted, etc. Also when you submit the form, it goes straight to a Laravel error page that says: Missing required param: card and I think this means that the stripe.js is not fully being used, and maybe the form isn't paying attention the the custom js. Stripe.js $(document).ready(function() { Stripe.setPublishableKey('pk_test_HdoLAxfuWl53vjchF01fMphS'); $('#subscription-form button').on('click', function() { var form = $('#subscription-form'); var submit = form.find('button'); var submitInitialText = submit.text(); submit.attr('disabled', 'disabled').text('Just one moment...'); Stripe.card.createToken(form, function(status, response) { var token; if(response.error) { form.find('.stripe-errors').text(response.error.message).show(); submit.removeAttr('disabled'); submit.text(submitInitialText); return false; } else { token = response.id; form.append($('&lt;input type="hidden" name="token"&gt;').val(token)); form.submit(); } }); }); }); You may go try out the app at http://account.mcjoin.us and better direct me with the possible issue. And always, thanks for the help!
has answer: http://stackoverflow.com/a/26342900
type: Question
accepted answer: http://stackoverflow.com/a/26369367
tagged with: php
has title: Stripe.js error with Laravel
possible better answer: http://stackoverflow.com/a/26342900
answer count: 2
upvote count: 1
tagged with: laravel
has answer: http://stackoverflow.com/a/26369367
tagged with: forms
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26203691
has answer: http://stackoverflow.com/a/26204027
tagged with: javascript
has comment: http://stackoverflow.com/comment/41091415
score: -1
has comment: http://stackoverflow.com/comment/41090734
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41090908
linked to: http://stackoverflow.com/q/83073
favorite count: 0
has answer: http://stackoverflow.com/a/26203882
downvote count: 2
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/41090737
has answer: http://stackoverflow.com/a/26203883
type: AnsweredQuestion
has title: Html,css: Change a row's border colow on hover
has answer: http://stackoverflow.com/a/26203760
has body: I am using DataTables and i am trying to change the row's top and bottom border to red on row hover. Following didn't change the color. table.dataTable.hover tbody tr:hover, table.dataTable.hover tbody tr.odd:hover, table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, table.dataTable.display tbody tr.odd:hover, table.dataTable.display tbody tr.even:hover { background-color: rgba(209, 231, 255, 0.5); border-bottom: 1px solid red; border-top: 1px solid red; } Anyone knows how to properly do this ? jsfiddle: http://jsfiddle.net/d1zqsayh/
upvote count: 1
possible better answer: http://stackoverflow.com/a/26203883
accepted answer: http://stackoverflow.com/a/26203882
type: Question

http://stackoverflow.com/comment/41133185
type: Comment
comment on: http://stackoverflow.com/a/26225899
score: 0
type: AnswerComment
has text: OK, could you please paste the response (or at least the very top and some lines below) so i can see what is being returned

http://stackoverflow.com/comment/41359528
type: QuestionComment
comment on: http://stackoverflow.com/q/26349348
score: 4
has text: Plese, can you post the relevant part of the code, so we can help you better?
type: Comment

http://stackoverflow.com/q/26234507
has answer: http://stackoverflow.com/a/26235452
tagged with: ember.js
has body: I have an Ember.View with a template which accesses the view's properties, something like this: {{view.someProperty}} I want to wrap it in a component like this: {{#my-component}} {{view.someProperty}} {{/my-component}} The Ember component docs tell me that the block is rendered with the parent context, but suddenly I'm not able to access properties using view.someProperty. Is this a known issue? Can anyone help me find a workaround?
type: UnansweredQuestion
tagged with: handlebars.js
type: Question
has title: Ember component block scope within a view
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26295972
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26296361
has title: Simple ToDo-List doesn't work
has answer: http://stackoverflow.com/a/26296284
has answer: http://stackoverflow.com/a/26296292
score: 3
possible better answer: http://stackoverflow.com/a/26296284
favorite count: 0
has answer: http://stackoverflow.com/a/26296409
has body: My ToDo List dont wanna work the way i want. I've just been working with JavaScript for 2 weeks sthis is very new to me, therefor the code maybe doesnt look that nice. The result comes out wrong. If I type in "buy food" the first line gonna show just that, but the next time I wanna add "walk the dog", then it displays buy food buy food walk the dog I hope you understand my problem. It also ends the unordered list tag after the first click and adds the rest of the things in another. Here's the JavaScript: var taskList = []; var text = "&lt;ul&gt;" function addToList() { var task = document.getElementById("toDoTask").value; taskList.push(task); for(i = 0; i &lt; taskList.length; i++){ text += "&lt;li&gt;" + taskList[i] + "&lt;/li&gt;" ; } text += "&lt;/ul&gt;"; document.getElementById("todoList").innerHTML = text; }
answer count: 4
has answer: http://stackoverflow.com/a/26296361
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/q/26286320
has title: Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"}
accepted answer: http://stackoverflow.com/a/26307601
downvote count: 0
has comment: http://stackoverflow.com/comment/41253031
has comment: http://stackoverflow.com/comment/41245201
has comment: http://stackoverflow.com/comment/41244866
tagged with: handlebars.js
possible better answer: http://stackoverflow.com/a/39458494
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26307601
tagged with: javascript
score: 4
type: Question
has body: I recently updated an ember-cli project from 0.0.44 to 0.1.1 and all of the sudden my templates are not loading anymore, instead I get the following warnings on the console: Could not find "application" template or view. Nothing will be rendered Object {fullName: "template:application"} Could not find "index" template or view. Nothing will be rendered Object {fullName: "template:index"} The steps I took to update the project was just: npm install --save-dev ember-cli ember init this is my router: import Ember from 'ember'; import config from './config/environment'; var Router = Ember.Router.extend({ location: config.locationType }); Router.map(function() { this.route('login'); this.route('permission'); this.route('user'); this.route('room'); this.route('room/new'); }); Router.reopen({ notifyGoogleAnalytics: function() { return window.ga('send', 'pageview', { 'page': this.get('url'), 'title': this.get('url') }); }.on('didTransition') }); export default Router; this is my app.js: import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; import config from './config/environment'; Ember.MODEL_FACTORY_INJECTIONS = true; var App = Ember.Application.extend({ modulePrefix: config.modulePrefix, autoprefixer: { browsers: ['&gt; 1%', 'last 1 version', 'android 4', 'ios 6'] }, podModulePrefix: config.podModulePrefix, Resolver: Resolver }); loadInitializers(App, config.modulePrefix); export default App; any help?
has comment: http://stackoverflow.com/comment/41253883
answer count: 2
has comment: http://stackoverflow.com/comment/41253843
tagged with: ember-cli
favorite count: 0
has answer: http://stackoverflow.com/a/39458494
tagged with: ember.js
upvote count: 4

http://stackoverflow.com/comment/41144728
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26232243
has text: Thanks for the update. I have no problem finding out the error line in these cases. What about the cases like the one I posted above? What's the difference? Why doesn't these cases provide a line? How do I find it in these cases?

http://stackoverflow.com/comment/41186749
score: 0
type: Comment
has text: I have tried it in Firebug and it gives the same results as Chrome. How can I avoid printing out the 14?
comment on: http://stackoverflow.com/a/26244079
type: AnswerComment

http://stackoverflow.com/q/26272994
has comment: http://stackoverflow.com/comment/41225061
has comment: http://stackoverflow.com/comment/41226054
has comment: http://stackoverflow.com/comment/41219942
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41226248
has comment: http://stackoverflow.com/comment/41219871
type: Question
has comment: http://stackoverflow.com/comment/41219822
has answer: http://stackoverflow.com/a/26656009
tagged with: javascript
tagged with: jquery
has title: 'undefined is not a function' on object tag print()
has comment: http://stackoverflow.com/comment/41226182
has comment: http://stackoverflow.com/comment/41222097
answer count: 1
has body: I am trying to print a PDF which is embedded in an object tag which is present in an Iframe.I am getting an error message saying 'undefined is not a function' with the below code in Chrome but it works perfectly fine in IE. $('#iframeWindowDialog').contents().find('object[classid=clsid:CA8A9780-280D-11CF-A24D-444553540000]')[0].print() Can anybody suggest a code which works fine in both Chrome and IE ?
has comment: http://stackoverflow.com/comment/41226099
has comment: http://stackoverflow.com/comment/41226152
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41220116
has comment: http://stackoverflow.com/comment/41220407
score: 0
tagged with: iframe

http://stackoverflow.com/comment/41357357
type: QuestionComment
has text: Security tip: you shouldn't use or any client-side language for calculations that need to be correct, especially ones involving money.
comment on: http://stackoverflow.com/q/26348078
score: 0
type: Comment

http://stackoverflow.com/q/26273127
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26273195
tagged with: regex
favorite count: 0
has body: I have a regular expression : /["-,]/ Which matches a character in range of : to , I want to skip the match for '(apostrophe). Any help !! regex.test(strInput); is returning true for a string with an apostrophe. I need to negate that string which has an apostrophe
upvote count: 3
type: Question
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26273195
has title: Skip a character in range
answer count: 1

http://stackoverflow.com/q/26283976
tagged with: cookies
type: UnansweredQuestion
has title: Cookie code working in FireFox and Explorer but not Chrome
has answer: http://stackoverflow.com/a/26764314
tagged with: google-chrome
has body: The following cookie making code works in Firefox and Explorer but not in Chrome. I have set up alerts to stop the script and verify that the new Date() object is being created as intended. All 3 browsers indicate that the new Date() is being created and that adding 10 minutes to the expiry is also being done as expected. Flow: login page --> page This is the login page's code for creating a cookie: /* Event handler for verify button click. @param event is the event that triggered this function. */ function checkUser(event){ // interesting note: even though the button isn't of type submit, it submits the form. // this prevents the form from being submitted: event.preventDefault(); // obtain user name from form var name = this.form.userName.value; // obtain password from form var password = this.form.password.value; // is the password valid? if(isValidPassword(password)){ // create new Date object for cookie's expiration var expires = new Date(); if(expires){ alert(expires.toString()); } // increase expire time by 10 minutes expires.setMinutes(expires.getMinutes() + 10); alert(expires); // Firefox &amp; Chrome show with additional 10 minutes. // write userName cookie document.cookie = "userName=" + encodeURIComponent(name) + "; expires=" + expires.toUTCString(); // write password cookie document.cookie = "password=" +encodeURIComponent(password) + "; expires=" + expires.toUTCString(); // password is valid, allow entry to private web page. location.href = "project3.html"; }else{ // password was not valid alert("Password must be at least 1 character in length."); this.form.password.focus(); } } Then in the location.href "project3.html" this is the code that checks cookies. The alert(allCookies) pops up and shows the cookies in Firefox and Explorer but is completely blank in Chrome; so I'm being immediately redirected back to the login page. Which seems to indicate that either my cookie writing code is not working or cookies are turned off in Chrome? But I checked Chrom…
has comment: http://stackoverflow.com/comment/42099013
type: Question
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41348381
type: QuestionComment
comment on: http://stackoverflow.com/q/26343288
score: 1
has text: @squint — You mean you haven't already?
type: Comment

http://stackoverflow.com/comment/41135342
comment on: http://stackoverflow.com/q/26226897
type: Comment
has text: I already do console.log(data); but nothing is in my console.
type: QuestionComment
score: 0

http://stackoverflow.com/q/26194929
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 1
tagged with: css
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26195126
upvote count: 1
tagged with: jasny-bootstrap
type: AnsweredQuestion
score: 1
has title: Jasny Bootstrap with less pre-compiler - unable to modify less variables
has answer: http://stackoverflow.com/a/26195126
tagged with: less
has body: Thanks in advance for reading. Using CDN, I am incorporating the following APIs / libraries into my project: &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt; &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css"&gt; &lt;script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet/less" type="less" href="custom/main.less"/&gt; &lt;script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.7.4/less.min.js"&gt;&lt;/script&gt; I am also importing jquery and less but not using CDN to do so. The less files I was using before I added Jasny Bootstrap (above) worked fine; my main.less file imports all of the less variables and mixins from Bootstrap before importing the Jasny set. Main.less looks like this: @import "less/bootstrap.less"; @import "jasny-variables.less"; @navmenu-width: 225px; And when I implement the 'Off Canvas' component from Jasny Bootstrap, that also works fine; an off canvas menu appears and pushes all content to the right. When I try to change some of the Jasny less variables however (either by adding them to my main.less file [as I've done above], or altering them directly in the jasny-variables.less file [which main.less imports from the same directory]), I'm not seeing any results. Specifically I am trying to change the value of @navmenu-width to be less than the default. Regardless of what value I give it however, in either source, it won't change. Suggestions?
type: Question

http://stackoverflow.com/a/26225784
has comment: http://stackoverflow.com/comment/41132760
has comment: http://stackoverflow.com/comment/41133057
downvote count: 1
has comment: http://stackoverflow.com/comment/41133073
answers question: http://stackoverflow.com/q/26225731
type: Answer
has body: You could do this: &lt;?php $cats=array(); do { ?&gt; &lt;?php $cats[] = '"'.$row_cat['category_name'].'"'; ?&gt; &lt;?php } while ($row_cat = mysql_fetch_assoc($cat)); ?&gt; var chart = c3.generate({ data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250, 50, 100, 250] ] }, axis: { x: { type: 'category', categories: [&lt;?=implode(",", $cats)?&gt;] } }});
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/41133014

http://stackoverflow.com/comment/41100991
type: Comment
score: 1
has text: I know what you're trying to do, you said that in the question. Please show your code.
type: QuestionComment
comment on: http://stackoverflow.com/q/26208992

http://stackoverflow.com/q/26342008
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: jQuery never calls .done() or .always() for ajax call
has comment: http://stackoverflow.com/comment/41346177
has comment: http://stackoverflow.com/comment/41346214
has body: I'm having this simple get request: $.get('ri/i18n/locale') .done(function() { console.log(this); }) .fail(function() { console.log(this); }) .always(function(){ console.log(this); }); Unfortunately none of the handlers are ever called. I cann confirm that calling ri/i18n/locale in the browser returns a valid JSON string. I'm using jQuery 1.11.1 . Any ideas what's wrong?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26353912
type: Question
has answer: http://stackoverflow.com/a/26342184
score: 0
has comment: http://stackoverflow.com/comment/41346135
answer count: 2

http://stackoverflow.com/comment/41207544
score: 0
has text: Good idea. I should have mentioned that other UI components can also change the value. They don't have access to cancel or other local scope functions.
type: Comment
comment on: http://stackoverflow.com/a/26266155
type: AnswerComment

http://stackoverflow.com/comment/41165607
comment on: http://stackoverflow.com/q/26242788
score: 0
has text: I've actually done exactly what you're doing. If you email me at vshuiqog@sharklasers.com I'll give you a link to that solution. I don't want to add a link here risking seeming spammy.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41331370
has text: I am not aware of any compatibility issues with implementing AngularJS with Crossrider framework.
type: QuestionComment
comment on: http://stackoverflow.com/q/26315439
score: 0
type: Comment

http://stackoverflow.com/comment/41135223
type: AnswerComment
score: 0
has text: That's what I did. The output remains: "/newauthor/".
type: Comment
comment on: http://stackoverflow.com/a/26226714

http://stackoverflow.com/q/26313496
has body: I am reloading a JSP page in every 10 seconds and I realised that everytime it reloads the script files and that increase the size and finally my page crashes. This is my jsp and script to reload- <% //JSP code long ts = (new Date()).getTime(); //Used to prevent JS/CSS caching %> Login Success <link href="assets/css/bootstrap-united.css?<%=ts %>" rel="stylesheet" /> <link href="assets/css/customtable.css?<%=ts %>" rel="stylesheet" /> <script src="bootstrap/js/jquery-1.11.1.min.js?<%=ts %>"> <script src="bootstrap/js/bootstrap.js?<%=ts %>"> Home Signup Login Explore Contact us Further Actions And My script reload- and my Controller Post method- changed the controller to return JSON @RequestMapping(value="/success", method=RequestMethod.POST,headers="Accept=*/*") public Model success(@Valid @ModelAttribute("username") String username,@Valid @ModelAttribute("password") String password,@Valid String cubename,@Valid String status, BindingResult result,Model model) { log.info("Posting Data in Success With "+username+" passowrd "+password+" Cubename "+cubename+" status "+status); boolean found = studentService.findByLogin(username, password); if (found) { if(cubename != null) updateDataBaseContent(username,cubename,status); StudentLogin studentLogin = new StudentLogin(); studentLogin.setUserName(username); studentLogin.setPassword(password); List<Cube> cubes = cubeService.getCubes(); model.addAttribute("name", studentLogin); model.addAttribute("message", cubes); } return model; } How can I avoid reloading all script files I am anyway calling only the div tag to load, but why its loading the netire page. I am very new to Spring and Web, so it may be a silly query but I couldn't crack it yet.
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26313562
accepted answer: http://stackoverflow.com/a/26313562
score: 0
has title: Avoid script file reloading JSP in Spring
tagged with: spring

http://stackoverflow.com/comment/41180961
type: AnswerComment
has text: As a hotfix I could suggest to call [`utf8_encode`](http://php.net/manual/en/function.utf8-encode.php) on `_REQUEST['temp_unit']`, but this sounds lame. Would you mind to check if it is working?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26251020

http://stackoverflow.com/a/26325769
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26325414
has comment: http://stackoverflow.com/comment/41316233
accepted answer of: http://stackoverflow.com/q/26325414
has body: @charlietfl has the right idea: you're redefining a new clickedclass variable inside of your click handler, so what you're modifying is this new variable instead of the more global one. Removing the var from your statement will cause javascript to look for variables with the same name in higher scopes, which is what you want here. As for your dollar sign "problem", Joomla most certainly behaves that way to avoid libraries collisions. Many libraries use this $ as an entry point, each one redefining it, so having several of them would make them break each other. For that reason, JQuery gives you another entry point which is the JQuery object. If you want to use the $ anyway, then you can (and you most often should) limit your code's scope with this bit of code: (function($) { //your code here using $ })(jQuery); EDIT: After your edit, your classvar variable is undefined, so that can't work, after defining it to w/e, your code seems to be working for me.
type: Answer
has comment: http://stackoverflow.com/comment/41316188

http://stackoverflow.com/comment/41326570
score: 0
type: QuestionComment
type: Comment
has text: not sure to understand what do you mean by "you need to JS-escape the string literal"
comment on: http://stackoverflow.com/q/26331355

http://stackoverflow.com/comment/41400571
has text: http://pastebin.com/7LubRcmV -for menu.php ... http://pastebin.com/RpiSSP7v ... for abrirmodulo.hs ..
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26351001

http://stackoverflow.com/a/26320913
accepted answer of: http://stackoverflow.com/q/26319531
type: Answer
score: 16
upvote count: 16
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26319531
has body: "Performance" usually doesn't mean just how fast your script runs. There are also many other important factors, like how fast it freezes your pc and/or crashes. memory. The smallest amount of memory javascript implementation usually allocate for a var is 32 bit. This means var a = true; a boolean looks like this in your memory: 0000 0000 0000 0000 0000 0000 0000 0001 It's a huge waste, but usually not a problem, as no one uses a significant enough amount of them for it to really matter. Typed Arrays are for cases where it does matter, when you can actually reduce your memory usage by a huge amount, like when working with image data, sound data, or all sorts of raw binary data. Another difference, that allows you to potentially save even more memory in some cases is that it allows you to operate on data passed by reference you'd normally pass by value. Consider this case: var oneImage = new Uint8Array( 16 * 16 * 4 ); var onePixel = new Uint8Array( oneImage.buffer, 0, 4 ); you now have 2 independent views on the same ArrayBuffer, operating on the same data, applying that concept allows you to not only have that one huge thing in your memory, it allows you to actually subdivide it into as many segments as you currently want to work on with little overhead, which is probably even more important.

http://stackoverflow.com/comment/41116725
comment on: http://stackoverflow.com/a/26217442
type: Comment
has text: Initially I have a white square, in the top I had "Loading, please wait..." and right underneath it I had my gif "playing". I want to reproduce the same effect on Internet explorer, hence my question.
score: 0
type: AnswerComment

http://stackoverflow.com/a/43373134
downvote count: 0
upvote count: 8
type: Answer
has body: This short thing works well: import express from "express"; const app = express(), staticServe = express.static(`${ __dirname }/public`); app.use("/", staticServe); app.use("*", staticServe); Just make sure that all URLs from your HTML/JS files are absolute now, as all resources that do not exist will return index.html file. Express v 4.15.2
score: 8
answers question: http://stackoverflow.com/q/26349497

http://stackoverflow.com/a/26220708
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26219919
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26219919
has body: I think you're not grasping the syntactic structure of the call. One could equally write var numbers = [1, 2, 3, 4, 5]; var sum = 0; function addToSum(number) { sum += number; } forEach(numbers, addToSum); I hope it is clear what is happening in here. We have a function addToSum, and pass that function to the forEach function - where we refer to it by its parameter name action, and will call it with each element of the passed array in the body of the loop: action(array[i]). The great deal about this abstraction is that we can pass any arbitrary function to forEach… So what is this odd syntax now? First, it is replacing the function declaration by a function expression. A function expression is just an expression that evaluates to a function object, just as the array literal [1, 2, 3, 4, 5] evaluates to the array object. It's also called an anonymous function as it does not have a name. We take this value and assign it to a variable: var numbers = [1, 2, 3, 4, 5]; var sum = 0; var addTosum = function(number) { sum += number; } forEach(numbers, addToSum); Nothing has really changed until here. Now, why would we need that variable? We don't really need those identifiers pointing to the values that we created with the expressions. We now just put the expressions directly in the forEach function call - still passing the same values (forEach does not spot a difference): var sum = 0; forEach([1, 2, 3, 4, 5], function(number) { sum += number; });

http://stackoverflow.com/a/26291342
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41253325
has comment: http://stackoverflow.com/comment/41253948
upvote count: 1
has comment: http://stackoverflow.com/comment/41253296
accepted answer of: http://stackoverflow.com/q/26291214
answers question: http://stackoverflow.com/q/26291214
has comment: http://stackoverflow.com/comment/41253508
has body: Looks like it's matching on another controller action. The url /api/item/query is matching on one of your routes that is doing an ID-based query. I'm assuming it's something like a '/item/:id' or the like. The handler for that route is trying to use that route param to query Mongo, probably using a findById or similar and passing the id which at this point has the value 'query'.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/125776707
comment on: http://stackoverflow.com/q/26208285
has text: Shouldn't `name:"Bob"` be `"name":"Bob"`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41355177
type: QuestionComment
comment on: http://stackoverflow.com/q/26346924
score: 0
has text: If you expect jQuery answers you should add the jquery Tag aswell.
type: Comment

http://stackoverflow.com/comment/41232685
type: Comment
score: 1
has text: Start with the basics - http://php.net/manual/en/book.ftp.php
comment on: http://stackoverflow.com/q/26266003
type: QuestionComment

http://stackoverflow.com/comment/41289898
comment on: http://stackoverflow.com/q/26311225
score: 0
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/rx9mky6f/6/

http://stackoverflow.com/comment/41222076
has text: All what I want is to get an object to apply method on my element selected with jQuery. like $('body').html(" insidebody ").. Whatever..
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26274333
type: Comment

http://stackoverflow.com/comment/41289482
score: 2
has text: @charlietfl I work in a CRM company. We help our clients reach out to their customers automatically, and email broadcasting is one of our features. This Text Editor is for our clients to make an email template for their customers (newsletters, promotion, etc). We want our clients to make, for example,`Hi ${first_name} ${last_name}, blah blah blah` However, the variables to be replaced with the actual value later is `${__VCG__VAL__FIRST_NAME}`,etc. It's longer, and we don't want to confuse our clients.Plus, it doesn't look so good. But we want them to know that it's a variable. I hope it helps
comment on: http://stackoverflow.com/q/26309133
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41184698
type: QuestionComment
comment on: http://stackoverflow.com/q/26252069
score: 0
has text: Sorry, wasnt specific. Did an edit.
type: Comment

http://stackoverflow.com/q/26339184
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/41340676
has answer: http://stackoverflow.com/a/26339248
has title: Best way in Javascript to check if string is inside an huge txt/csv?
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41340639
tagged with: lookup
has body: My real world problem is: users of my mobile app type their city and I have to make sure it really exists, and that it is correctly written (caseinsensitive, so these are correct: New York, NEW york, new york. This is not correct: newyork) There are online apis that work quite well (Google Geocode API for example) but: After a very little amount of requests, you have to pay (2.500/day right now) Users must be connected to the internet That's why I tought that an offline-local solution would be better. There are many websites (like Maxmind) where you can download a list containing every city in the world. I could embed this huge txt/csv right inside my application and do a string search locally (it's a big file, ok, but not that big. It's just a onetime download of something like 30-40MB of uncompressed .txt) I'm trying to avoid jQuery at all costs and I don't want to use any PHP/MySQL solutions (even if fulltext indexes could be handy), that's why I'm trying to do all this just using javascript. Given a string as input, let's say "city3", what's the best/fastest way to check if it's inside an (external) huge list like: city1, city2, city3, city4, [...] After solving this (big) problem: if there are no exact matches, is there a way to search for the correct city without freezing the device for 10 minutes? In the example before, lets say the user types "cit y3" or "cyty3" or "cìty3": can any js function tell him that he might be looking for "city3"? Is this kind of search too slow in this scenario? Thanks
tagged with: performance
has answer: http://stackoverflow.com/a/26339650
type: Question
has answer: http://stackoverflow.com/a/26339254
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41347101
answer count: 3

http://stackoverflow.com/q/26249808
has answer: http://stackoverflow.com/a/26249866
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: HTML I am trying to create a todolist application. I wanted to make each task list to be removed with faded transition. I achieved it already but the problem with my code is that it only hide the first div area. Buy some fruits Buy some fruits JQuery $("#completed").change(function(){$("#item").fadeToggle("fast", "linear")});
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26249879
has answer: http://stackoverflow.com/a/26249938
has comment: http://stackoverflow.com/comment/41177281
has title: Javascript function only works once. Any idea why?
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41177331
score: 0
has answer: http://stackoverflow.com/a/26249836

http://stackoverflow.com/comment/41140801
type: Comment
has text: yes the problem is that there is not an unique id, so that's why i edit all the items contemporary, i have tried with your code but still not working. If you can edit my jsbin it would be great
comment on: http://stackoverflow.com/a/26226295
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41243038
score: 0
type: Comment
type: QuestionComment
has text: i had tried that earlier , jquery was throwing this error and dint help Uncaught Error: Syntax error, unrecognized expression: #/loadApp
comment on: http://stackoverflow.com/q/26285239

http://stackoverflow.com/q/26348737
has comment: http://stackoverflow.com/comment/41358571
answer count: 2
possible better answer: http://stackoverflow.com/a/26348754
has title: Add a value to each element in javascript
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26348846
has body: Is there a good way to add a certain value to each element in an array in javascript? Essentially, this should be a better way of writing the following: a = [1,2,3,4]; for (i = 0; i &lt; a.length; i++) { a[i] += 7; } Maybe using map (but not necessarily)? Edit: Or a more interesting example: a = [{'x':1},{'x':2},{'x':3},{'x':4}]; for (i = 0; i &lt; a.length; i++) { a[i].x += 7; }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41358380
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26348846
has answer: http://stackoverflow.com/a/26348754
tagged with: javascript

jqgrid
tags question: http://stackoverflow.com/q/26276249
tags question: http://stackoverflow.com/q/26342155
tags question: http://stackoverflow.com/q/26267930
tags question: http://stackoverflow.com/q/26342989
tags question: http://stackoverflow.com/q/26302307
tags question: http://stackoverflow.com/q/26226981
type: Tag
tags question: http://stackoverflow.com/q/26309984
tags question: http://stackoverflow.com/q/26330593
tags question: http://stackoverflow.com/q/26353125
tag name: jqgrid
tags question: http://stackoverflow.com/q/26344939

http://stackoverflow.com/q/26285947
tagged with: javascript
has answer: http://stackoverflow.com/a/26286123
answer count: 2
has comment: http://stackoverflow.com/comment/41243946
tagged with: validation
has comment: http://stackoverflow.com/comment/41247249
linked to: http://stackoverflow.com/q/13466133
has body: Title tells the problem shortly, I have a few email fields like so: Email 1: &lt;input type="email" name="email1" ng-model="emails.email1" /&gt; &lt;br /&gt; Email 2: &lt;input type="email" name="email2" ng-model="emails.email2" /&gt; I am using following css to see the result: input[type="email"].ng-invalid.ng-dirty { background-color: #FA787E; } The problem is, validation doesn't fire unless I add required attribute. Inputs take classes "ng-valid ng-touched ng-dirty" when I input abc. I don't want to put required attribute because I want them to be optional and be validated only if a user wants to fill an e-mail address. Is there a workaround for that?
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26286152
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41243520
score: 0
has title: Angularjs email validation without required
has comment: http://stackoverflow.com/comment/41244951
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41244333
type: Question

http://stackoverflow.com/q/26308187
has answer: http://stackoverflow.com/a/26308422
answer count: 5
has comment: http://stackoverflow.com/comment/41284675
has comment: http://stackoverflow.com/comment/41284902
possible better answer: http://stackoverflow.com/a/26308263
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26308227
has body: I'm trying to select the first child of a parent element with pure JavaScript and change some of it's CSS properties. I've tried .firstChild and .childNodes[1] methods but they do not work. This can be done with CSS nth-child() selector but I would like to do it with JavaScript for better browser support. Example: HTML I want select this child and change it's css property. What I've tried: JavaScript var x = document.getElementsByClassName('daddy'); var d = x.firstChild; // and the x.childNodes[1] d.style.width="5em"; What works: CSS daddy:nth-child(1) { width: 5em; } Any help will be appreciated.
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26308673
has answer: http://stackoverflow.com/a/26308287
has title: How do I select the first child of a parent element?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6584635
tagged with: css
accepted answer: http://stackoverflow.com/a/26308673
has answer: http://stackoverflow.com/a/26308263

http://stackoverflow.com/q/26301387
linked to: http://stackoverflow.com/q/203198
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/41271649
has answer: http://stackoverflow.com/a/26301490
has title: Self-Invoking Function Scope with Dynamically Binded Content
has body: I have wrapped my JavaScript in a self-invoking function to keep everything contained. Hoever, I have run into an issue where my links, which are dynamically built on the fly, return an error "Function not defined" when they are clicked. Let me include my relevant code: (function(window, document, $) { function buildChapterList() { for(var i=0; i&lt;Object.keys(theChapterCues).length; i++) { chapterListHTML = "&lt;li&gt;&lt;a class='fun-blue' href='javascript:void(0)' onClick=\"skipToChapter('"+ i +"')\"&gt;"+ theChapterCues[i]["title"] +"&lt;/a&gt;&lt;/li&gt;"; $(chapterListHTML).appendTo("ul#chapter-list"); $("body").bind("DOMNodeInserted", function() { $(this).find('#chapter-list li').first().addClass("active"); }); } } function skipToChapter(theChapter) { if (theChapter == 0) { theVideo.currentTime=0; } else { var thisChapterStart = parseInt(cues[theChapter]["chapterStart"]+1); theVideo.currentTime=thisChapterStart/frameRate; } } }(this, this.document, this.jQuery)); When clicking on one of the generated links I receive the following error: Uncaught ReferenceError: skipToChapter is not defined Am I missing something on scope? Is this a binding issue? Any advice would be greatly appreciated. Thanks!
has answer: http://stackoverflow.com/a/26301758
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26301490
score: 0
possible better answer: http://stackoverflow.com/a/26301758
type: Question

http://stackoverflow.com/q/26332714
has title: Use AJAX to display multiple partials
score: 0
accepted answer: http://stackoverflow.com/a/26332732
tagged with: ruby-on-rails
tagged with: escaping
type: AnsweredQuestion
has body: I feel like this should be really simple... I make an AJAX call, where I send an array of strings (defined in my call-back function in my controller) to a .js.erb file: In my rails controller: @array = ["render partial a", "render partial b", "render partial c"] render :action =&gt; "show_options" In my show_options.js.erb file, I want to make an escape_javascript call on each each of the strings in @array, e.g. var show_1 = '&lt;%= escape_javascript( @array[0] ) %&gt;' var show_2 = '&lt;%= escape_javascript( @array[1] ) %&gt;' var show_3 = '&lt;%= escape_javascript( @array[2] ) %&gt;' The issue is that the number of array elements is variable. How would I set up some sort of loop to ensure I can handle any number of array elements? I was trying something along these lines, but I can't figure out how to insert the index number (i) into the ruby expression. for (i = 0; i &lt; @array_lenth; i++) { var show =+ '&lt;%= escape_javascript( @array[i] ) %&gt;' } I'm not sure how else to do it..
type: Question
has answer: http://stackoverflow.com/a/26332732
tagged with: arrays
answer count: 1
tagged with: javascript

grunt-concurrent
tag name: grunt-concurrent
tags question: http://stackoverflow.com/q/26236484
type: Tag

http://stackoverflow.com/q/26212238
type: Question
tagged with: javascript
tagged with: class
score: 0
has answer: http://stackoverflow.com/a/26212274
answer count: 1
favorite count: 0
has body: I have this kind of code: JAVASCRIPT $xml.find( "test" ).each( function() { var state = $(this).attr('state'); if(state == "known"){ $("#mytab").append('' + $(this).text() + ' ' ); } } ); And I want to add another class within the anchor a like this: $("#mytab").append('' + $(this).text() + ' ' ); But it doesn't work, because when I see in Chrome debug the class otherClass exists but the class set by the state its no more present.
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26212274
type: AnsweredQuestion
upvote count: 1
downvote count: 1
has title: html: add another class within an anchor

http://stackoverflow.com/comment/41111590
comment on: http://stackoverflow.com/a/26214896
has text: oops - sorry - one sec - let me fix
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41241550
has text: Unless you have not included all your HTML, it looks like your javascript is targeting DOM elements that don't exist (`#categorylist, #category1, #category2 and #closing`)
comment on: http://stackoverflow.com/q/26284020
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26209291
has comment: http://stackoverflow.com/comment/41101509
favorite count: 0
has comment: http://stackoverflow.com/comment/41102027
has comment: http://stackoverflow.com/comment/41101872
upvote count: 1
has answer: http://stackoverflow.com/a/26209453
tagged with: combinations
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41101545
linked to: http://stackoverflow.com/q/2710713
has body: var combinations = function(numArr, choose, callback) { var n = numArr.length; var c = []; var inner = function(start, choose_) { if (choose_ == 0) { callback(c); } else { for (var i = start; i &lt;= n - choose_; ++i) { c.push(numArr[i]); inner(i + 1, choose_ - 1); c.pop(); } } } inner(0, choose); } I'm not entirely sure how I would append all the items inside an array after it's done creating all the combinations. I attempted some modifications to the code though I ultimately ended up messed it up. Example :
possible better answer: http://stackoverflow.com/a/26209453
has comment: http://stackoverflow.com/comment/41102076
has answer: http://stackoverflow.com/a/26209610
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/9960908
has title: How would I append all the combinations in a list?
accepted answer: http://stackoverflow.com/a/26209610
has comment: http://stackoverflow.com/comment/41102046
tagged with: permutation
score: 1

http://stackoverflow.com/q/26240762
score: 2
tagged with: ui-automation
type: Question
tagged with: xcode6
downvote count: 0
tagged with: ios
tagged with: javascript
favorite count: 0
tagged with: ios-ui-automation
has body: Has anyone been able to successfully launch a UIAutomation .js script with instruments from the Terminal and/or a shell script yet? This is the script I was using on Xcode 5 that was working fine: instruments \ -w "167dd71e05a29312fe46ea66ec68be837ffcd127" \ -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" \ "/Users/automationken/Library/Application Support/iPhone Simulator/7.1-64/Applications/7C2A685D-0CC9-40B4-A9B7-5C7C99DB93DC/something.app" \ -e UIARESULTSPATH "/Users/automationken/source/something/ios_UIA/automation_results" \ -e UIASCRIPT "/Users/automationken/source/something/ios_UIA/something.js" Now I did notice that the automation template path has changed to: "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate" And that the path of the new simulator is now: ~/Library/Developer/CoreSimulator/Devices/ But I can't find an equivalent .app file anywhere in the sub directories beyond that. Anybody know what I'm doing wrong?
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: Terminal/Shell Script execution of iOS UIAutomation in Xcode 6

http://stackoverflow.com/q/26251275
has comment: http://stackoverflow.com/comment/41180037
has comment: http://stackoverflow.com/comment/41180452
favorite count: 0
has answer: http://stackoverflow.com/a/26251818
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26251818
downvote count: 1
type: Question
has body: I'm using the following the api wrapper: https://github.com/jmelosegui/GooglemapMvc It isn't possible with the api to create an marker with a label, so i am modifying the javascript myself. This works fine (Creating a normal marker): var markerOptions = { position: new google.maps.LatLng(this.Latitude, this.Longitude), map: this.EnableMarkersClustering ? null : this.Map, title: this.Title, clickable: this.Clickable, draggable: this.Draggable, }; // create marker this.GMarker = new Marker(markerOptions); This does not (Creating a marker with a label): // create marker this.GMarker = new MarkerWithLabel({ position: new google.maps.LatLng(this.Latitude, this.Longitude), map: this.EnableMarkersClustering ? null : this.Map, title: this.Title, clickable: this.Clickable, draggable: this.Draggable, // Self added raiseOnDrag: true, labelContent: "A", labelStyle: { opacity: 0.75 }, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels", // the CSS class for the label labelInBackground: false, labelVisible: true, optimized: false, icon: {} }); // Anything below here won't be reached! console.log("marker!"); Why doesn't it reach the console.log?
tagged with: asp.net-mvc
upvote count: 0
answer count: 1
tagged with: javascript
score: -1
tagged with: google-maps-api-3
has title: Markerwithlabel doesn't get created

http://stackoverflow.com/q/26329315
tagged with: forms
has answer: http://stackoverflow.com/a/26329591
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/11986972
linked to: http://stackoverflow.com/q/11986972
linked to: http://stackoverflow.com/q/18014009
type: Question
has comment: http://stackoverflow.com/comment/41322645
has comment: http://stackoverflow.com/comment/41322816
has comment: http://stackoverflow.com/comment/41322856
tagged with: javascript
has title: jquery multiple dynamic forms on submit
has body: jQuery 1.11.0 http://jsfiddle.net/sfvyxunj/ $(".myForm").on("submit", function(event){ }); I can't get jQuery's .on to work on dynamically created forms. I've tried several variations of the .on statement, but if the forms are loaded from ajax dynamically then it just doesn't want to work. Note: The settimeout was used to simulate an ajax request. fiddle gives an error, but on a server the form would just reload the page and bypass jQuerys .on Thanks in advance.

http://stackoverflow.com/comment/41210519
has text: because you do not use price. Read your code out loud.
comment on: http://stackoverflow.com/q/26267876
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26303897
has body: My laptop has a mousepad that allows for pinching. I am writing a html/javascript page where I want to write my own scaling function for pinch. This is a website page for mobiles and desktops. (I am testing the desktop.) What event should I be capturing? At the moment I have: window.addEventListener("touchstart", mycanvasOnTouchStart, false); window.addEventListener("touchmove", mycanvasOnTouchMove, false); window.addEventListener("touchend", mycanvasOnTouchEnd, false); None of my functions fire. Also, the default action of the pinch, namely zooming the whole html page, continues, even though I have put the following in the HEAD element of the page: &lt;head&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"&gt; &lt;/head&gt; Anyone have any ideas?
has comment: http://stackoverflow.com/comment/41523077
answer count: 0
tagged with: pinch
type: Question
has comment: http://stackoverflow.com/comment/41276224
has comment: http://stackoverflow.com/comment/41439410
score: 0
tagged with: javascript
has title: Laptop Mouse Pad Allows for Pinch - What is the Associated Event in Javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41299118
tagged with: events

http://stackoverflow.com/comment/49761807
type: Comment
has text: convert this `until.setmonths` to this `until.setMonth`
comment on: http://stackoverflow.com/a/26311490
score: 0
type: AnswerComment

http://stackoverflow.com/q/26320158
has answer: http://stackoverflow.com/a/26320298
favorite count: 0
has title: C# javascript click button by tag and attribute
type: AnsweredQuestion
score: 2
tagged with: c#
accepted answer: http://stackoverflow.com/a/26320439
possible better answer: http://stackoverflow.com/a/26320298
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/41306059
has answer: http://stackoverflow.com/a/26320439
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I'm having some trouble getting my program to click a button: Recruit That is the button I'm trying to click but when I add the code for it it does nothing, I'm new to C# and trying to learn this. So if someone could point out what I'm doing wrong here I would very much appreciate it. Here is the program code: namespace clean_test { public partial class Form1 : Form { public Form1() { InitializeComponent(); web.ScriptErrorsSuppressed = true; Registry.SetValue("HKEY_CURRENT_USER\\AppEvents\\Schemes\\Apps\\Explorer\\Navigating\\.Current", "", "NULL"); web.Navigate("http://www.mywebsite.com"); } private void recruit_Click(object sender, EventArgs e) { HtmlElementCollection elems = web.Document.GetElementsByTagName("a"); foreach (HtmlElement elem in elems) { String value = elem.GetAttribute("value"); if (value != null && value.Length != 0 && value.Equals("Recruit")) { recruit.PerformClick(); } } } } }

http://stackoverflow.com/q/26318997
tagged with: javascript
has comment: http://stackoverflow.com/comment/41303597
has comment: http://stackoverflow.com/comment/41306006
tagged with: mongodb
score: 0
has title: Faster MongoDB bindings for Node.js
type: UnansweredQuestion
has body: I am sorry if my question tends to be a little personal, but I am sure there might be others who need this as well. Today I found that require('mongodb') in my server-side script takes about half a second. Just to load. Not a big deal for a server software that is supposed to run 24/7. But to me as a developer this feels like a compilation time, which disrupts my comfortable development cycle. I installed this official bindings package like this: npm install mongodb This is the github repository or maybe this one, not sure yet. I think this is the author website (Christian Kvalheim), maybe I could ask him, but I am used to the community support. Thus is my question: is there another, faster/smaller/simpler implementation of MongoDB protocol for Node.js that is relatively full and more or less stable? I know that "alternative" questions are not welcome on StackOverflow, but in my situation I think it could be useful and might have a good answer. Another part of my question is why it is so huge and takes so much time to load? Is not it just a "wrapper" to send simple commands to a server? All you need is just Http.connect and then connection.send(JSON.stringify()) or similar (bson?). Could this be done in a hundred(or whatever) lines even if you want to wrap each of the most common functions separately? I hope I just missing something. find node_modules/mongodb/|grep .js|grep -v test|xargs -L1 cat|grep -c "" Gives out 24151 Or maybe I just edit and rename my question to be "how official node.js mongodb package works and why it is so huge"?
has comment: http://stackoverflow.com/comment/41316766
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/41310690
type: Question
linked to: http://stackoverflow.com/q/26317393
has comment: http://stackoverflow.com/comment/41311300

http://stackoverflow.com/q/26212287
has comment: http://stackoverflow.com/comment/41108151
has answer: http://stackoverflow.com/a/26212450
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41107067
score: -3
has title: Issue with do - while loop ( javascript)
type: Question
tagged with: do-while
has comment: http://stackoverflow.com/comment/41107094
has comment: http://stackoverflow.com/comment/41108086
upvote count: 1
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41107795
favorite count: 0
has body: I am trying to create a loop where when a user presses a button the "+" sign is displayed on the screen but only once and it doesn't seem to work. I want it to display the "+" sign once when the button is clicked and then when the button is pressed again I don't want it to display unless I change the value of a to true. can anyone help? The example below is just my entire code I am testing the aim to display the plus sign only once in the textfield 1 2 3 4 35 4
has comment: http://stackoverflow.com/comment/41108184
downvote count: 4

http://stackoverflow.com/comment/41316979
comment on: http://stackoverflow.com/a/26326169
has text: No, but jquery is a library that is needed by your sample.js file - its a kind of dependency. Thats why its key to first load jquery and after that your js-file.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/52635191
type: Comment
comment on: http://stackoverflow.com/a/26227662
score: 1
type: AnswerComment
has text: @AmanVirk Does that method work if you are extending the class?

firebase
tags question: http://stackoverflow.com/q/26275534
tags question: http://stackoverflow.com/q/26248940
tags question: http://stackoverflow.com/q/26264502
tags question: http://stackoverflow.com/q/26297654
tags question: http://stackoverflow.com/q/26198037
tags question: http://stackoverflow.com/q/26311838
tags question: http://stackoverflow.com/q/26319885
tags question: http://stackoverflow.com/q/26206511
tags question: http://stackoverflow.com/q/26340169
tags question: http://stackoverflow.com/q/26297464
tags question: http://stackoverflow.com/q/26199324
type: Tag
tag name: firebase

http://stackoverflow.com/comment/41145356
comment on: http://stackoverflow.com/q/26232588
score: 0
type: Comment
type: QuestionComment
has text: OK if it's filled then not ajax problem

http://stackoverflow.com/comment/41328038
type: Comment
type: QuestionComment
has text: As @geocodezip said, a map provided by Google's JavaScript API would be much better for this task. Is there a specific reason you're using a static map?
score: 0
comment on: http://stackoverflow.com/q/26308666

deserialization
type: Tag
tag name: deserialization
tags question: http://stackoverflow.com/q/26233882

http://stackoverflow.com/q/26302140
score: 5
tagged with: polymer
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26850791
upvote count: 5
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26852482
has answer: http://stackoverflow.com/a/26852482
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42145218
has body: Web Animations is a new w3c spec, just to be clear what we're talking about. Either way, I wanted to scroll to a certain element smoothly. Using jQuery's Animate function this was always a no-brainer, but this seems to not be as simple with Web Animations. Is there any way to use the Web Animation timing functions and apply them to a DOM property (scrollTop). The reason I am asking is that I don't want to load an entire (extra) library just to use its interpolation function whilst doing it with a different technology/library in the rest of my application.
favorite count: 0
tagged with: web-animations
has answer: http://stackoverflow.com/a/26850791
has title: Animate DOM properties (scrollTop) using Web Animations
has comment: http://stackoverflow.com/comment/42145320

http://stackoverflow.com/comment/41105117
type: QuestionComment
comment on: http://stackoverflow.com/q/26211186
score: 0
has text: Please post some code!
type: Comment

http://stackoverflow.com/q/26236275
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: dom-events
favorite count: 0
has answer: http://stackoverflow.com/a/26236497
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/26236497
has comment: http://stackoverflow.com/comment/41152209
has comment: http://stackoverflow.com/comment/41151740
upvote count: 3
has title: How do I attach a listener to a cloned element?
answer count: 1
has body: I'm currently learning about DOMs and have this problem I'm struggling with when two or more cloned elements get the same event listener. case 116: var myList = document.querySelectorAll(".selected"); for(var i=0; i&lt;myList.length;i++) { var node=myList[i].cloneNode(true); node.style.top=Math.random()*window.innerHeight-(node.style.height/2)+"px"; node.style.left=Math.random()*window.innerWidth-(node.style.width/2)+"px"; node.addEventListener("click",function(e){ node.classList.toggle("selected"); console.log(e); }); myList[i].parentNode.appendChild(node); } break; box 1 is the original box and it has its own EventListener. box 2 is the clone of the original and selects and deselects as it should. box 3-4 are clones of 1-2 but it seems that box 3 and 4 get the same listener because when I click on box 4 it toggles selected on box 3 and nothing happens with box 4. How do I solve this? Any help will be most welcome.
tagged with: dom

http://stackoverflow.com/q/26214257
has title: jQuery Mobile Responsive Video With Javascript
score: 2
has comment: http://stackoverflow.com/comment/41110487
has body: I have implemented responsive video using javascript. It is working fine but jquery mobile http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js is removing the right margin and/or makes it impossible to center the video. If the above jQuery Mobile code is removed, it works fine. I need it to be centered with no additional tags around the video url as the code is an output from a php script. Html video code: &lt;p style="text-align: center;"&gt;&lt;strong&gt;&lt;iframe src="http://www.youtube.com/embed/MItGoIxoVGk" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/strong&gt;&lt;/p&gt; Responsive Video Javascript Code: // Find all YouTube &amp; Vimeo videos var $allVideos = $("iframe[src^='http://player.vimeo.com'], iframe[src^='http://www.youtube.com']"), // The element that is fluid width $fluidEl = $("body"); // Figure out and save aspect ratio for each video $allVideos.each(function() { $(this) .data('aspectRatio', this.height / this.width) // and remove the hard coded width/height .removeAttr('height') .removeAttr('width'); }); // When the window is resized $(window).resize(function() { var newWidth = $fluidEl.width(); // Resize all videos according to their own aspect ratio $allVideos.each(function() { var $el = $(this); $el .width(newWidth) .height(newWidth * $el.data('aspectRatio')); }); // Kick off one resize to fix all videos on page load }).resize(); jsfiddle link: http://jsfiddle.net/flymen777/hobzq6fu/
type: Question
has comment: http://stackoverflow.com/comment/41110670
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
tagged with: css
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/41232391
score: 3
has text: @Alnitak what do you mean it's not standard? It's right there in [the ECMAScript specification](http://www.ecma-international.org/ecma-262/5.1/). The backslash-newline sequence is formally called a LineContinuation. But the result is not a multiline string in the usual sense, as neither the newline nor the backslash appears in the actual produced string.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26279876

search-engine
type: Tag
tags question: http://stackoverflow.com/q/26290642
tag name: search-engine
tags question: http://stackoverflow.com/q/26245377
tags question: http://stackoverflow.com/q/26314607

http://stackoverflow.com/q/26298500
has answer: http://stackoverflow.com/a/26299246
tagged with: javascript
score: 6
possible better answer: http://stackoverflow.com/a/26299246
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41266445
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/27854173
type: Question
linked to: http://stackoverflow.com/q/23803743
has answer: http://stackoverflow.com/a/26298608
upvote count: 6
has title: Stop pending async function in JavaScript
has comment: http://stackoverflow.com/comment/41266224
answer count: 3
has comment: http://stackoverflow.com/comment/41266008
has body: Here I have two JS async functions running simultaneously. When one has ended (callback has been run), I would like to stop other one to go ahead. However (that's my issue) I cannot use global vars. Then, I would like to know if it is possible to stop a pending function in JS or any way to solve my problem. I will appreciate any answers :) EDIT: Some clarifications: I am here using pure JS. No HTML provided. When I am talking about asynchronous, it could be every async function, not only ajax (database, timeout etc.). We do not know their runtime. About code, here is a sample of what I would like to produce: asyncFirst( // ... args function() { // callback console.log('foo'); stopOther(); } ); asyncSecond( // ... args function() { // callback console.log('bar'); stopOther(); } ); asyncFirst(...); asyncSecond(...); What algorithm for stopOther() without using 'state' vars?
has answer: http://stackoverflow.com/a/27854173

http://stackoverflow.com/comment/41239413
score: 5
type: AnswerComment
comment on: http://stackoverflow.com/a/26283902
type: Comment
has text: `arguments.callee` is [forbidden](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee) in ES5 strict mode; I wouldn't recommend it.

http://stackoverflow.com/a/26323672
upvote count: 9
has comment: http://stackoverflow.com/comment/41313055
accepted answer of: http://stackoverflow.com/q/26323481
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26323481
downvote count: 0
type: Answer
has body: Try to visualize the process on each step, and substitute, like an equation: ┌──────────────┬──────────────┐ │ label: n00 │ label: n01 │ │ count: 76 │ count: 9 │ │ no squirrel, │ no squirrel, │ │ no pizza │ pizza │ ├──────────────┼──────────────┤ │ label: n10 │ label: n11 │ │ count: 4 │ count: 1 │ │ squirrel, │ squirrel, │ │ no pizza │ pizza │ └──────────────┴──────────────┘ table = [n00, n01, n10, n11] n00 = table[0] = 76 n10 = table[1] = 4 n01 = table[2] = 9 n11 = table[3] = 1 n1• = n10 + n11 = table[2] + table[3] = 9 + 1 = 10 n0• = n00 + n01 = table[0] + table[1] = 76 + 4 = 80 n•1 = n01 + n11 = table[1] + table[3] = 4 + 1 = 5 n•0 = n00 + n10 = table[0] + table[2] = 76 + 9 = 85 //pseudo code phi = function(table) { return (n11 * n00 - n10 * n01) / Math.sqrt(n1• * n0• * n•1 * n•0) } //JavaScript code phi = function(table) { return (table[3] * table[0] - table[2] * table[1]) / Math.sqrt((table[2] + table[3]) * (table[0] + table[1]) * (table[1] + table[3]) * (table[0] + table[2])) }
score: 9

http://stackoverflow.com/comment/41143694
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26231860
has text: can i have expression to replace those braces ? :p

http://stackoverflow.com/comment/41155095
comment on: http://stackoverflow.com/a/26224017
has text: @ScrumMstrcdr You need to use correct ID of each element you want to process, of course (`selType`, `YEAR`, `spnBusiness`, ...). If you still cant't get it to work, inspect the DOM tree with your browser's web development tools (in IE press <F12>).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26270959
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41215996
tagged with: php
has comment: http://stackoverflow.com/comment/41216366
has comment: http://stackoverflow.com/comment/41216129
has comment: http://stackoverflow.com/comment/41216144
has comment: http://stackoverflow.com/comment/41216095
linked to: http://stackoverflow.com/q/16086162
type: Question
has comment: http://stackoverflow.com/comment/41216142
has comment: http://stackoverflow.com/comment/41216002
has comment: http://stackoverflow.com/comment/41216179
answer count: 1
has comment: http://stackoverflow.com/comment/41216105
tagged with: javascript
has comment: http://stackoverflow.com/comment/41215990
tagged with: jquery
has comment: http://stackoverflow.com/comment/41216670
tagged with: ajax
score: 0
has title: Ajax not making function call to php function
has body: I have ajax function in script as: $.ajax({ url: 'http://www.somesitename.com/admin/exportToCSVAction', type: 'GET', data:{}, cache: false, success: function() { alert("sucess"); }, error: function () { alert("error"); } }); exportToCSVAction function in php as: public function exportToCSVAction() { $exportBatch = 10; $order = $this-&gt;getTableGateway('order'); $select = new Select(); $select-&gt;from('order'); $data = $order-&gt;selectWith($select)-&gt;toArray(); $batchDir = __DIR__ . '/../../../../../data/export/batch/' . $exportBatch; mkdir($batchDir); $fileNameWithFilePath=$batchDir . '/order2.csv'; if (file_exists($fileNameWithFilePath)) { $this-&gt;downloadOrderCSVAction($fileNameWithFilePath); } else { $csvFile = fopen($batchDir . '/order2.csv', 'w'); $i = 0; foreach($data as $record) { if($i==0) fputcsv($csvFile, $this-&gt;getCsvHeader($record)); fputcsv($csvFile, $this-&gt;updateCsvLine($record)); $i++; } fclose($csvFile); } } But every time its returning me error as alert. When i run it directly through link: http://www.somesite.com/admin/exportToCSVAction It returns me result correctly. (downloads the file as expected) But through ajax it gives me Error as a alert. Through inspect element network tab i get following: Please help me. Where i am making mistake? Note: I also tried by removing data from ajax, but no effect Edit : $.ajax({ url: 'http://www.somesitename.com/admin/exportToCSV', type: 'GET', data:{}, cache: false, success: function() { alert("sucess"); }, error: function () { alert("error"); } }); exportToCSVAction function in php as: public function exportToCSVAction() { $exportBatch = 10; $order = $this-&gt;getTableGateway('order'); $select = new Select(); $select-&gt;from('order'); $data = $order-&gt;selectWith($select)-&gt;toArray(); $batchDir = __DIR__ . '/../../../../../data/export/batch/' . $exportBatch; mkdir($batchDir); $fileNameWithFilePath=$batchDir . '/order2.csv'; if (file_exists($fileNameWithFilePath)) { //Code to download file } e…
has answer: http://stackoverflow.com/a/26271258

http://stackoverflow.com/comment/41307911
score: 0
type: AnswerComment
type: Comment
has text: it works but CSS div height doesn't get reduced am using bootstrap am getting empty space but show ,hide option works how do i reduce DIV height
comment on: http://stackoverflow.com/a/26321226

http://stackoverflow.com/comment/41278657
score: 0
type: Comment
type: QuestionComment
has text: I can't use keyup. I just don't have a keyboard to shot keyup event. :)
comment on: http://stackoverflow.com/q/26305217

http://stackoverflow.com/q/26265879
has title: Do tab ID and root URL ever change from within the content script for a Google Chrome extension?
score: 0
has answer: http://stackoverflow.com/a/26266482
answer count: 1
tagged with: javascript
has body: From a standpoint of the content script injected into a web page by my Google Chrome extension, do tab ID and root URL of the web page ever change? (By root URL I assume the URL of the top window in the possible IFRAMEs hierarchy.) Or, in other words, is it safe to retrieve tab ID and root URL when the content script starts running and cache it in the global variable for a later use?
tagged with: google-chrome-extension
tagged with: content-script
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26266482
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/26340959
favorite count: 0
has body: How can I load my modules(selected based on user after logged in) in my Angular app dynamically?
tagged with: angularjs
tagged with: angularjs-module
has title: Add modules to my Angular App Dynamically
type: AnsweredQuestion
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26341026
tagged with: javascript
has answer: http://stackoverflow.com/a/26341026
score: 0
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/41170383
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26245941
score: 3
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this

http://stackoverflow.com/a/66749198
type: Answer
answers question: http://stackoverflow.com/q/26342123
downvote count: 2
has comment: http://stackoverflow.com/comment/137067317
has body: To quote the MDN Documentation directly... This function was used mostly for URL queries (the part of a URL following ?)—not for escaping ordinary String literals, which use the format "\xHH". (HH are two hexadecimal digits, and the form \xHH\xHH is used for higher-plane Unicode characters.) The problem you are experiencing is because escape() does not support the UTF-8 while encodeURI() and encodeURIComponent() do. But to be absolutely clear: never use encodeURI() or encodeURIComponent(). Let's just try it out: console.log(encodeURIComponent('@#*')); Input: @#*. Output: %40%23*. Ordinarily, once user input is cleansed, I feel like I can trust that cleansed input. But if I ran rm * on my Linux system to delete a file specified by a user, that would literally delete all files on my system, even if I did the encoding 100% completely server-side. This is a massive bug in encodeURI() and encodeURIComponent(), which MDN Web docs clearly point with a solution. Use fixedEncodeURI(), when trying to encode a complete URL (i.e., all of example.com?arg=val), as defined and further explained at the MDN encodeURI() Documentation... function fixedEncodeURI(str) { return encodeURI(str).replace(/%5B/g, '[').replace(/%5D/g, ']'); } Or, you may need to use use fixedEncodeURIComponent(), when trying to encode part of a URL (i.e., the arg or the val in example.com?arg=val), as defined and further explained at the MDN encodeURIComponent() Documentation... function fixedEncodeURIComponent(str) { return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return '%' + c.charCodeAt(0).toString(16); }); } If you are having trouble distinguishing what fixedEncodeURI(), fixedEncodeURIComponent(), and escape() do, I always like to simplify it with: fixedEncodeURI() : will not encode +@?=:#;,$& to their http-encoded equivalents (as & and + are common URL operators) fixedEncodeURIComponent() will encode +@?=:#;,$& to their http-encoded equivalents.
has comment: http://stackoverflow.com/comment/129006541
upvote count: 8
score: 6

http://stackoverflow.com/comment/41311462
score: 0
type: Comment
type: QuestionComment
has text: Can you post the exact error message? Do you get it client side or on compiling?
comment on: http://stackoverflow.com/q/26323319

http://stackoverflow.com/q/26214560
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has title: Jquery - Fastest way to get children elements
has body: my work requires me to work with jquery a lot. Since i am always trying to find a better way to do things, i would like to improve performance on javascript level of page. so i was wondering what is the fastest way to get specific children of DOM element in Jquery? Lets say we have it like this: parent |-element 1 |-element 2 |-parent element 1 |---element A |---element B |-parent element 2 |---element C |-element 3 Which of the following methods would be most suitable to get every specific element, assuming every element in the first branch of dom tree has an identifiable id or class different from others and there is no limitations to what kind of elements they are? Method 1: getting each element with its own selector as such: var element1 = $(".element1"); var element2 = $(".element2"); ... Method 2: getting each element with parent element as such: var parent = $(".parent"); var element1 = parent.children('.element1'); var element2 = parent.children('.element2'); ... Method 3: getting the whole thing in array and parsing trough it as such: var elements = $(".parent").children(); var element1 = elements[0]; var element2 = elements[1]; var elementA = elements[2].children('elementA'); // or maybe like this? // var elementA = elements[2].children()[0]; ... On the dom tree presented i also included nested parents and children. Which method is most suitable to get those, especially if they do not have a unique identifier? for instance with regard to dom tree presented: would it be faster to get element like this (assuming parent element has no unique identifier): var elementA = $(".parent").children(".parent-element-1").children(".elementA") or var elementA = $(".parent").find('.elementA') ? Also if there is any other way (except calling elements through sizzle) to get to elements, please do tell me about it :) I am aware i could call elements via javascript alone, but with a few hundred dom elements, such a task would probably be way outside my usual time frame - or …
has comment: http://stackoverflow.com/comment/41111365
has comment: http://stackoverflow.com/comment/41111409
upvote count: 2
has comment: http://stackoverflow.com/comment/41111053
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41111463
has comment: http://stackoverflow.com/comment/41111648
has comment: http://stackoverflow.com/comment/41111270
score: 2
has comment: http://stackoverflow.com/comment/41111071
linked to: http://stackoverflow.com/q/648004
has answer: http://stackoverflow.com/a/26214765
has comment: http://stackoverflow.com/comment/41111031
has comment: http://stackoverflow.com/comment/41111325
tagged with: dom
has comment: http://stackoverflow.com/comment/41111303
has comment: http://stackoverflow.com/comment/41111570
type: Question
tagged with: performance
has comment: http://stackoverflow.com/comment/41111143
tagged with: javascript
tagged with: jquery-selectors

http://stackoverflow.com/q/26323889
has comment: http://stackoverflow.com/comment/41312466
has comment: http://stackoverflow.com/comment/41312509
score: 0
has comment: http://stackoverflow.com/comment/41312472
has comment: http://stackoverflow.com/comment/41312416
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/26325103
has comment: http://stackoverflow.com/comment/41312469
has answer: http://stackoverflow.com/a/26323960
type: Question
answer count: 2
tagged with: request
tagged with: php
has title: Submit GET form and another POST form with one button
has body: I'm trying to submit a POST and a GET form with one submit button. I tried using the following php code: echo " \n \n Params "; echo " "; echo " "; echo " "; echo " "; echo " First Name "; echo " "; echo " Last Name "; echo " "; echo " Age "; echo " "; echo " Telephone "; echo " "; echo " "; echo " "; echo " Username "; echo " "; echo " Password "; echo " "; echo " "; echo " "; echo " "; What I get is only the POST params, while the GET request is not loading at all. How can I fix this? Thanks in advance.

http://stackoverflow.com/q/26291171
tagged with: entity-framework-4
tagged with: excel
has body: I took over a C# Entity Framework project from an ex coworker. He set up a few tables in ways I am not to familiar using Javascript. I need to get the contents of this data table exported to an Excel and PDF file (seperate button for each). I am open to using C#, Javascript, or JQuery. I have been doing ColdFusion recently, and haven't even looked at anything .NET related in almost a year, so I am trying to get a refresher as well as figure out stuff I have never seen before, so my mind fried. Javascript Code used to fill the data table: $(document).ready(function () { var active = true; GetList(active); }); function ChangeList() { GetList($("#ddlRiderType").val()); } function GetList(isActive) { $('#dataTable').dataTable({ "sDom": '<"top"lf>rt<"bottom"ip><"clear">', "bAutoWidth": false, "bProcessing": true, "bSort": true, "bDestroy": true, "sPaginationType": "full_numbers", "bServerSide": true, "sAjaxSource": "Instructor.aspx/GetAllInstructors", "fnServerData": function (sSource, aoData, fnCallback) { var jsonData = "{jsonAOData : '" + JSON.stringify(aoData) + "', isActive: '" + isActive + "'}"; $.ajax({ //dataType: 'json', contentType: "application/json; charset=utf-8", type: "POST", url: sSource, data: jsonData, complete: function () { Init(); }, success: function (msg) { if (msg.d != null) fnCallback(msg.d); }, error: function (XMLHttpRequest, textStatus, errorThrown) { ntfy_push("Error", ServerFail()); } }); }, "aoColumnDefs": [ { "sName": "Cipher", "aTargets": [0], "bVisible": false, "bSearchable": false }, { "sName": "firstName", "aTargets": [1] }, { "sName": "lastName", "aTargets": [2] }, { "sName": "org", "aTargets": [10] }, { "sName": "workPhone", "aTargets": [4] }, { "sName": "altPhone", "aTargets": [5], "bVisible": false, "bSearchable": false }, { "sName": "cellPhone", "aTargets": [6], "bVisible": false, "bSearchable": false }, { "sName": "email", "aTargets": [7] }, { "sName": "riderCoach", "aTargets": [8], "bVisible": false, "bSearchable": false }, { "s…
type: Question
tagged with: c#
tagged with: .net
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26351438
answer count: 1
has title: C#/Javascript datatable export to Excel and PDF
type: UnansweredQuestion

http://stackoverflow.com/a/26283375
has body: Try this: alert(JSON.stringify(contdata)); OR Use console.log(contdata); OR Use console.dir(contdata);
downvote count: 0
answers question: http://stackoverflow.com/q/26283298
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/26300366
downvote count: 0
answers question: http://stackoverflow.com/q/26285743
type: Answer
accepted answer of: http://stackoverflow.com/q/26285743
score: 1
upvote count: 1
has body: Unfortunately, you can't really do this, because php files aren't html or js files. If you did do it (and you should be able to by associating the .php extension with the html editor in Visual Studio's own options dialog), then ReSharper wouldn't parse the files correctly, because it wouldn't understand php syntax.
has comment: http://stackoverflow.com/comment/41284840
has comment: http://stackoverflow.com/comment/41285457
type: AcceptedAnswer

http://stackoverflow.com/q/26246798
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26247238
type: AnsweredQuestion
tagged with: image
has body: I have a grid of images and I'm planning on having them all fade random images in and out. I have the fading fine when it isn't in a grid using inline-block. But when I fade images in, the image that is fading in appears below the one fading out. What I want is the one fading in to be behind the one fading out, so there is a smooth transition. The easiest way to see what I mean is this fiddle: http://jsfiddle.net/5wkcsnv5/67/ Any ideas? Thanks JavaScript $('.fadein img:gt(0)').hide(); $(function () { var nImages = $(".fadein").children().length; var currentImage = 0; console.log(nImages); setInterval(function () { var randomnumber = Math.floor(Math.random() * nImages); randomnumber -= 1; if (currentImage == randomnumber) randomnumber = (randomnumber < nImages) ? randomnumber + 1 : 0; currentImage = randomnumber; $('.fadein img').fadeOut(1000); $('.fadein > img:eq(' + randomnumber + ')').fadeIn(1000); }, 3000); });
type: Question
has title: Fading in/out of images expands grid-view of images surrounding it
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26247238

http://stackoverflow.com/comment/41348858
comment on: http://stackoverflow.com/q/26343450
score: 0
has text: You could test 2 cases -- one when the user is logged in, and emulate a login before testing, and one case when the user is logged out, removing any local storage information.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41124555
has text: None of the reasons mentioned in that article really qualify here. Repeated `setTimeout`s are quite equivalent to `setInterval` - only one is simpler to use than the other.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26218940
type: AnswerComment

http://stackoverflow.com/a/26253862
accepted answer of: http://stackoverflow.com/q/26253085
answers question: http://stackoverflow.com/q/26253085
type: AcceptedAnswer
type: Answer
has body: After all the clarifications &amp; your acknowledgement of ~30 seconds of processing time being "normal" and "accepted". The likely reason is because your web server is flushing the output buffer. Some useful information: PHP php flush IIS Can I Flush the Buffer Early Using ASP.NET? Some background info: When users request a page, it can take anywhere from 200 to 500ms for the backend server to stitch together the HTML page. During this time, the browser is idle as it waits for the data to arrive. In PHP you have the function flush(). It allows you to send your partially ready HTML response to the browser so that the browser can start fetching components while your backend is busy with the rest of the HTML page. The benefit is mainly seen on busy backends or light frontends. Technically, it's better for your web server to flush them as soon as possible, firstly, you free up memory, secondly, the client (browser in this case) can start rendering with the chunks of data.
has comment: http://stackoverflow.com/comment/41188569
score: 0

http://stackoverflow.com/q/26233959
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26234285
upvote count: 4
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41147212
has title: Remove duplicates and merge JSON objects
has answer: http://stackoverflow.com/a/26234175
type: Question
has comment: http://stackoverflow.com/comment/41147363
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41147537
has comment: http://stackoverflow.com/comment/41147329
favorite count: 0
has comment: http://stackoverflow.com/comment/41147665
score: 4
has body: I have the following JSON object. I need to remove the duplicates and merge the inner object using plain Javascript. How do I go about doing this? [{ "id" : 1, "name" : "abc", "nodes" :[ { "nodeId" : 20, "nodeName" : "test1" } ] }, { "id" : 1, "name" : "abc", "nodes" :[ { "nodeId" : 21, "nodeName" : "test2" } ] }] Following is the object that I expect as output. [{ "id" : 1, "name" : "abc", "nodes" :[ { "nodeId" : 20, "nodeName" : "test1" }, { "nodeId" : 21, "nodeName" : "test2" }, ] }] Regards. Shreerang
answer count: 2
accepted answer: http://stackoverflow.com/a/26234175
possible better answer: http://stackoverflow.com/a/26234285
has comment: http://stackoverflow.com/comment/41147549

http://stackoverflow.com/a/26197322
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26197235
has comment: http://stackoverflow.com/comment/41079414
answers question: http://stackoverflow.com/q/26197235
has body: The example is using a mongoose model (User) that was defined elsewhere. Mongoose models have a findOne function. It's meant to mostly be filler to show how you would use the strategy to lookup info in the db to authenticate the user.
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41097467
upvote count: 2
has comment: http://stackoverflow.com/comment/41079450

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/26236687
tags question: http://stackoverflow.com/q/26280945
tag name: google-fusion-tables

http://stackoverflow.com/comment/41297047
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26315525
has text: fyi: I actually need to use `font.js` as I will further need to allow several webpages to use its original font.
score: 0

http://stackoverflow.com/q/26202905
has body: Is there any way to clean up the ng-* attributes after Angular initialization done and make HTML clean? And convert it to: I'm new with Angular and maybe my question is silly, but this attribute make DOM confusing and reduce readability.
score: 0
has title: Removing attributes after app initialized
has comment: http://stackoverflow.com/comment/41090431
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41091986
type: Question
tagged with: javascript

http://stackoverflow.com/a/26207213
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26207183
has body: Try this: setTimeout(function(){ rollDice() }, 6000)

http://stackoverflow.com/comment/41097585
type: QuestionComment
has text: Try with a `while` loop, or recursion. Or flatten the nested array.
score: 0
comment on: http://stackoverflow.com/q/26207218
type: Comment

http://stackoverflow.com/comment/41197948
comment on: http://stackoverflow.com/q/26261323
score: 0
type: Comment
type: QuestionComment
has text: @Diodeus but, [this blog post](http://arcadiamashups.blogspot.com/2009/10/get-selection-bookmarklet-pattern.html) looks like that isn't true. What am I missing?

http://stackoverflow.com/q/26307837
downvote count: 0
favorite count: 0
has title: angular check if item exists in scope (array) already
has comment: http://stackoverflow.com/comment/41283550
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41283460
type: UnansweredQuestion
score: 2
answer count: 0
upvote count: 2
has body: I'm trying to check if I have something in an array already before adding - so that I cannot add the same type more than once. I am checking the model of the drop down I am selecting from against the array I am storing everything in (there is a slight difference in that the model stores the id as id and the array as skillId). I am basically just trying to look through the array and see if the id matches - and if it does do not add the item to the array. Here is the code. $scope.saveSkill = function() { //send skill to get path, then add to skills array console.log($scope.pathArray); console.log($scope.scope5.id); var skillCheck = true; //check if exists aready for(i=0;i&lt;$scope.pathArray.length;i++){ if($scope.pathArray[i].skillId = $scope.scope5.id ){ console.log("Cannot add same skill more than once"); skillCheck = false; } } if(skillCheck){ $http({ method: 'GET', url: '/findPathScopeToSkill/' + $scope.scope5.id + "/1" }) .success(function(data){ angular.forEach(data.paths, function(index) { $scope.pathArray.push(index); }); }); } }; Just as a quick reference - pathArray is where the items get pushed into and where I do not want to have doubles - so I am checking the current id vs the id's inside the array (only difference is they are .skillId's) I can add one, then can't add the same one again BUT I also can't add any after that. Can't seem to figure out what I am doing wrong here. Any help would be greatly appreciated. Thanks!
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/26239304
tagged with: javascript
tagged with: jquery
has body: I have this code which prevents default behavior on all elements: $('body *').click(function(e){ e.stopPropagation(); e.preventDefault(); }); Now I would like to programmatically click a certain link in the page but first I have to remove the e.preventDefault(); so I used unbind: $('a')[0].unbind('click'); $('a')[0].click(); This doesn't work for me. What am I doing wrong?
score: 0
answer count: 1
tagged with: event-handling
has comment: http://stackoverflow.com/comment/41157571
has answer: http://stackoverflow.com/a/26239428
accepted answer: http://stackoverflow.com/a/26239428
has comment: http://stackoverflow.com/comment/41157473
has comment: http://stackoverflow.com/comment/41157637
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41157479
has comment: http://stackoverflow.com/comment/41157517
tagged with: preventdefault
type: Question
has title: Removing event.preventDefault on click doesn't work
has comment: http://stackoverflow.com/comment/41157557

http://stackoverflow.com/comment/41224161
comment on: http://stackoverflow.com/q/26275398
type: Comment
has text: @PeterBranforn I've tried this too as i used in else if check here but no luck.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41232306
has text: The disabled property causes a visual difference that lots of folks don't like. but the input objects also have a readonly property. The data can't be changed, and doesn't look different from an editable input object.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26276566

waveform
tag name: waveform
type: Tag
tags question: http://stackoverflow.com/q/26283665

http://stackoverflow.com/q/26311336
has title: Public KML file not found using "maps.google.com/maps?q=" or JS API v3
answer count: 0
score: 1
type: Question
has body: Edit Solved... Compressed file and uploaded as kmz file. to same path. Now shows correctly in http://maps.google.com/maps?q=http://sailingofftheedge.com/kml/testfile.kmz ----------Original Question-------------- Trying to set up a simple embedded map using API v3 and while the map itself displays fine, Google does not seem to be able to read the publicly available KML file needed for the overlay. sailingofftheedge.com/kml/testfile.kml (File size 290.4KB) https://maps.google.com/?q=http://sailingofftheedge.com/kml/testfile.kml Returns file not found. feedvalidator.org/ returns a few warnings about validation, but is able to access and parse the file. Suggestions?
has comment: http://stackoverflow.com/comment/41290453
tagged with: javascript
tagged with: kml
tagged with: google-maps-api-3
downvote count: 0
has comment: http://stackoverflow.com/comment/41293805
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/26269341
has answer: http://stackoverflow.com/a/26270851
downvote count: 1
has body: I need to render a angular directive, selecting it by appealing to a string previously defined at a variable (usually declared in the controller). Despite such a variable is accessible as an Angular expression, when I try to use for selecting a directive it doesn't work: Value of item: {{item.dir}} Here you should see additional text: Here's a plunker of the code: http://plnkr.co/edit/tM73sY3vTfPFHmn6iCYE?p=preview So, what I am missing? How do I achieve to get Angular using string interpolation when using a directive? Thanks!
favorite count: 0
has title: Angular expression selecting a directive
tagged with: angularjs
type: UnansweredQuestion
upvote count: 4
has comment: http://stackoverflow.com/comment/41214059
type: Question
score: 3
has answer: http://stackoverflow.com/a/26512099
tagged with: javascript
linked to: http://stackoverflow.com/q/18063280
answer count: 2

http://stackoverflow.com/comment/41100814
type: AnswerComment
type: Comment
has text: also, probably smarter to use `console.log` instead of `alert()` if you don't want to go crazy from the popups
score: 1
comment on: http://stackoverflow.com/a/26208969

http://stackoverflow.com/comment/41366222
type: Comment
has text: @EthernalHour The link to the question you gave solution holds php solution I don't want php because I am not using it, I want to do it with html and JS or Jquery. but thanks for the information you gave.
type: QuestionComment
comment on: http://stackoverflow.com/q/26353086
score: 0

http://stackoverflow.com/q/26267876
tagged with: class
score: 0
has comment: http://stackoverflow.com/comment/41210833
answer count: 1
has comment: http://stackoverflow.com/comment/41210519
has comment: http://stackoverflow.com/comment/41210642
has body: I have a class constructor called PortraitOrder(). In this constructor, I create a method called CalculateCost(). For some reason, when I make a call to that method later on in my code, nothing at all is returned. I'm not sure if it's a problem with the way I call it, the way I created it in PortraitOrder(), or the actual CalculateCost() method itself. Any and all advice/suggestions would be appreciated. Here is the PortraitOrder() class with the method declaration. function PortraitOrder(portrait, copies, size, buyer){ this.portrait = portrait; this.copies = copies; this.size = size; this.buyer = buyer; this.calculateCost = CalculateCost; } Here is the CalculateCost() method which I added just below PortraitOrder() function CalculateCost(){ this.size = size; this.copies = copies; var price = 0; if(size == "wallet"){ price = 10; } else if(size == "8x10"){ price = 10; } else if(size == "4x6"){ price = 10; } else if(size == "11x14"){ price = 30; } else{ price = 10; } var cost = price * copies; return cost; } Finally, here is the call I make to that method. portraits is the name of the instance of the class I created earlier on in my code. document.write("Order cost: " + portraits.calculateCost());
favorite count: 0
has comment: http://stackoverflow.com/comment/41210586
has answer: http://stackoverflow.com/a/26268016
accepted answer: http://stackoverflow.com/a/26268016
type: AnsweredQuestion
tagged with: call
has comment: http://stackoverflow.com/comment/41210597
upvote count: 1
tagged with: methods
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41210689
has title: Javascript call to class method CalculateCost() does not work correctly. Not returning any information
has comment: http://stackoverflow.com/comment/41210569
tagged with: javascript
has comment: http://stackoverflow.com/comment/41210640
has comment: http://stackoverflow.com/comment/41210612

http://stackoverflow.com/comment/41306689
has text: Nope, that doesn't work either... it only executes the change listener after I manually change the value, not after the value is changed programmatically
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26320683

http://stackoverflow.com/comment/41300582
score: 0
comment on: http://stackoverflow.com/q/26317205
has text: Yes, @mellamokb is correct (you should turn this comment into an answer), and this applies to about any general-purpose programming language. Arbitrary precision arithmetic must be done in software, because the hardware isn't designed to support it out of the box (IEE 754).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41241980
comment on: http://stackoverflow.com/q/26285023
has text: Use `$this.text();` to get exact text, html will return html formatted text. -- This is just an Off-topic help
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41365910
type: Comment
type: QuestionComment
score: 0
has text: so what your saying is I can only load my own local site pages. external pages are not supported or if I am wrong correct me plz.
comment on: http://stackoverflow.com/q/26353086

http://stackoverflow.com/a/26324448
has comment: http://stackoverflow.com/comment/136925013
score: 18
has body: Much better solution with ease effect via CSS. Take a look: http://jsfiddle.net/csdtesting/wbqq129q/ Before typing: While typing: Code: #login { font-size: 12px; margin: 0 auto; width: 700px; } #login li { float: left; list-style: none; margin-left: 30px; position: relative; } #login li:first-child { margin-left: 0; } label { line-height: 40px; position: absolute; right: 120px; top: 0; bottom: 0; -moz-transition: 0.3s right ease; -ms-transition: 0.3s right ease; -o-transition: 0.3s right ease; -webkit-transition: 0.3s right ease; transition: 0.3s right ease; z-index: 0 } input { color: transparent; font-size: 12px; height: 35px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-transition: 0.3s all ease; -ms-transition: 0.3s all ease; -o-transition: 0.3s all ease; -webkit-transition: 0.3s all ease; transition: 0.3s all ease; } input[type="email"], input[type="password"] { border: 1px solid #ccc; height: 35px; padding: 0 10px; width: 240px; position: relative; -moz-box-shadow: inset 0 0 10px rgba(0, 0, 0, .06); -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, .06); box-shadow: inset 0 0 10px rgba(0, 0, 0, .06); z-index: 2; } input[type="email"] { color: rgba(47, 130, 194, .8); } /* Placeholder */ input[type="email"]:-moz-placeholder { color: rgba(47, 130, 194, .6); } input[type="email"]:-ms-input-placeholder { color: rgba(47, 130, 194, .6); } input[type="email"]::-webkit-input-placeholder { color: rgba(47, 130, 194, .6); } /* Label */ input[type="email"] + label { color: rgb(47, 130, 194); } input:focus + label { right: 10px; } input[type="email"]:focus, input[type="password"]:focus { background-color: rgba(255, 255, 255, .8); } /* Submit */ input[type="submit"] { background-color: #333; background: -moz-linear-gradient(bottom, #333, #444); background: -ms-linear-gradient(bottom, #333, #444); background: -o-linear-gradient(bottom, #333, #444); background: -webkit-linear-gradient(bottom, #333, #444); background: linear-gradient(bottom, #333…
has comment: http://stackoverflow.com/comment/100559633
type: Answer
has comment: http://stackoverflow.com/comment/41313501
answers question: http://stackoverflow.com/q/26324252
downvote count: 3
upvote count: 21

http://stackoverflow.com/q/26306585
has body: I am trying to achieve a responsive layout in which there will be two rows, one column and three divs in that column. Example: ROW1: (DIV)(DIV)(DIV) ROW2: (DIV)(DIV)(DIV) In the first (DIV) there should be a text in &lt;p&gt; tags. Each of the latter (DIV)s have an image centered vertically and horizontally inside them. When there is no text in the first (DIV) then all (DIV)s work great. The whole layout reacts perfectly to screen size change and there are no problems. The problem is, when there IS text in the first (DIV) then it is pushed down, breaking the layout. I have no idea why inserting any text in the first (DIV) causes those problems. Could anybody help me out with this? Examples: (don't worry about missing images, it doesn't affect this problem) jsFiddle example (full-screen, here the layout is broken) jsFiddle example (non-fullscreen, emulating small screen size)
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26306728
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26306728
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Bootstrap 3 - First in a column breaks the layout if is inserted into it
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41151810
has text: @ohlec I am getting a blank white page
type: Comment
comment on: http://stackoverflow.com/q/26235187
type: QuestionComment
score: 0

http://stackoverflow.com/q/26209349
has comment: http://stackoverflow.com/comment/41127914
upvote count: 10
type: Question
has comment: http://stackoverflow.com/comment/41102601
tagged with: javascript
has comment: http://stackoverflow.com/comment/41102625
tagged with: soundcloud
has comment: http://stackoverflow.com/comment/41102615
answer count: 1
has comment: http://stackoverflow.com/comment/41123242
downvote count: 0
tagged with: jquery
favorite count: 0
has body: http://jsfiddle.net/gwz3rchj/76/ I am using this piece of code. No errors in the console. It's not loading the sound at all. $(document).ready(function() { SC.initialize({ client_id: "43e02302fc33adb2051f2391815f1828" }); $("#stream").on("click", function(){ SC.stream("/tracks/293", {autoPlay: true}); }); });
has title: Soundcloud API works on Firefox but not on Safari or Chrome
has comment: http://stackoverflow.com/comment/41239300
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41239240
has comment: http://stackoverflow.com/comment/41324954
score: 10
has comment: http://stackoverflow.com/comment/56739880
has answer: http://stackoverflow.com/a/26365975

http://stackoverflow.com/q/26247916
has body: the javascript code is here: var goat=6111+7380; var hen=5548+7476^goat; var seal=2094+4451^hen; var rat=1687+7000^seal; var pig=3997+8240^rat; And I want get the goat, hen seal variable and so on in the python. My python code is here: animals = 'var goat=6111+7380;var hen=5548+7476^goat;var seal=2094+4451^hen;var rat=1687+7000^seal;var pig=3997+8240^rat;' [eval(item.replace('var','').strip()) for item in animals.split(';')]####here is wrong because eval('goat=6111+7380') is wrong, so how can I make the goal is equal the 6111+7380? ps： thanks everyone. Actually I craw a website:http://pachong.org/ to get the proxy address and the port.But the port is generated by .And the pig variable is generated by ,but this javascript code change every time when I craw the index website.So I do not know how to get the port value. ###resultstring is something like this '(1646^hen)+19' def getport(resultstring): port = eval(resultstring) return port proxyurl= 'http://www.pachong.org/' try: r = requests.get(proxyurl,timeout=60*4) except: print 'I can not get the date of pachong.org' if r.status_code != 200: print 'the status is not good. status_code is %s' % r.status_code return ht = BeautifulSoup(r.content) animals = str(ht.head.find_all('script')[-1].text) [eval(item.replace('var','').strip()) for item in animals.split(';')]###it is wrong here table = ht.find_all('table', attrs={'class':'tb'}) if not table: return table = table[0] trs = table.find_all('tr',attrs={'data-type':'high'}) tr = trs[0] idlestring = tr.find_all('td')[5].text idlestring = idlestring.replace('\n','').replace(' ','') if idlestring == u'空闲': # proxy_id += 1 ip = tr.find_all('td')[1].text portstring = tr.find_all('td')[2].text patt = re.compile(u'document.write\((.*?)\);') if re.findall(patt,portstring): resultstring = re.findall(patt,portstring)[0] else: continue port = getport(resultstring) ip_port = '%s:%s' % (ip, port) print 'ip_port is %s' % ip_port
has comment: http://stackoverflow.com/comment/41175190
tagged with: javascript
has comment: http://stackoverflow.com/comment/41174047
score: 0
has comment: http://stackoverflow.com/comment/41174052
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41173957
has comment: http://stackoverflow.com/comment/41175006
favorite count: 0
has comment: http://stackoverflow.com/comment/41174988
has answer: http://stackoverflow.com/a/26247992
has title: how can I transfer the javascript code to python code?
tagged with: python
has comment: http://stackoverflow.com/comment/41174018
has comment: http://stackoverflow.com/comment/41173917
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/26311577
tagged with: node-webkit
answer count: 1
has comment: http://stackoverflow.com/comment/41290205
has comment: http://stackoverflow.com/comment/41290088
has answer: http://stackoverflow.com/a/26313829
upvote count: 37
has comment: http://stackoverflow.com/comment/41292251
downvote count: 0
accepted answer: http://stackoverflow.com/a/26313829
tagged with: javascript
has title: Node.js cannot require a .js file in the same directory
has comment: http://stackoverflow.com/comment/41290109
type: AnsweredQuestion
tagged with: node.js
favorite count: 0
type: Question
score: 37
has body: I have a node-webkit project with a main.js. At the very top, I have var updater = require("./updater.js"); and I have a file named updater.js in the same directory as main.js. When I run the app, I get the error Uncaught Error: Cannot find module './updater.js' updater.js has one line in it: module.exports = "Hello!"; I have no idea why it cannot require the file. I have seen another project do the same thing. I can require regular npm modules just fine from the same main.js.

http://stackoverflow.com/comment/41323453
score: 1
has text: In the options on the left, choose "No wrap - in / ". http://jsfiddle.net/33wLs160/
comment on: http://stackoverflow.com/q/26329761
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41257321
type: QuestionComment
has text: If You start tag in tag than also you have to close with in same tag.
score: 0
comment on: http://stackoverflow.com/q/26293366
type: Comment

http://stackoverflow.com/a/26352486
downvote count: 0
answers question: http://stackoverflow.com/q/26351853
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41365247
has comment: http://stackoverflow.com/comment/41434887
has body: I think this will give you the result you want: var objRow = [{ date: 2011-09-20, nums: [0, 100, 0], customerID: "C1101", ANI: 1234 }, { date: 2011-09-25, nums: [0, 0, 0], customerID: "C1101", ANI: 1234 }, { date: 2011-09-20, nums: [0, 500, 0], customerID: "C1102", ANI: 5678 }, { date: 2011-09-22, nums: [0, 0, 50], customerID: "C1102", ANI: 5678 }]; //CREATE CSV-FORMATTED STRINGS var csvLine = ""; var numsArray = new Array(); for (var i=0; i&lt;objRow.length; i++) { //check if this is the first element with a new 'ANI' (which means a new CSV line starts) if (objRow[i-1]==(undefined||null) || objRow[i].ANI!=objRow[i-1].ANI) { //if so, start a new string csvLine = objRow[i].ANI +", "+ objRow[i].customerID +", "; //add the 'ANI' and 'customerID' numsArray.length = 0; //clear array numsArray.push(objRow[i].nums); //store the 'nums' in a separate array } else { //if not, add to the existing string numsArray.push(objRow[i].nums); //store the 'nums' in a separate array } //check if this is the last element with the same 'ANI' (which means this CSV line is complete) if (objRow[i+1]==(undefined||null) || objRow[i].ANI!=objRow[i+1].ANI) { //add the 'nums' of every object in intertwining order (every 1st, every 2nd, etc.) for (var k=0; k&lt;numsArray[0].length; k++) { for (var j=0; j&lt;numsArray.length; j++) { csvLine += numsArray[j][k].toString() +", "; } } //remove the last comma if (csvLine.substring(csvLine.length-2) == ", ") { csvLine = csvLine.substring(0,csvLine.length-2); } //output the CSV line document.getElementById("csv").innerHTML += csvLine + "&lt;br /&gt;"; } } &lt;div id="csv"&gt;&lt;/div&gt; (fiddle: http://jsfiddle.net/5gyp3ce6/16/) I had to change your array a little bit, because for this to work, the array keys need to all be the same. Also, I had to change the ID's to strings, otherwise they couldn't be defined. Instead of writing it to the &lt;div&gt; at the end you can of course add the line to another variable of write it to file or whatever. If the co…

abide
type: Tag
tags question: http://stackoverflow.com/q/26254225
tag name: abide

http://stackoverflow.com/a/26217414
has body: I remember having issues with isolate scope - solution was to add anything that was in the isolate scope object into the directive HTML code itself, like so: .directive('widgetRecentEntries', function(){ return { restrict: "E", replace: true, scope: { recents: "=recents" }, templateUrl: "ngapp/js/tpl/widget-recent-entries.html" }; }) The directive HTML/template: {{item.name}}
has comment: http://stackoverflow.com/comment/41117066
answers question: http://stackoverflow.com/q/26217123
type: Answer
has comment: http://stackoverflow.com/comment/41116966
has comment: http://stackoverflow.com/comment/41116824
score: 0

http://stackoverflow.com/q/26205541
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41095345
linked to: http://stackoverflow.com/q/17394006
has answer: http://stackoverflow.com/a/26211293
type: Question
has comment: http://stackoverflow.com/comment/41126294
has comment: http://stackoverflow.com/comment/41116735
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41179392
score: 0
has comment: http://stackoverflow.com/comment/41161227
has title: D3js and specific datapoints shown as small circles
has body: I am using a line chart similar to http://bl.ocks.org/mbostock/3884955 and use it without too many problems. My chart is showing realtime score data of an audience (with each participant having his own line). Now, I also permit the participant to add a comment during the event they score. This event should show up as a small circles on the line. The admin overlooking the event will be able to get a tooltip with the comment. I tried to handle the line and the circles fully independant but run into troubles with color (line and circles do not have matching color) and the fact that I use the basis interpolation var line = d3.svg.line() .interpolate("basis") .x(function(d) { return x(d.time); }) .y(function(d) { return y(d.status); }); The circles which are on "true" x and y values hence get plotted outside of the curve (which is interpolated). So, I need to use a single data set looking like this data = [ {time: 1, score: 40}, {time: 2, score: 30}, ... {time: 345, score : 70, comment: great connection to the market data}, {time: 346, score : 70} .... ] Can anyone help please as I am lost with this one since 3 days now cheers Peter
tagged with: d3.js

http://stackoverflow.com/q/26297585
has title: PHP var->Javascript->PHP
tagged with: php
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26297853
has answer: http://stackoverflow.com/a/26297674
has comment: http://stackoverflow.com/comment/41265596
has answer: http://stackoverflow.com/a/26297616
type: Question
has comment: http://stackoverflow.com/comment/41264143
tagged with: javascript
has comment: http://stackoverflow.com/comment/41264286
has body: I'm working on a project that has the following problem: The database gives(via php) an array with a list of JavaScript files that need to be loaded. it is stored in the variable $array(php). I need to extract those source files with php(foreach loop) and load them via JavaScript. It is like this: document.write("&lt;?php foreach($js_files as $filename) {if( trim($filename) &lt;&gt; "" ){echo '&lt;script type=\'text/javascript\' src=$filename&gt;&lt;/script&gt; \n';}} ?&gt; "); The problem is that it loads a couple of files but goes wrong with the first one(a google api file). Does anyone have a sollution to this? Or any ideas in which direction i have to look.
answer count: 3

http://stackoverflow.com/a/26283331
answers question: http://stackoverflow.com/q/26282947
type: Answer
has body: You shouldn't use attributes width capital words. You can use this by jquery: html: onclick="..." jquery: $(document).ready(function(){ $("#move_2").css("background" , "yourAddress"); });
score: 0

http://stackoverflow.com/q/26297988
tagged with: database
type: Question
has title: How to get value from span and put it into variable using php
tagged with: javascript
has answer: http://stackoverflow.com/a/26298019
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41264973
has answer: http://stackoverflow.com/a/26298159
has comment: http://stackoverflow.com/comment/51483458
has answer: http://stackoverflow.com/a/26298073
type: UnansweredQuestion
tagged with: php
has body: OK , This is my Html code : And this is my Java Script code : Now span have a value , I want to get this value from Span and put it into variable then insert it into Database but i don't know how to get value from span .
linked to: http://stackoverflow.com/q/17732563

http://stackoverflow.com/comment/41160344
type: Comment
comment on: http://stackoverflow.com/a/26231583
has text: I tried to run alert(ac) after the last line, it return NaN, but if I run alert within the for loop its work.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41207582
type: AnswerComment
comment on: http://stackoverflow.com/a/26249732
score: 0
type: Comment
has text: You right and I used this solution as a matter of fact. For the community I though those would be two different topics and that's why I created the new question. Double thanks to you. Voting up.

http://stackoverflow.com/comment/41126287
score: 0
type: Comment
type: QuestionComment
has text: Yeah of course, but what field in the session do I check and how? Do I have to check for nullity?
comment on: http://stackoverflow.com/q/26222305

http://stackoverflow.com/q/26226583
tagged with: meteor
tagged with: stripe-payments
favorite count: 0
score: 51
has answer: http://stackoverflow.com/a/26226668
possible better answer: http://stackoverflow.com/a/27914544
has title: Meteor: Proper use of Meteor.wrapAsync on server
accepted answer: http://stackoverflow.com/a/26226668
answer count: 4
has body: Background I'm trying to integrate stripe payments into my site. I need to create a stripe user using my private stripe key. I'm storing this key on my server, and calling a server method to create the user. Maybe there's another way of accomplishing this? Here's the stripe api (copied below for convenience): https://stripe.com/docs/api/node#create_customer //stripe api call var Stripe = StripeAPI('my_secret_key'); Stripe.customers.create({ description: 'Customer for test@example.com', card: "foobar" // obtained with Stripe.js }, function(err, customer) { // asynchronously called }); My attempts and results I've been using the same client code with different server code. All attempts immediately give undefined on the client's console.log(...) but give the proper response on the server console.log(...): //client Meteor.call('stripeCreateUser', options, function(err, result) { console.log(err, result); }); //server attempt 1 var Stripe = StripeAPI('my_secret_key'); Meteor.methods({ stripeCreateUser: function(options) { return Meteor.wrapAsync(Stripe.customers.create({ description: 'Woot! A new customer!', card: options.ccToken, plan: options.pricingPlan }, function (err, res) { console.log(res, err); return (res || err); })); } }); //server attempt 2 var Stripe = StripeAPI('my_secret_key'); Meteor.methods({ stripeCreateUser: function(options) { return Meteor.wrapAsync(Stripe.customers.create({ description: 'Woot! A new customer!', card: options.ccToken, plan: options.pricingPlan })); } }); I've also tried both without Meteor.wrapAsync. EDIT - I'm also using this package: https://atmospherejs.com/mrgalaxy/stripe
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33442013
type: Question
has answer: http://stackoverflow.com/a/29602309
has answer: http://stackoverflow.com/a/27914544
tagged with: javascript
has comment: http://stackoverflow.com/comment/48751354
upvote count: 51
downvote count: 0

linkedin-api
tags question: http://stackoverflow.com/q/26244829
tags question: http://stackoverflow.com/q/26251870
tag name: linkedin-api
tags question: http://stackoverflow.com/q/26262541
tags question: http://stackoverflow.com/q/26302227
type: Tag
tags question: http://stackoverflow.com/q/26341696

http://stackoverflow.com/comment/41079679
type: Comment
comment on: http://stackoverflow.com/a/26197236
type: AnswerComment
has text: i used http://jsonviewer.stack.hu/ to format .i didnt change anything.Uncomment the console.log to see the objects you will understand
score: 0

http://stackoverflow.com/comment/41255884
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26292877
has text: Sorry this should fix it `$scope.packageElement.Data.push(npackageElement);`
score: 0

http://stackoverflow.com/comment/104451156
has text: Make sense. I need test if work without JSON.stringify. I think that just `JSON.parse(@Html.Raw(Json.Encode(@Model.CollegeInformationlist)))` should work. Someone can test and let us know. But now I use that way and work to me.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/49698444
type: AnswerComment

http://stackoverflow.com/q/26286518
has comment: http://stackoverflow.com/comment/41245832
has title: JavaScript Date Format for ColdFusion Date Field
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41421653
has comment: http://stackoverflow.com/comment/41245036
score: 1
has comment: http://stackoverflow.com/comment/41423985
accepted answer: http://stackoverflow.com/a/26382742
tagged with: date
type: Question
has comment: http://stackoverflow.com/comment/41275189
has comment: http://stackoverflow.com/comment/41245953
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41406469
has comment: http://stackoverflow.com/comment/41246865
favorite count: 0
has comment: http://stackoverflow.com/comment/41246369
has body: Is it possible to add something to this function that will set up the date format and require the user to enter MM/DD/YYYY? MASK is not working.. Fee Calculator Function: function getDatePrice() { var datePrice = 0; var theForm = document.forms.form; var purchasedate = theForm.elements.purchasedate; var date = new Date(purchasedate.value); if (Object.prototype.toString.call(date) !== '[object Date]') { date = new Date(); } var today = new Date(); var diffMilli = today - date; var diffDays = Math.floor(diffMilli / 1000 / 60 / 60 / 24); // ..Divide! if (diffDays &gt; 30) { datePrice = 20; } else { datePrice= 0; } return datePrice; } Calling Function: function calculateTotal() { var titleFees = getDatePrice(); var divobj = document.getElementById('totalPrice'); divobj.style.display='block'; divobj.innerHTML = "Estimated Transfer Fees $"+titleFees; } Input Button: (Requiring ColdFusion): &lt;cfinput type="datefield" name="purchasedate" width="130" required="yes" message="Please enter purchase date." value="#dateformat(now(),"mm/dd/yyyy")#" oninput="calculateTotal();" &gt;
has comment: http://stackoverflow.com/comment/41267358
linked to: http://stackoverflow.com/q/26369531
has answer: http://stackoverflow.com/a/26382742
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/41246247
has comment: http://stackoverflow.com/comment/41343393
has comment: http://stackoverflow.com/comment/41277458
has comment: http://stackoverflow.com/comment/41381603
has comment: http://stackoverflow.com/comment/41245943
has comment: http://stackoverflow.com/comment/41248686
upvote count: 1
has comment: http://stackoverflow.com/comment/41423391

http://stackoverflow.com/comment/41278417
type: Comment
has text: When I manually change this to `address = "http://google.com` it doesn't return anything.
comment on: http://stackoverflow.com/a/26304699
score: 0
type: AnswerComment

http://stackoverflow.com/q/26249018
has comment: http://stackoverflow.com/comment/41212880
has comment: http://stackoverflow.com/comment/41181712
tagged with: three.js
upvote count: 3
has title: Three.js - Getting the X, Y, and Z coordinates of mouse click
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26252407
score: 3
has body: I'm using version 68 of three.js. I would like to click somewhere and get the X, Y, and Z coordinates. I followed the steps here, but they give me a Z value of 0: Mouse / Canvas X, Y to Three.js World X, Y, Z Basically, if I have a mesh in the scene, and I click in the middle of it, I'm hoping to be able to calculate the same values as the position of that mesh. This is just an example. I know I could use raycasting and see if I collided with a mesh and then just check its position. However, I want this to work even if I didn't click a mesh. Is this possible? Here is a jsfiddle: http://jsfiddle.net/j9ydgyL3/ In that jsfiddle, if I could manage to click in the center of that square, I'm hoping to calculate 10, 10, 10 for the X, Y, and Z values respectively because those are the coordinates of the square's position. Here are the two functions of concern: function getMousePosition(clientX, clientY) { var mouse2D = new THREE.Vector3(); var mouse3D = new THREE.Vector3(); mouse2D.x = (clientX / window.innerWidth) * 2 - 1; mouse2D.y = -(clientY / window.innerHeight) * 2 + 1; mouse2D.z = 0.5; mouse3D = projector.unprojectVector(mouse2D.clone(), camera); return mouse3D; //var vector = new THREE.Vector3( //( clientX / window.innerWidth ) * 2 - 1, //- ( clientY / window.innerHeight ) * 2 + 1, //0.5 ); //projector.unprojectVector( vector, camera ); //var dir = vector.sub( camera.position ).normalize(); //var distance = - camera.position.z / dir.z; //var pos = camera.position.clone().add( dir.multiplyScalar( distance ) ); //return pos; } function onDocumentMouseUp(event) { event.preventDefault(); var mouse3D = getMousePosition(event.clientX, event.clientY); console.log(mouse3D.x + ' ' + mouse3D.y + ' ' + mouse3D.z); } I left some of the other code I tried commented out. Please note that this commented-out code didn't work in the jsfiddle website, maybe because they're still using version 54 of three.js. It works fine on my machine with version 68. Edit: To clarify, I would like …
tagged with: javascript
type: Question
linked to: http://stackoverflow.com/q/13055214
tagged with: mouse-coordinates
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/26218991
score: 1
has body: This is not only to do with a differing protocol (HTTP on your site vs HTTPS on accounts.google.com), it is also because the domain does not match (and port for that matter), a restriction imposed by the Same Origin Policy. This policy stops www.evil.com from loading a site such as www.bank.com inside a frameset (or popup window if framing is disabled) and then accessing the DOM. If the DOM could be accessed, this would be a massive security risk as any website could read your private data on another site. It is possible to allow access by implementing a CORS policy and outputting server side headers to allow other specified domains to read content, however this would be on Google's side in your case. So unless https://accounts.google.com implements a CORS policy, you will not be able to make a client-side variation of the server side flow. Another barrier is that even if CORS was implemented it does not allow access to the DOM. However, you'd be able to retrieve content from another domain, protocol or port via AJAX calls. The target site would also have to output the Access-Control-Allow-Credentials: true header in order for authentication credentials (i.e. cookies in this case) to be sent with the request and the response read by your domain. Can I use https for local development? To answer your original question, the answer is yes. This can be a self-signed certificate for most purposes and it will not affect this particular error message in your browser (as you, as the browser user has chosen to accept and trust the certificate).
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26215169
upvote count: 1

http://stackoverflow.com/q/26347333
tagged with: javascript
tagged with: jquery
has title: Partial View Checkbox's not working inside Normal View
tagged with: partial-views
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26347376
has body: I have a partial view that pops up on button click. The partial view displays fine but when i try to click the form check boxes they do not display checked. I am not sure what's going on but it seems like the check box event never gets fired or something along those lines. I have tried using loading the partial view using the jquery load function but I cannot seem to get it to load. So instead I am using the AJAX call and inserting the data into a div on the normal view. Here is my partial view: @model EmployeeMaster.Models.EmployeeAsset @using (Html.BeginForm()) { @Html.AntiForgeryToken() Item Yes/No Item Yes/No Item Yes/No @Html.Label("Cellular Telephone : ") @Html.CheckBoxFor(model => model.CellPhone) @Html.Label("Mileage Log : ") @Html.CheckBoxFor(model => model.MileageLog) @Html.Label("Travel Expense Reports : ") @Html.CheckBoxFor(model => model.TravelExpenseReports) @Html.Label("Computer : ") @Html.CheckBoxFor(model => model.Computer) @Html.Label("Pager : ") @Html.CheckBoxFor(model => model.Pager) @Html.Label("Uniforms : ") @Html.CheckBoxFor(model => model.Uniforms) @Html.Label("Customer Database : ") @Html.CheckBoxFor(model => model.CustomerDatabase) @Html.Label("PhoneCard : ") @Html.CheckBoxFor(model => model.PhoneCard) @Html.Label("Vehicle : ") @Html.CheckBoxFor(model => model.Vehicle) @Html.Label("Gas Card : ") @Html.CheckBoxFor(model => model.GasCard) @Html.Label("Security Card : ") @Html.CheckBoxFor(model => model.SecurityCard) @Html.Label("Co Credit Card : ") @Html.CheckBoxFor(model => model.CoCreditCard) @Html.Label("Keys : ") @Html.CheckBoxFor(model => model.Keys) @Html.Label("Tools : ") @Html.CheckBoxFor(model => model.Tools) @Html.Label("Other PPG Property : ") @Html.CheckBoxFor(model => model.OtherPPGProperty) } This is my jquery I use on my normal view to call the partial view: Here is my div I use to store the partial view: Here is a screen shot:
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26347376
type: Question
tagged with: asp.net-mvc

http://stackoverflow.com/a/26221861
has comment: http://stackoverflow.com/comment/41125701
has comment: http://stackoverflow.com/comment/41125593
answers question: http://stackoverflow.com/q/26221784
upvote count: 1
has comment: http://stackoverflow.com/comment/41125497
has comment: http://stackoverflow.com/comment/41125825
downvote count: 0
score: 1
type: Answer
has body: You should try this: // save to localStorage localStorage.myData = angular.toJson(data); // retrieve from localStorage var data = angular.fromJson(localStorage.myData); Let me know if this works.

http://stackoverflow.com/comment/109053134
comment on: http://stackoverflow.com/a/26286902
score: 0
has text: With this approach, you always get the newest value, if I am reading the code correctly. This is pretty cool when you want only yhe newest value, it works the other way around comparing it to the debounce value of `ng-model-options` and if this works for your use case, this is a valid option. Although, as I recall, `ng-model-options` also has a delay option doing this for you!
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26347063
tagged with: jquery
has answer: http://stackoverflow.com/a/26347389
favorite count: 0
has body: ... How to select all elements with "table" and an ID > 4.
has answer: http://stackoverflow.com/a/26347438
has comment: http://stackoverflow.com/comment/41355356
has answer: http://stackoverflow.com/a/26347255
has comment: http://stackoverflow.com/comment/41355326
has comment: http://stackoverflow.com/comment/41355278
has title: Get all elements with id above 4 (ID is combined by string and number )
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41355415
has answer: http://stackoverflow.com/a/26347652
downvote count: 1
has answer: http://stackoverflow.com/a/26347204
has answer: http://stackoverflow.com/a/26347179
score: 1
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/26347984
has answer: http://stackoverflow.com/a/26347253
tagged with: javascript

image
tags question: http://stackoverflow.com/q/26330267
tags question: http://stackoverflow.com/q/26283789
tags question: http://stackoverflow.com/q/26304561
tags question: http://stackoverflow.com/q/26202736
tags question: http://stackoverflow.com/q/26211437
tags question: http://stackoverflow.com/q/26246798
tags question: http://stackoverflow.com/q/26332862
tags question: http://stackoverflow.com/q/26339782
tags question: http://stackoverflow.com/q/26210119
tags question: http://stackoverflow.com/q/26280184
tags question: http://stackoverflow.com/q/26332382
tags question: http://stackoverflow.com/q/26335928
tags question: http://stackoverflow.com/q/26262502
tags question: http://stackoverflow.com/q/26199852
tags question: http://stackoverflow.com/q/26248384
tags question: http://stackoverflow.com/q/26305891
tags question: http://stackoverflow.com/q/26274711
tags question: http://stackoverflow.com/q/26267925
tags question: http://stackoverflow.com/q/26296489
tags question: http://stackoverflow.com/q/26324035
tags question: http://stackoverflow.com/q/26214664
tags question: http://stackoverflow.com/q/26328615
tags question: http://stackoverflow.com/q/26350068
tags question: http://stackoverflow.com/q/26308815
tags question: http://stackoverflow.com/q/26274513
tags question: http://stackoverflow.com/q/26329897
tag name: image
tags question: http://stackoverflow.com/q/26200787
tags question: http://stackoverflow.com/q/26352974
type: Tag
tags question: http://stackoverflow.com/q/26322783
tags question: http://stackoverflow.com/q/26267393
tags question: http://stackoverflow.com/q/26261720

http://stackoverflow.com/q/26232069
has title: CkEditor toolbar group options to dropdown
score: 4
type: Question
has comment: http://stackoverflow.com/comment/53088301
tagged with: javascript
tagged with: ckeditor
upvote count: 4
tagged with: toolbar
answer count: 1
downvote count: 0
tagged with: drop-down-menu
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32641864
has body: I have a question about grouping some CkEditor toolbar options to dropdown menu. For example, if I add this option ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] to toolbar, I get 4 buttons. Since I think this is a waste od space in toolbar, I would like to put all 4 options to dropdown - that only 1 (selected) would be visible. Is that even possible? I found this solution CKEDITOR.replace( 'editor', { plugins: 'wysiwygarea,sourcearea,basicstyles,toolbar,menu,menubutton,justify', on: { pluginsLoaded: function() { var editor = this, items = {}; editor.addMenuGroup( 'some_group' ); items.justifyleft = { label: editor.lang.justify.left, group: 'some_group', command: 'justifyleft', order: 1 }; items.justifyright = { label: editor.lang.justify.right, group: 'some_group', command: 'justifyright', order: 2 }; editor.addMenuItems( items ); editor.ui.add( 'Groupped', CKEDITOR.UI_MENUBUTTON, { label: 'Groupped justify', // Disable in source mode. modes: { wysiwyg: 1 }, icon: 'JustifyLeft', onMenu: function() { var active = {}; // Make all items active. for ( var p in items ) active[ p ] = CKEDITOR.TRISTATE_OFF; return active; } } ); } } } ); on http://jsfiddle.net/oleq/vmYCF/, but as you can see, now I have both options - 4 buttons + drop down, so that is not acceptable for me. And also in that case, I cannot set other toolbars ( and I don't know why not). Thanks for any help Best Regards

http://stackoverflow.com/q/26218454
has title: Weird AdMob javascript errors over wifi after 1-2 minutes
type: UnansweredQuestion
tagged with: android
has body: My problem is when I'm using wifi and I'm trying to load ads on Android app i get some javascript errors (scroll down a bit for log). If i haven't used my tablet for about some hours and connect to wifi i can see the ads for 1-2 minutes, then the error will show up once again. If my friend creates wifi with his 3g connection ads are just fine. Can anyone help me out? Its just with my tablet device DEVICE INFO build.board: EBM7000NBD build.bootloader: unknown build.brand: MID build.cpu_abi: armeabi-v7a build.cpu_abi2: armeabi build.device: EBM7000NBD build.display: V1.0.5.JRO03C.user.root.20131223 build.fingerprint: MID/EBM7000NBD/EBM7000NBD:4.1.1/JRO03C/eng.root.20131223.104152:user/release-keys build.hardware: amlogic build.host: xn-desktop build.id: JRO03C build.manufacturer: YIFANG build.model: NX007HD8G build.product: EBM7000NBD build.radio: unknown build.serial: unknown build.tags: release-keys build.time: 1387766643000 build.type: user build.user: root version.codename: REL version.incremental: eng.root.20131223.104152 version.release: 4.1.1 version.sdk_int: 16 LOGCAT 10-06 17:00:14.411 I/Ads (7302): Starting ad request. 10-06 17:00:14.411 I/Ads (7302): Use AdRequest.Builder.addTestDevice("63EDFD38B0AC9B029479F0456399E7C9") to get test ads on this device. 10-06 17:00:14.671 E/Ads (3742): JS: &lt;error&gt; (https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.js:111) 10-06 17:00:14.671 E/Web Console(3742): &lt;error&gt; at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.js:111 10-06 17:00:14.681 E/Ads (3742): JS: &lt;error&gt; (null:1) 10-06 17:00:14.681 E/Web Console(3742): &lt;error&gt; at null:1 10-06 17:00:15.061 D/dalvikvm(7302): GC_CONCURRENT freed 314K, 54% free 7081K/15367K, paused 11ms+4ms, total 41ms 10-06 17:00:15.331 I/wpa_supplicant(3902): [CTRL_IFACE]wlan0: SIGNAL_POLL 10-06 17:00:18.341 I/wpa_supplicant(3902): [CTRL_IFACE]wlan0: SIGNAL_POLL 10-06 17:00:18.831 W/ActivityManager(3425): Activity des…
has comment: http://stackoverflow.com/comment/41123638
tagged with: admob
type: Question
has comment: http://stackoverflow.com/comment/41123996
has comment: http://stackoverflow.com/comment/41118698
tagged with: javascript
has answer: http://stackoverflow.com/a/26221458
score: 0
tagged with: 3g
answer count: 1
tagged with: wifi

http://stackoverflow.com/a/26248138
has body: You would need to inject $stateParams service in your controller and grab action as its property. Example:- .controller('AdminController', ['$scope', '$stateParams', '$log', function($scope, $stateParams, $log){ $log.debug('action', $stateParams.action ); }])
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26248110
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26248110

input
tags question: http://stackoverflow.com/q/26206331
tags question: http://stackoverflow.com/q/26211337
tags question: http://stackoverflow.com/q/26198845
tags question: http://stackoverflow.com/q/26256097
tags question: http://stackoverflow.com/q/26304803
tags question: http://stackoverflow.com/q/26205691
tags question: http://stackoverflow.com/q/26266618
tags question: http://stackoverflow.com/q/26207337
tags question: http://stackoverflow.com/q/26257318
tags question: http://stackoverflow.com/q/26351135
tags question: http://stackoverflow.com/q/26306689
tags question: http://stackoverflow.com/q/26253700
tags question: http://stackoverflow.com/q/26229189
tag name: input
tags question: http://stackoverflow.com/q/26238703
type: Tag
tags question: http://stackoverflow.com/q/26308704

http://stackoverflow.com/comment/41201833
has text: @Wes I understand your situation and I don't mean to attack you, but you have to know that what you're being asked to do is unethical. If your boss asked you to implement a flight control system for a helicopter, would you do that if you didn't know anything about how helicopters work?
comment on: http://stackoverflow.com/q/26263182
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41356324
type: Comment
has text: but the $xx is replaced also even outside alert()
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26347630

http://stackoverflow.com/q/26253211
has comment: http://stackoverflow.com/comment/41183148
accepted answer: http://stackoverflow.com/a/26253256
has answer: http://stackoverflow.com/a/26253349
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26253349
upvote count: 1
tagged with: dom
downvote count: 1
type: Question
answer count: 2
has body: On this simple to-do list how do i stop the program from still creating a new paragraph when there is nothing in the text field. When Add To List is blank, i want the function to only output the alert, nothing else. I've tried many things but nothing has worked. Any help is greatly appreciated. Thanks! JS Fiddle = http://jsfiddle.net/Renay/g79ssyqv/20/ &lt;p id="addTask"&gt; &lt;b&gt;&lt;u&gt; To-Do List &lt;/u&gt; &lt;/b&gt; &lt;/p&gt; &lt;input type='text' id='inputTask'/&gt; &lt;input type='button' onclick='addText()' value='Add To List'/&gt; function addText(){ var input = document.getElementById('inputTask').value; var node=document.createElement("p"); var textnode=document.createTextNode(input) node.appendChild(textnode); document.getElementById('addTask').appendChild(node); var removeTask = document.createElement('input'); removeTask.setAttribute('type', 'button'); removeTask.setAttribute("value", "Remove"); removeTask.setAttribute("id", "removeButton"); removeTask.addEventListener('click', function() { node.parentNode.removeChild(node); }, false) node.appendChild(removeTask); if (input == "") { alert('Please add an entry'); } }
tagged with: javascript
has answer: http://stackoverflow.com/a/26253256
score: 0
has title: How to stop an event happening in Javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/41193703
type: AnswerComment
score: 0
has text: Thank you, but I need for it to run in the browser specifically and bigint requires libgmp
type: Comment
comment on: http://stackoverflow.com/a/26259254

http://stackoverflow.com/q/26288367
tagged with: angularjs
has answer: http://stackoverflow.com/a/27296661
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26288458
has comment: http://stackoverflow.com/comment/43057318
answer count: 4
has answer: http://stackoverflow.com/a/26288812
has title: Does jshint understand Angular?
downvote count: 0
score: 24
has answer: http://stackoverflow.com/a/26321623
tagged with: jshint
has comment: http://stackoverflow.com/comment/41248702
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41248396
has body: jshint is throwing an error when defining an angular module (or directive, or factory) as recommended by the Angular style guides (by John Papa or Todd Motto). For example, for a controller like this: (function () { 'use strict'; angular .module('myApp') .controller('myAppCtrl', theController); function theController() {...} })(); ... jshint throws this error: 'theController' was used before it was defined. The angular app works perfectly despite these errors. However I don't know why jshint protests... What am I missing? I wonder if jshint is a good evaluator of the quality of the angular code (despite it is included with popular packages as generator-angular) or it's me that I am doing something wrong (although my app works). Thanks in advance!
upvote count: 24
favorite count: 0
has comment: http://stackoverflow.com/comment/41248225
has comment: http://stackoverflow.com/comment/41248243

http://stackoverflow.com/q/26313143
tagged with: google-chrome
type: Question
has title: How to check if there is a new version of google chrome extension
has comment: http://stackoverflow.com/comment/41293266
has answer: http://stackoverflow.com/a/27906583
score: 0
answer count: 1
tagged with: javascript
has body: I have a google chrome extension and i want to check every X minutes if there is a new version. And if there is a new version i want to update the extension automatically. Thanks!
type: UnansweredQuestion

http://stackoverflow.com/comment/41188335
score: 0
comment on: http://stackoverflow.com/q/26256348
type: QuestionComment
type: Comment
has text: Not even promises allow you to return the value - it still would be asynchronous. You could return a *promise for the value*, though.

http://stackoverflow.com/q/26324097
linked to: http://stackoverflow.com/q/9054870
has comment: http://stackoverflow.com/comment/41315395
type: Question
has comment: http://stackoverflow.com/comment/41315357
answer count: 2
has comment: http://stackoverflow.com/comment/41312801
has comment: http://stackoverflow.com/comment/41313768
tagged with: javascript
has title: Can I retrieve the function that is running in an interval?
has body: A setInterval runs an anonymous function. Given the interval id, can I retrieve the function body? For those curious, I wrote a semi complex function directly in the browser console, and started an interval. I lost the console history because I closed the Firefox inspector, and would like to save myself the effort of rewriting the function. Pressing "Up", no longer brings back my previous entries.
score: 0
has comment: http://stackoverflow.com/comment/41314308
has comment: http://stackoverflow.com/comment/41312877
has answer: http://stackoverflow.com/a/26325602
has comment: http://stackoverflow.com/comment/41313810
has comment: http://stackoverflow.com/comment/41313631
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13852457
has comment: http://stackoverflow.com/comment/41312849
has answer: http://stackoverflow.com/a/26324682
has comment: http://stackoverflow.com/comment/41312925
has comment: http://stackoverflow.com/comment/41312839

http://stackoverflow.com/q/26251212
has answer: http://stackoverflow.com/a/26251390
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26251390
has title: Dynamically Creating repeated textbox and textbox groups fails in AngularJS
score: 0
answer count: 1
tagged with: angularjs
has body: MY code is like this remove New Item Submit {{prdElement}} function questionCtrl($scope){ var counter=0; $scope.palletElement = [{ name: 'Pallet 1', children: [{ name: '11', }, { name: '12', }] }, { name: 'Pallet 2', children: [{ name: '21' }, { name: '22' }] }] $scope.newPrdItem = function ($event) { counter++; $scope.prdElement.children.push({ id: counter, name: ''}); $event.preventDefault(); } $scope.showitems = function($event){ $('#displayitems').css('visibility','none'); } } JSFiddle all looks okay to me but adding and removing elements functionality is not working

http://stackoverflow.com/comment/41358399
has text: You may be losing the scope of your interval ( t ) in the top is defined inside of a function, getNewPosts, if so you will see your intervals will start to stack up and send multiple requests every second. first one, then 2 then 3 because its not clearing them out.
score: 0
comment on: http://stackoverflow.com/q/26233127
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26315445
has body: You could rig up something like this: var logLevels = [ "trace", "debug", "info", "warn", "error" ]; var logger = logLevels.reduce(function(logger, level) { logger[level] = function(msg) { console.log("[" + level + "] " + msg); }; return logger; }, {}); That iterates through the list of (made-up of course) log levels, adding a function for each. The function relies on the closure created around the .reduce() callback. Each function behaves according to the logger property with which it's associated, but it's not intrinsically bound up that way.
score: 3
accepted answer of: http://stackoverflow.com/q/26315308
answers question: http://stackoverflow.com/q/26315308
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/comment/41337288
type: Comment
has text: You should: Declare getData function on controller's $scope, thus making it available in your test.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26312738

http://stackoverflow.com/comment/41333869
type: Comment
has text: It could be a lot of things. Try expanding your devtools to the fullscreen, then use mouse to select a part of the timeline. A list with all the event for that period will show up below. Isolate those that take the most time and see if there's something you can do to optimize them.
score: 0
comment on: http://stackoverflow.com/a/26326516
type: AnswerComment

http://stackoverflow.com/q/26214181
type: Question
score: 0
answer count: 1
tagged with: javascript
has body: After your get your response from getLoginStatus, is the idea to then call FB.login? Currently when I do that, the code stops. Here's the code for when they hit the FB button to login, which correctly gives me the response... function facebookConnectBtnLogin() { FB.getLoginStatus(function(response) { CL(); if (response.status === 'connected') { logFacebookUserIn(response); } else if (response.status === 'not_authorized') { // alert('not_authorized...'); facebookLoginInit(); } else { //alert('not logged into Facebook...'); facebookLoginInit(); } },true); } And the code that deals with FB.login, which alerts 'here4', but not 'here5'... function facebookLoginInit() { alert('here4'); FB.login ( function(response) { alert('here5'); CL(); if(response.authResponse) { alert('here6'); logFacebookUserIn(response); } else alert('not connected'); }, { scope: "email" } ); } Do I have the right idea? Thanks for your time and help.
accepted answer: http://stackoverflow.com/a/26214226
tagged with: facebook
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26214226
has title: What to do after getting 'not_authorized' back from Facebook Connect login

http://stackoverflow.com/a/26278079
has body: JQuery Approach you may find great use looking at this JSFiddle that uses a nice toggle effect. the JQuery is: jQuery(document).ready(function(){ jQuery('#hideshow').live('click', function(event) { jQuery('#content').toggle('show'); }); }); I'm pretty sure you could make use of this in your project :) Javascript Approach Have a look at this one - it's not using JQuery and should be suitable for you :) It was found here: Another Approach this demo is also another way of showing/hiding the div on press., so there's pleanty of options to choose from! :)
answers question: http://stackoverflow.com/q/26277262
downvote count: 0
has comment: http://stackoverflow.com/comment/41231378
type: Answer
has comment: http://stackoverflow.com/comment/41228584
score: 2
upvote count: 2

http://stackoverflow.com/comment/41075589
comment on: http://stackoverflow.com/a/26195081
type: AnswerComment
has text: It is just because you are making cross domain Ajax request. If you want to test in fiddle just change the URL to /echo/html and pass html data in data parameters like {html:' test '}
score: 0
type: Comment

http://stackoverflow.com/q/26279971
tagged with: jquery
has body: I have successfully mapped a boolean variable to my localstorage variables which is triggered by a checkbox on my options.html page for my Chrome extension. What I want know is what the best way to show/hide an element based on whether that checkbox is checked in options on my popup.html (browser button event.) The following jQuery $("#myElement").hide(); does not work - nor would I expect it to... but I'm sort of at a loss as the best way to control displaying those elements to the end user. Note: display: none for CSS is an option too - I just don't know the best way to go about this. var value = localStorage["myCheckbox"]; alert(localStorage.getItem('store.settings.myCheckbox')); if (value != null) alert(value);//this works (true if checked, false if not checked...) if (!value){ alert('hide the element'); $("#myElement").hide(); //hide a div element in my popup (chrome extension button popup) }
possible better answer: http://stackoverflow.com/a/26283803
has answer: http://stackoverflow.com/a/26283803
has comment: http://stackoverflow.com/comment/41236934
tagged with: google-chrome-extension
has title: Why is my localStorage checkbox/boolean value comparison not working for my Google Chrome Extension?
downvote count: 0
has comment: http://stackoverflow.com/comment/41236987
favorite count: 0
accepted answer: http://stackoverflow.com/a/26280957
upvote count: 1
tagged with: local-storage
tagged with: css
has comment: http://stackoverflow.com/comment/41239760
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41238903
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26280957
has comment: http://stackoverflow.com/comment/41234850
tagged with: javascript

http://stackoverflow.com/comment/111537589
type: AnswerComment
has text: The fiddles have been updated. It seems the FabricJS library has changed quite a bit since this was published 4 years ago. `getAngle()` and `setAngle()` appear to have been replaced with just `angle`
type: Comment
comment on: http://stackoverflow.com/a/26278227
score: 0

http://stackoverflow.com/comment/41328711
has text: just added it in an edit!
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26331232
score: 0

http://stackoverflow.com/comment/41229414
comment on: http://stackoverflow.com/q/26277630
has text: @Jamiec you are right and thank you for your input so far. I hoped it is a issue someone encoutered before. I can try to provide a JS fiddle which reproduces my issue later.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26303771
has comment: http://stackoverflow.com/comment/41278445
has comment: http://stackoverflow.com/comment/41276237
has comment: http://stackoverflow.com/comment/41276240
has answer: http://stackoverflow.com/a/26305188
score: 6
possible better answer: http://stackoverflow.com/a/26310426
has comment: http://stackoverflow.com/comment/41276856
upvote count: 7
has comment: http://stackoverflow.com/comment/41275981
downvote count: 1
accepted answer: http://stackoverflow.com/a/26304568
type: Question
has comment: http://stackoverflow.com/comment/41276306
has title: How do I detect when a div has lost focus?
has comment: http://stackoverflow.com/comment/41276152
has comment: http://stackoverflow.com/comment/41276194
has comment: http://stackoverflow.com/comment/41276263
has comment: http://stackoverflow.com/comment/41305775
has comment: http://stackoverflow.com/comment/41276057
has answer: http://stackoverflow.com/a/26304568
has comment: http://stackoverflow.com/comment/41287589
has comment: http://stackoverflow.com/comment/41276094
has answer: http://stackoverflow.com/a/26310426
tagged with: javascript
linked to: http://stackoverflow.com/q/769135
tagged with: jquery
has body: Given the following markup, I want to detect when an editor has lost focus: GO EDIT: As the user tabs through the input elements and as each editor div loses focus (meaning they tabbed outside the div) add the loading class to the div that lost focus. This bit of jquery is what I expected to work, but it does nothing: $(".editor") .blur(function(){ $(this).addClass("loading"); }); This seems to work, until you add the console log and realize it is triggering on every focusout of the inputs. $('div.editor input').focus( function() { $(this).parent() .addClass("focused") .focusout(function() { console.log('focusout'); $(this).removeClass("focused") .addClass("loading"); }); }); Here is a jsfiddle of my test case that I have been working on. I know I am missing something fundamental here. Can some one enlighten me? EDIT: After some of the comments below, I have this almost working the way I want it. The problem now is detecting when focus changes to somewhere outside an editor div. Here is my current implementation: function loadData() { console.log('loading data for editor ' + $(this).attr('id')); var $editor = $(this).removeClass('loaded') .addClass('loading'); $.post('/echo/json/', { delay: 2 }) .done(function () { $editor.removeClass('loading') .addClass('loaded'); }); } $('div.editor input').on('focusin', function () { console.log('focus changed'); $editor = $(this).closest('.editor'); console.log('current editor is ' + $editor.attr('id')); if (!$editor.hasClass('focused')) { console.log('switched editors'); $('.editor.focused') .removeClass('focused') .each(loadData); $editor.addClass('focused'); } }) A bit more complicated, and using classes for state. I have also added in the next bit of complexity which is to make an async call out when an editor loses focus. Here a my jsfiddle of my current work.
favorite count: 0
has comment: http://stackoverflow.com/comment/41275926
has comment: http://stackoverflow.com/comment/41276065
answer count: 3
has comment: http://stackoverflow.com/comment/41276217
has comment: http://stackoverflow.com/comment/41276451
linked to: http://stackoverflow.com/q/3088738
type: AnsweredQuestion

http://stackoverflow.com/a/26336075
has comment: http://stackoverflow.com/comment/41335301
downvote count: 0
has comment: http://stackoverflow.com/comment/41335242
type: Answer
has body: $('#div_content img').each(function (index) { $(this).attr("id","id" + index); }); alert($("#div_content").html()); Do not use querySelectorAll since you already use jQuery. $('#div_content img').each(function (index) { $(this).attr("id","id" + index); }); document.querySelectorAll will return an array of DOMElements that don't have attr method.
has comment: http://stackoverflow.com/comment/41335554
answers question: http://stackoverflow.com/q/26336039
score: 5
upvote count: 5

http://stackoverflow.com/q/26239891
tagged with: internet-explorer
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26240046
favorite count: 0
linked to: http://stackoverflow.com/q/2144386
has title: Javascript to delete JSESSIONID cookie not working
type: UnansweredQuestion
has body: I am having weird issue with IE10. IE10 is sending expired JSESSIONID cookie for authentication causing the login filure, So am trying to delete the JSESSIONID cookie as below function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;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 ""; } if(getCookie("JSESSIONID")) { var c = getCookie("JSESSIONID") console.log("JSESSIONID = "+ c) document.cookie = c + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; } Whenever I reload the page I see JSESSIONID = A64F97BF3AF662AC56238F2C23D529AA in the console log instead of JSESSIONID = A64F97BF3AF662AC56238F2C23D529AA=; expires=Thu, 01 Jan 1970 00:00:01 GMT; Can someone please help me to fix this issue?
score: 3
upvote count: 3
tagged with: cookies
tagged with: session-cookies
type: Question

http://stackoverflow.com/comment/41150165
comment on: http://stackoverflow.com/q/26234997
score: 0
type: Comment
has text: There is no other thread, JS does not execute in parallel. The interval will run *asynchronously*.
type: QuestionComment

http://stackoverflow.com/comment/41193385
type: QuestionComment
has text: @Spokey Callback will modify the submit methods code. I fire these submit from two places. I don't want them to be changed. In the second place.
score: 0
comment on: http://stackoverflow.com/q/26258266
type: Comment

http://stackoverflow.com/comment/41179107
score: 0
comment on: http://stackoverflow.com/a/26250896
type: AnswerComment
type: Comment
has text: Used echo just now, but no effect

http://stackoverflow.com/a/46918981
has comment: http://stackoverflow.com/comment/84249967
downvote count: 0
type: Answer
score: 11
upvote count: 11
has body: @Baz's answer is perfect for D3 version 3, but for anyone struggling to find similar resources for version 4 (the API changed pretty dramatically).. The process now is to use d3.curveStepAfter instead. documentation example An alternative approach is using a line and manually setting the interpolator, eg, d3.line().curve(d3.curveStepAfter)
answers question: http://stackoverflow.com/q/26287448

http://stackoverflow.com/q/26265743
favorite count: 0
has answer: http://stackoverflow.com/a/26266174
has comment: http://stackoverflow.com/comment/41206695
has body: I have the following code in my Shopify Theme. Can I add so the boxes are slided in from right? Code for boxes is below: Sign In Blaslasd.
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41206843
answer count: 2
upvote count: 1
has title: Slide div in from right
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26266273
score: 1

http://stackoverflow.com/a/26255264
answers question: http://stackoverflow.com/q/26255102
has body: Why do you even differentiate by name when you want them to share the same logic? I would add a class like this ... ... And then handle like so $("select.listenChange").change(function(){ var name $(this).attr("name"), newValue = $(this).val(); switch (name) { case 'streettype': //.. break; case 'storey': //.. break; } });
score: 0
type: Answer

http://stackoverflow.com/a/26317449
answers question: http://stackoverflow.com/q/26317392
has body: Try this $('#someelement').click(function(){ $(this).data('id'); });
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26317392
downvote count: 0
score: 1

http://stackoverflow.com/comment/41189619
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26252296
has text: Hans Thanks for your Support . I will try to create a small POC with this If binding and also with out If binding and check if there is any Memory Leak . But For Now I have resolved this issue just replacing <!-- ko if: block with knockout template binding .
score: 0

http://stackoverflow.com/a/26220380
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your code worked for me when I removed the headers parameter from the $.ajax() call.
answers question: http://stackoverflow.com/q/26220142
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26220142

http://stackoverflow.com/a/76277438
upvote count: 3
answers question: http://stackoverflow.com/q/26264956
downvote count: 0
has body: /** * convert neste object array to Map by object field * @param {Array&lt;Object&gt;} array * @param {String} fieldName * @returns {Map} */ function convertNestObjectArrayToMapByField(array, fieldName){ return new Map(array.map(obj =&gt; [obj[fieldName], obj])); } /* Example const array = [ { key: 'foo', val: 'bar' }, { key: 'hello', val: 'world' } ]; let map = convertNestObjectArrayToMapByField(array, 'key'); console.log(map); console.log(map.get('foo')); # Console Map(2) { 'foo' =&gt; { key: 'foo', val: 'bar' }, 'hello' =&gt; { key: 'hello', val: 'world' } } { key: 'foo', val: 'bar' } */
type: Answer
score: 3

http://stackoverflow.com/a/26338235
upvote count: 3
has body: You may try: document.getElementById("your_div_id").innerHTML = myAge;
score: 3
answers question: http://stackoverflow.com/q/26338162
downvote count: 0
type: Answer

http://stackoverflow.com/q/26207410
has comment: http://stackoverflow.com/comment/41098843
has body: I'm trying to make a function (getstudents) that prompt()s a user for input and puts that into the students array. The problem I'm having is that every time a new student object is pushed into students, the previous object is written over instead of appending it. Anyone know what is happening? My code: // person object var person = { firstname: "", lastname: "", email: "" }; function Student(){}; Student.prototype = person; Student.prototype.sid = ""; Student.prototype.courses = []; var students = []; var answer = null; var k = 0; function getstudents(answer, students){ students[k] = new Student(); students[k].courses = new Array(); for(var i = 0; i &lt; answer.length; i++) { if (i &lt; 4) { students[k][i] = answer[i]; } if(i &gt; 3) { students[k].courses[i-4] = answer[i]; } if(i === answer.length) { } } k++; } function getanswer(string) { answer = string; } function report1() { console.log("Report 1 - Registration Information for Students:"); console.log(); console.log("Name Student ID Email CRS# Fees Course List"); console.log("-------- ---------- ------------- ----- ---- -------------"); for (var i = 0; i &lt; students.length; i++) { console.log(students[i][0] + ' ' + students[i][1] + ' ' + students[i][2] + ' ' + students[i][3] + ' ' + students[i].courses.length + ' ' + "$" + feerates[students[i].courses.length] + ' ' + students[i].courses); } } do { getanswer(prompt("Please enter your first name, last name, student ID, email and courses (seperated by ',')")); if(answer !== ""){ var array = answer.split(','); answer = array; getstudents(answer, students); } else { answer = null; } } while(answer !== null ); if(answer === "" || answer === null) { report1(); } else { console.log("No report to write"); }
has comment: http://stackoverflow.com/comment/41099144
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41134021
tagged with: arrays
has comment: http://stackoverflow.com/comment/41136269
has title: Array of objects keeps overwriting previous entries
tagged with: javascript
has comment: http://stackoverflow.com/comment/41099020
has answer: http://stackoverflow.com/a/26207671
has comment: http://stackoverflow.com/comment/41101596
has comment: http://stackoverflow.com/comment/41101453
has answer: http://stackoverflow.com/a/26207651
has comment: http://stackoverflow.com/comment/41098215
has comment: http://stackoverflow.com/comment/41099171
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41100152
tagged with: object
has comment: http://stackoverflow.com/comment/41098821

http://stackoverflow.com/q/26269413
has answer: http://stackoverflow.com/a/26269899
accepted answer: http://stackoverflow.com/a/26269899
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: getscript
has title: Global variables undefined after using jQuery.getScript() to assign
tagged with: global-variables
has body: I have several global variables; var1, var2, etc... I do not immediately instantiate these variables but I do later on using jQuery to instantiate them from a constructor in a separate javascript file I have. However; after I do this instantiation with the getScript(); and I try and access the properties of my newly instantiated objects; I get the following error: Uncaught TypeError: Cannot read property 'x' of undefined Is there a reason; or can you not instantiate global variables this way? Code for getScript(); var functionLoadObjects = function(){ $.getScript('objects.js',function(){ //objects gameScreen= new GameObject(0,0,750,1500,'Art_Assets/game_screen/Colabrative Layout copy.png',0); menu= new GameObject(0,0,750,750,'Art_Assets/main_menu/bkg_start2.png',0); startBtn= new GameObject(50,50,65,160,'Art_Assets/main_menu/btn_play.png','Art_Assets/main_menu/btn_playh.png'); creditBtn= new GameObject(50,150,65,160,'Art_Assets/main_menu/btn_help.png','Art_Assets/main_menu/btn_helph.png'); credits= new GameObject(0,0,750,750,'Art_Assets/credits.png',0); //stations sawStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"sawView"); drillStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"drillView"); bendStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"bendView"); weldStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"weldView"); grindStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"grindView"); paintStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"paintView"); assemblyStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"assemblyView"); fabricStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"fabricView"); sewingStation= new WorkStation('Art_Assets/game_screen/workstation.png',0,"sewingView"); console.log(startBtn.x,"startBtn X inside of loader function"); console.log("stuff is happening") loadImg(menu); loadImg(startBtn); lo…
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41213905
has comment: http://stackoverflow.com/comment/41213857
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41077339
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26196016
has text: Nevermind. For some reason, it returns 0 in the JSFiddle, but your solution #1 works perfectly in my real code. Thank you! :)

http://stackoverflow.com/q/26220398
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/41122400
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26221098
upvote count: 0
answer count: 1
has title: Jquery/JEasyUI How do I get the current date?
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/1531093
has body: What I need to do is get the current date and do a math formula to figure out how many days from a recorded date in a record. Is there a Jquery or javascript function to do this?
duplicate of: http://stackoverflow.com/q/1531093
type: UnansweredQuestion

http://stackoverflow.com/comment/41165496
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26239536
has text: Thanks, is my try catch method seen anywhere else in industry? I would love to put my goodies in another ` ` tag altogether but many times it is impractical. My IDE generally helps with most "early errors".

http://stackoverflow.com/comment/41338192
type: QuestionComment
has text: you can write a function to collapse combobox on frame 3 losing focus. http://stackoverflow.com/questions/18044153/chrome-does-not-trigger-focus-and-blur-events-for-document-in-content-editable-i
type: Comment
comment on: http://stackoverflow.com/q/26336961
score: 1

http://stackoverflow.com/q/26254620
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26254787
has body: This is my menu : http://goo.gl/IeXLW6 I would like red for only item "Submit Event" in menu. How it possibile?
tagged with: http://stackoverflow.com/tag/html
tagged with: menu
favorite count: 0
downvote count: 2
has answer: http://stackoverflow.com/a/26254787
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41185318
has answer: http://stackoverflow.com/a/26254915
accepted answer: http://stackoverflow.com/a/26254915
type: Question
has title: Menu Css for single item color
answer count: 2
upvote count: 0
score: -2

http://stackoverflow.com/comment/41152286
comment on: http://stackoverflow.com/q/26236136
score: 0
type: QuestionComment
has text: nothing happend !! sry
type: Comment

http://stackoverflow.com/q/26306612
tagged with: colors
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26306673
accepted answer: http://stackoverflow.com/a/26306650
type: Question
has title: trying to make gradient using boxes
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26306673
has body: I need to know how can I specify some variable parameters to my background color?? I'm trying to use JavaScript and i want to make this shape : I know the parameters, My approach was to take the initial division, append a child division to it with smaller size and different background color.. However, for this to work i needed to use this : box[i].style.backgroundColor = "rgb(255-10*i, 255-10*i, 255-10*i)" Which didnt work, And i was told that the rgb only takes integers parameters, so i tried to do this: color = 255-10*i; box[i].style.backgroundColor = "rgb(color,color,color)"; which led to the same error.. Any idea how to proceed? Note: 1- I'm using that code in a for loop to create say 20 nested division with different color and size 2- I'm obliged to do it using javascript with no manipulation with neither html nor css files... 3- I need it as fast as possible( Studying for the exam ) Any help is appreciated..
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26306650
score: 0

http://stackoverflow.com/a/26341585
type: Answer
score: 2
upvote count: 2
has body: If you want to have point with 0/origin in different position that rest of series - then instead you should use different series and add hidden another horizontal axis (in your code it will be y-axis because of invert caused by bar charts). To synchronize those axes you can set proper max and min on axes. Example: http://jsfiddle.net/frgo4Lun/3/ OR You can use threshold http://api.highcharts.com/highcharts#plotOptions.bar.threshold. Example: http://jsfiddle.net/frgo4Lun/4/ You have also posted image with series on between of ticks. You can set x position of point to not round values like 1.5. Example: http://jsfiddle.net/frgo4Lun/5/
answers question: http://stackoverflow.com/q/26306678
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26306678

http://stackoverflow.com/q/26266784
downvote count: 1
type: Question
tagged with: frameworks
tagged with: javascript
score: 0
has body: I am not asking "what are differences between Ember and Backbone." It's been asked before, and doesn't answer my question. I don't need to consider syntax, or origin stories, or my developers' coding backgrounds, community size, or which is more lightweight, or readability. But strictly based on features and performance, which framework is better suited for an app with the following characteristics: Tons of very similar views with nested subviews. Lots of complex data to display and sort and update.
answer count: 1
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/41208440
type: UnansweredQuestion
tagged with: ember.js
has answer: http://stackoverflow.com/a/26266926
tagged with: data-binding
has title: Ember or Backbone for app with lots of similar views and data?
upvote count: 1

http://stackoverflow.com/comment/41194576
has text: Edit : Added a function to do it with big-integer.
type: Comment
comment on: http://stackoverflow.com/a/26259254
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41166718
comment on: http://stackoverflow.com/a/26236525
type: AnswerComment
has text: But if you replace em with p element, it won't again work correctly!
type: Comment
score: 1

http://stackoverflow.com/a/26266992
has comment: http://stackoverflow.com/comment/41208788
has comment: http://stackoverflow.com/comment/41209027
has body: To send the row data via the AJAX call - $('#mytable').on('click', '.removeButton', function(events){ var col1 = $(this).closest('tr').find('td').eq(0).html(); // or you could loop through the cells var col2 = $(this).closest('tr').find('td').eq(1).html(); $(this).closest('tr').remove(); $.ajax({ type: "DELETE", data: {column1 : col1, column2 : col2}, // post values success:function(result){ window.location.href = $SCRIPT_ROOT + '/main'; } }); }); These should be available in the request.args
upvote count: 1
has comment: http://stackoverflow.com/comment/41209372
answers question: http://stackoverflow.com/q/26266734
score: 1
has comment: http://stackoverflow.com/comment/41209315
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26266734
has comment: http://stackoverflow.com/comment/41248154
has comment: http://stackoverflow.com/comment/41209232
type: Answer
has comment: http://stackoverflow.com/comment/41228534

http://stackoverflow.com/q/26276945
has comment: http://stackoverflow.com/comment/41227591
has comment: http://stackoverflow.com/comment/41226304
tagged with: internet-explorer
downvote count: 0
has title: jQuery not functioning as expected in Internet Explorer
has comment: http://stackoverflow.com/comment/41226503
type: Question
has body: I'm sure I will lose points for this as I can't provide specifics of the problem, but I can't figure out which part is causing the problem... http://thetally.efinancialnews.com/tallyassets/advisors/index.html Here is an interactive graphic which works fine in chrome. It consists of some variables which change when you click the different buttons in the middle, and some animate functions which use these variables to resize the banks around the outside. After looking at some other advice I added 'px' to the animate functions but that hasn't had any effect. The strange thing is the simple rollover which also uses the animate function works fine but the more advanced one which uses variables doesn't. Can anyone see anything in the jQuery which could stop it from functioning? Let me know if you need any more info, thanks Here is the jQuery: $(document).ready(function() { var title = 0; $(".bank").mousemove(function(e) { $(this).find('.tooltip').css('left', e.pageX + 10).css('top', e.pageY + 10).css('display', 'block'); }); $(".bank").mouseout(function() { $(this).find('.tooltip').css('display', 'none'); }); var resize = function() { $('.bank').each(function() { bankName = $(this).attr('class').split(' ')[1]; var bankSize = window[bankName] * 15; var bankNameMargin = bankSize / 2 - bankSize; $('.banks .' + bankName).animate({ width: bankSize + 'px', height: bankSize + 'px', marginLeft: bankNameMargin + 'px', marginTop: bankNameMargin + 'px' }, 300); if (bankSize == 0) { $('.banks .' + bankName).animate({ opacity: '0', width: '70px', height: '70px', marginLeft: '-35px', marginTop: '-35px' }, 300, "linear", function() { $(this).css({ "opacity": "1", "width": "0px", "height": "0px", "marginLeft": "0px", "marginTop": "0px" }); }); } }); } resize(); $(".bank").mouseenter(function() { $(this).animate({ width: '+=10', height: '+=10', marginLeft: '-=5', marginTop: '-=5' }, 200); }); $(".bank").mouseleave(function() { $(this).animate({ width: '-=10', height: '-=10', marginLeft: '+…
has comment: http://stackoverflow.com/comment/41227120
has comment: http://stackoverflow.com/comment/41230293
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41226489
has comment: http://stackoverflow.com/comment/41228084
has comment: http://stackoverflow.com/comment/41227020
has comment: http://stackoverflow.com/comment/41226387
upvote count: 2
has comment: http://stackoverflow.com/comment/41227520
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26657352
accepted answer: http://stackoverflow.com/a/26657352
favorite count: 0
has comment: http://stackoverflow.com/comment/41226561
has comment: http://stackoverflow.com/comment/41226564
tagged with: css
has comment: http://stackoverflow.com/comment/41226550
has comment: http://stackoverflow.com/comment/41227144
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41227164
score: 2
has comment: http://stackoverflow.com/comment/41226431
has comment: http://stackoverflow.com/comment/41226290

http://stackoverflow.com/q/26243873
has comment: http://stackoverflow.com/comment/41237140
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has title: jQuery JSON Form is only sending Pre-Poluated Values
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has body: I have a form. I have pre-populated the values using JSON/Web Service. Ex: Nick Name: Populated Using: $(".nickname").val(person.nickname); I am sending the form back to another URL using JSON. I verified that works by using a hidden field that isnt populated to see if its updating, but for some reason, all fields being populated, when changed on the screen, still send the same values they were populated with. Full Code: http://pastebin.com/F3dt8ncC Thank You.
has comment: http://stackoverflow.com/comment/41243700
has comment: http://stackoverflow.com/comment/41167613
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41166643
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26347442
tagged with: javascript
tagged with: jquery
has title: Cannot bind model to collection
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26347788
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26347778
has body: I'm trying to use a very static starting set of data to bind to a backbone collection. In the code below, I create my model, give it an initialization function, and create a starting data set for a property called dataArray. In the collection, if I understand this correctly, I assign the model to be a single new instance of the model type I just created. When I attempt to access the model in the collection from the view (via the render function), however, I'm being told by Chrome's debugger that there are not models in the collection. Trying to learn Backbone on the fly so any hints/tips/suggestions would be greatly appreciated. Model var DataPoint = Backbone.Model.extend({ initialize: function (x) { this.setDefaults(); }, defaults: { dataArray: "" }, randomize: function () { $.each(dataArray, function (key, item) { this.contract = Math.random() * (140000 - 100000 + 1) + 100000; }); }, setDefaults: function() { dataArray = [{ "label": "0/7yrs", "contract": 108530.17, "annReturn": "1.20%" }, { "label": "1/7yrs", "contract": 111830.17, "annReturn": "1.63%" }, { "label": "2/7yrs", "contract": 115311.17, "annReturn": "2.07%" }, { "label": "3/7yrs", "contract": 118984.65, "annReturn": "2.52%" }, { "label": "4/7yrs", "contract": 122859.65, "annReturn": "2.98%" }, { "label": "5/7yrs", "contract": 126947.77, "annReturn": "3.46%" }, { "label": "6/7yrs", "contract": 131260.74, "annReturn": "3.94%" }, { "label": "7/7yrs", "contract": 135810.92, "annReturn": "4.44%" }]; } }); Collection var DataSeries = Backbone.Collection.extend({ model: new DataPoint(), fetch: function () { }, randomize: function () { this.each(function (m) { m.randomize(); }); } }); View var BarGraph = Backbone.View.extend({ "el": "#graph", options: {barDemo: ""}, initialize: function (options) { _.bindAll(this, "render", "frame"); this.collection.bind("reset", this.render); this.collection.bind("change", this.render); this.options.barDemo = d3.selectAll($(this.el)).append("svg:svg") .attr("width", width) .a…
type: AnsweredQuestion
upvote count: 1
possible better answer: http://stackoverflow.com/a/26347778
accepted answer: http://stackoverflow.com/a/26347788
type: Question

http://stackoverflow.com/q/26301261
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41273904
has comment: http://stackoverflow.com/comment/41272410
has answer: http://stackoverflow.com/a/26302748
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41272866
downvote count: 0
tagged with: javascript
has body: I have auto height on my flexslider and its still leaving a space below it. I have applied a background colour to the slider and it is using auto height and moving up and down but it seems like the slider is taking the biggest photo and keeping the slider at that height. Any help would be great! You can see the page live here: http://therichmondhillgallery.com/index.php/shows/bruce-yardley/ This is my html: <img src="<?php echo $thumb_image; ?>" /> <img class="slidermainimg" src="<?php echo $main_image; ?>" /> This is my css: /* Browser Resets *********************************/ .flex-container a:active, .flexslider a:active, .flex-container a:focus, .flexslider a:focus {outline: none;} .slides, .flex-control-nav, .flex-direction-nav {margin: 0; padding: 0; list-style: none;} /* Icon Fonts *********************************/ /* Font-face Icons */ @font-face { font-family: 'flexslider-icon'; src:url('../fonts/flexslider-icon.eot'); src:url('../fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('../fonts/flexslider-icon.woff') format('woff'), url('../fonts/flexslider-icon.ttf') format('truetype'), url('../fonts/flexslider-icon.svg#flexslider-icon') format('svg'); font-weight: normal; font-style: normal; } /* FlexSlider Necessary Styles *********************************/ .flexslider {margin: 0; padding: 0;} .flexslider .slides > li {display: none; -webkit-backface-visibility: hidden; margin-right:10px;} /* Hide the slides before the JS is loaded. Avoids image jumping */ .flexslider .slides img {width: 100%; display: block;} .flex-pauseplay span {text-transform: capitalize;} /* Clearfix for the .slides element */ .slides:after {content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;} html[xmlns] .slides {display: block;} * html .slides {height: 1%;} /* No JavaScript Fallback */ /* If you are not using another script, such as Modernizr, make sure you * include js that eliminates this class on page load */ .no-js .slide…
score: 1
favorite count: 0
type: Question
has title: FlexSlider Auto Height still leaving a space below slider
has comment: http://stackoverflow.com/comment/41273440
tagged with: slider
tagged with: flexslider
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26302748
tagged with: css

http://stackoverflow.com/q/26266777
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26266840
has title: Change content of multiple files
has answer: http://stackoverflow.com/a/26266813
type: Question
answer count: 2
tagged with: javascript
has body: I have uploading 3700 + HTML Files to my server. I have made a custom website. In whole website there is one similar div with same id in all files, now i need to change content of that div. For Example, in 3700 + HTML files there is div some thing like that : &lt;div id="leftbar"&gt; Same Content &lt;/div&gt; Now I need to make it : &lt;div id="leftbar"&gt; Update Same Content &lt;/div&gt; I have not included any JS file in whole website. I didn't use any PHP tag in whole website. Updating one by one to all 3700 + Files will take MUCH time ! I need to save my that time. Any suggestion will be highly appreciate.
score: 0

http://stackoverflow.com/a/26336619
type: Answer
has body: Don't know about problem with the code but I have the right code for it var cursor = db.events.find(); cursor.forEach(function(item) { var friends = item.friends; friends.forEach(function(elem) { elem['status'] = '....', }) db.events.update({_id: item._id}, item); }); It is working with mongo shell, but I don't know about javascript
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26335356
upvote count: 1

http://stackoverflow.com/a/26345303
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26344392
downvote count: 0
has body: This code demonstrates how it's possible to send a file and a variable string parameter at the same time: document.getElementById("submitBtn").onclick = function(){ var event_title = document.getElementById("new_event_title").value; var file = document.getElementById("file").files[0]; var data = new FormData(); data.append('SelectedFile', file); data.append('name', event_title); var xhr = new XMLHttpRequest(); xhr.open('POST', 'http://example.com/', true); xhr.send(data); }; &lt;input type="text" id="new_event_title" value="My Event Title"&gt; &lt;input type="file" id="file"&gt; &lt;br&gt; &lt;input type="submit" id="submitBtn" value="Send"&gt; Click above to run the code and look in the network tab of the browser console, you'll see the data is sent. I suspect your problem is related to other code on your page.

http://stackoverflow.com/q/26324237
score: 0
has title: Force image to save when clicking on download link
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41313672
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41313139
tagged with: css
answer count: 0
tagged with: wordpress
type: Question
has body: I am using a wordpress theme that show images in lightbox when clicking on theme, but it also do it for links, I want to kip the lightbox for the images, but offer to download when clicking on download link, the theme I am using is baic from themify and here one option inside the theme, when deactivated it just open the image in new window here a link http://bit.ly/1xG2dQC to the page I am working on, you can see the download link under the image thanks
tagged with: javascript
tagged with: themes

http://stackoverflow.com/q/26260313
has title: Protecting Apps with Apache Cordova MS VS Extension on App Stores
tagged with: app-store
has body: Just have a question about apps that are uploaded on the Windows Store, Andriod Store, and Apple Store. I have never built an App before for any of the three stores, but the Multi Hybrid Extension for Visual Studio seems to be a great start to cover all three Platforms. How do I protect my code for apps that are uploaded to the three stores? The core development for the Apache Cordova extension is done in HTML5 and Javascript. On a regular HTML / Javascript website, the end user can simply right click and View Source of the page and see all the code I've written. My question is, how is this protected for apps that are uploaded to the app store? Will someone be able to reverse engineer my application and get the code and simply re-sell it? Thank you all for your time
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: windows-store-apps
upvote count: 6
linked to: http://stackoverflow.com/q/12732882
tagged with: cordova
score: 6
has answer: http://stackoverflow.com/a/26302626
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41245656
score: 0
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/2008592/can-i-find-events-bound-on-an-element-with-jquery
comment on: http://stackoverflow.com/q/26286884

http://stackoverflow.com/comment/41131687
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26225121
has text: Also slightly on/off topic, an interesting read & performance test for whether `$('body')` is really the best element to delegate to (vs `$(document)`, etc): http://www.sitepoint.com/jquery-body-on-document-on/
type: AnswerComment

http://stackoverflow.com/a/26321002
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26320941
downvote count: 0
score: 1
has body: That is not possible. I think that it is not possible protect and use web files at the same time. If you want use it, the user could find it. That is like to try to protect html code from a website.

http://stackoverflow.com/q/26283525
tagged with: gwt
tagged with: javascript
tagged with: google-maps-api-3
upvote count: 2
has title: GWT Google Maps: setCenter: not a LatLng or LatLngLiteral: in property lat: not a number
tagged with: google-maps
answer count: 1
has body: I'm using GWT (version 2.61) and gwt-maps (version 3.8.0) in an effort to display a Google Map via GWT. The basics seem to work, but now I'm trying to run the CitySimple example that comes with the gwt-maps zip. Here it is in straight JavaScript, but I'm trying to do it through GWT. However, when I run the sample, I get the following error upon startup: com.google.gwt.core.client.JavaScriptException: (InvalidValueError) @com.google.maps.gwt.client.Circle::create(Lcom/google/maps/gwt/client/CircleOptions;)([JavaScript object(17)]): setCenter: not a LatLng or LatLngLiteral: in property lat: not a number at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.maps.gwt.client.Circle$.create(Circle.java) at com.test.client.GwtTest.renderMap(GwtTest.java:80) The map shows up, but none of the city circles show up. It seems to believe that the lat value in my LatLng type is not a number, which is impossible in GWT, since Java will only take a double value. Here is the GWT code I'm running: package com.test.client; import java.util.HashMap; import com.google.gwt.ajaxloader.client.AjaxLoader; import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.dom.client.Document; import com.google.maps.gwt.client.Circle; import com.google.maps.gwt.client.CircleOptions; import com.google.maps.gwt.client.GoogleMap; import com.google.maps.gwt.client.LatLng; import com.google.maps.gwt.client.MapOptions; import com.google.maps.gwt.client.MapTypeId; public class GwtTest implements EntryPoint { static class City { LatLng center; Long populatio…
favorite count: 0
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26299714
accepted answer: http://stackoverflow.com/a/26299714
downvote count: 0
tagged with: java
has comment: http://stackoverflow.com/comment/41351056
has comment: http://stackoverflow.com/comment/41267521
type: Question

http://stackoverflow.com/a/26312947
has comment: http://stackoverflow.com/comment/41292741
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41292802
has body: The way you are coding is correct script must be at the bottom According to Yahoo's Best Practices for Speeding Up Your Web Site Put Scripts at the Bottom tag: javascript The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won't start any other downloads, even on different hostnames. In some situations it's not easy to move scripts to the bottom. If, for example, the script uses document.write to insert part of the page's content, it can't be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations. An alternative suggestion that often comes up is to use deferred scripts. The DEFER attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn't support the DEFER attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster. top | discuss this rule source: Best Practices for Speeding Up Your Web Site According to Google Apps Script Best Practices Load JavaScript last. Many web developers recommend loading JavaScript code at the bottom of the page to increase responsiveness, and this is even more important with the HTML service. In the NATIVE sandbox mode, all scripts you load are scanned and sanitized client-side, which may take a couple of seconds. Moving your tags to the end of your page will let HTML content render before the JavaScript is processed, allowing you to present a spinner or other message to the user. Source: Load JavaScript last Variable and Function Hoisting in Jav…
has comment: http://stackoverflow.com/comment/41292666
upvote count: 1
has comment: http://stackoverflow.com/comment/41292586
has comment: http://stackoverflow.com/comment/41292563
answers question: http://stackoverflow.com/q/26312886
has comment: http://stackoverflow.com/comment/41292887
type: Answer

http://stackoverflow.com/comment/41226416
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26276871
type: Comment
has text: @Satpal Nothing, besides the slight speed increase. (Don't overlook a few cycles on your cpu: those are precious)

http://stackoverflow.com/a/26282426
has comment: http://stackoverflow.com/comment/41236577
answers question: http://stackoverflow.com/q/26282261
has body: css .expenseIcon{ background: red; } .colorToggle { background: blue; } jquery $(".expenseIcon").click(function () { $('.expenseIcon').toggleClass('colorToggle'); }); By default, the div will have expenseIcon background. ToggleClass will toggle the div class with colorToggle so will override the previous color. You don't need an hyperlink tag A to manage clicks, just put it on the DIV.
has comment: http://stackoverflow.com/comment/41260904
score: -1
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/comment/41346151
comment on: http://stackoverflow.com/q/26332565
type: QuestionComment
has text: It took me awhile to understand where you were coming from. Thanks for that artm that was exactly what I needed.
score: 0
type: Comment

http://stackoverflow.com/a/26194908
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41075179
type: Answer
has body: If you want to call client() in server.js, you will have to include this line: var client = require('./client.js'); in your server.js file so that client is defined there, so the whole sequence in server.js would look like this: var client = require('./client.js'); var server = { createClient: function() { var newClient = new client(); } } exports = module.exports = server; You have to require() every module used within each module. The module structure is meant for each module to stand on its own. That means that each module has its own separate namespace and you do not, by default, have access to the namespace of other modules. So, when you need access to anything from another module, you must either use require() to get access to it's namespace or you must call a function in another module (that you have required() in) and get access via that module.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41075155
accepted answer of: http://stackoverflow.com/q/26194798
answers question: http://stackoverflow.com/q/26194798

http://stackoverflow.com/q/26336043
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
score: 1
type: Question
has title: Is there any method to get chrome media exceptions
downvote count: 0
tagged with: javascript
has body: Google Chrome has a list called Media Exceptions, it contains sites or domains that the browser allow or block to use microphone or camera. Is there any method to know whether a site already exist in the list and what the permission is ?
favorite count: 0

http://stackoverflow.com/comment/41174850
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26247970
type: Comment
has text: @76484—you *should not* make generalisations that do not hold for all cases.

http://stackoverflow.com/comment/41262424
type: Comment
type: QuestionComment
score: 0
has text: could you share the code which you have written
comment on: http://stackoverflow.com/q/26296115

coffeescript
tags question: http://stackoverflow.com/q/26272648
tags question: http://stackoverflow.com/q/26326705
tags question: http://stackoverflow.com/q/26341153
tags question: http://stackoverflow.com/q/26321600
type: Tag
tags question: http://stackoverflow.com/q/26340633
tags question: http://stackoverflow.com/q/26276130
tag name: coffeescript
tags question: http://stackoverflow.com/q/26349487
tags question: http://stackoverflow.com/q/26320946
tags question: http://stackoverflow.com/q/26307318
tags question: http://stackoverflow.com/q/26240946
tags question: http://stackoverflow.com/q/26337874
tags question: http://stackoverflow.com/q/26268605
tags question: http://stackoverflow.com/q/26336007
tags question: http://stackoverflow.com/q/26274753
tags question: http://stackoverflow.com/q/26248496
tags question: http://stackoverflow.com/q/26222418
tags question: http://stackoverflow.com/q/26218834
tags question: http://stackoverflow.com/q/26322390
tags question: http://stackoverflow.com/q/26221616

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/26215169
tag name: google-oauth

http://stackoverflow.com/comment/41140169
comment on: http://stackoverflow.com/a/26228921
type: Comment
type: AnswerComment
has text: What plugin did you use and why?
score: 0

http://stackoverflow.com/comment/41325549
type: Comment
has text: what version of the casperjs are you using?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26330651

http://stackoverflow.com/comment/41252106
has text: http://regex101.com/r/yX0mN8/1
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26290566

http://stackoverflow.com/comment/41348227
score: 0
type: Comment
type: QuestionComment
has text: I have checked all css and it is identical. i am using chrome as a browser
comment on: http://stackoverflow.com/q/26343071

http://stackoverflow.com/a/26224936
upvote count: 2
answers question: http://stackoverflow.com/q/26223812
has body: So, I did not manage the plugin to get working and I still wonder because obviously I did nothing wrong, but I used another plugin instead, and finally it works properly. In case some others have the same issues, David Bradshaw's library does exactly what I want and resizes image maps the way they should: https://github.com/davidjbradshaw/imagemap-resizer
has comment: http://stackoverflow.com/comment/137939502
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/26221445
has comment: http://stackoverflow.com/comment/41126476
tagged with: javascript
has body: I am trying to print a partial page using the following code: Everything is fine but when a user changed some input (a form inside the print div), such as after clicking the checkbox, the print window still shows the original page (empty form or the initial value). How can I let the user print the page with his input? Thanks.
tagged with: printing
has comment: http://stackoverflow.com/comment/41124559
has comment: http://stackoverflow.com/comment/41124488
has answer: http://stackoverflow.com/a/26222315
accepted answer: http://stackoverflow.com/a/26222315
has comment: http://stackoverflow.com/comment/41126133
type: AnsweredQuestion
has title: How to print the page after user input?
type: Question
score: 0
answer count: 1

http://stackoverflow.com/a/26261359
downvote count: 0
answers question: http://stackoverflow.com/q/26261238
type: Answer
has body: I think you have the syntax of the otherwise call in your config section wrong. Change what you have for this instead: otherwise('/handler'); hope this helps...
upvote count: 1
has comment: http://stackoverflow.com/comment/41197836
score: 1

http://stackoverflow.com/a/26322014
has comment: http://stackoverflow.com/comment/41309198
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41309122
score: 1
answers question: http://stackoverflow.com/q/26321914
has comment: http://stackoverflow.com/comment/41309224
has comment: http://stackoverflow.com/comment/41315138
upvote count: 1
has body: Use the PHP function addslashes() which will escape those characters that are causing chaos in js. opener.postConditionPostCure("&lt;?php echo addslashes(the_field('cure_description')); ?&gt;")

http://stackoverflow.com/a/26331587
downvote count: 0
score: 5
accepted answer of: http://stackoverflow.com/q/26329825
answers question: http://stackoverflow.com/q/26329825
has comment: http://stackoverflow.com/comment/88261857
type: AcceptedAnswer
has body: For security reasons, you can't access the Set-Cookie header on the response from XMLHttpRequest. AngularJS $http uses the browsers XMLHttpRequest implementation. 4.7.4 The getAllResponseHeaders() method Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2.
upvote count: 5
type: Answer

http://stackoverflow.com/q/26228304
has body: I have this code $("[input]").each(function(){ var data = $(this).val(); $.post('someurl.php',{data:data},function(result){ alert(result); }); }); Now, when I open my network tab, post ajax requests seems to be started simultaneously, but I want to achieve one by one. That means when one ajax request completes, I want each() to wait to loop again. How can I achieve this?
has answer: http://stackoverflow.com/a/26228388
type: UnansweredQuestion
has title: jQuery each(), process one by one after inner ajax comepletes
upvote count: 1
has comment: http://stackoverflow.com/comment/41137628
has comment: http://stackoverflow.com/comment/41137617
score: 1
has answer: http://stackoverflow.com/a/26228347
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/41329228
type: QuestionComment
has text: Also, the user input is done in the format of hh:mm t. The user inputs it this way and it will open a print form in the format of hh:mm with no t. If that helps any. I have been stumped by this for a few weeks now and can not find anything or anyone who has had a similar issue.
comment on: http://stackoverflow.com/q/26332481
score: 0
type: Comment

printers
tag name: printers
type: Tag
tags question: http://stackoverflow.com/q/26349436

http://stackoverflow.com/a/26233136
score: 0
has body: Change: var curr_width = parseInt(mydiv.style.width); mydiv.style.BackgroundColor = "blue"; to: var curr_width = mydiv.offsetWidth; mydiv.style.backgroundColor = "blue"; I have set up a fiddle here. Also notice I took it out of the function because it looked like it wasn't being called anywhere. You should also move the script out of the head to the bottom of the body tag or use window.onload. UPDATE Another fiddle with everything together
type: Answer
answers question: http://stackoverflow.com/q/26232954

http://stackoverflow.com/q/26306186
score: -1
has title: javascript variables not getting passed to function
has answer: http://stackoverflow.com/a/26306273
type: Question
has body: For some reason on line 54(which is starred out************) an error is popping up saying cannot call 'push' of undefined. My 'randUsers' array which is supposed to initially be empty is not getting passed properly. Why isn't randUsers getting passed properly? This cloud code on Parse.com is getting triggered by an afterSave function. I declared the variables so they would be global variables, but idk if the fact that this is cloud code and not a regular implementation file affects that. var leanBody = ""; var leanSenderName = ""; var leanSenderId = ""; var randUsers = []; function varReset(leanBody, leanSenderName, leanSenderId, randUsers){ leanBody = ""; leanSenderName = ""; leanSenderId = ""; randUsers = []; console.log("The variables were set"); } Parse.Cloud.afterSave("Lean", function(request, leanBody, leanSenderName, leanSenderId, randUsers) { varReset(leanBody, leanSenderName, leanSenderId, randUsers); var leanQuery = new Parse.Query("Lean"); leanQuery.first({ success: function(results){ console.log("The first object was retrieved"); leanBody = (results.get("messageBody")); leanSenderName = (results.get("senderName")); leanSenderId = (results.get("senderId")); getUsers(leanBody, leanSenderId, leanSenderName, randUsers); results.destroy({ success: function(results){ console.log("deleted"); }, error: function(results, error){ } }); }, error: function(error){ } }); }); function getUsers(randUsers, response, leanBody, leanSenderName, leanSenderId, randUsers){ var query = new Parse.Query(Parse.User); query.find({ success: function(results, leanBody, leanSenderName, leanSenderId, randUsers){ var users = []; console.log("results = " + results); //extract out user names from results for(var i = 0; i &lt; results.length; ++i){ users.push(results[i].id); } for(var i = 0; i &lt; 3; ++i){ var rand = users[Math.floor(Math.random() * users.length)]; var index = users.indexOf(rand); users.splice(index, 1); randUsers.push(rand);*********************************************…
upvote count: 0
has comment: http://stackoverflow.com/comment/41280387
answer count: 1
accepted answer: http://stackoverflow.com/a/26306273
tagged with: javascript
favorite count: 0
tagged with: parse-cloud-code
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/41280409
tagged with: parameter-passing
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/q/26201676
has comment: http://stackoverflow.com/comment/41087714
accepted answer: http://stackoverflow.com/a/26201708
has body: I am using the dashboard bootstrap template and I want to use jQuery to swap contents on click of specified links. Here's my code: Overview Membership requests List news List announcements List members List accounts ... jQuery: jQuery does not locate the anchor with 'switch' id. What is the problem for this? Thank you
linked to: http://stackoverflow.com/q/9235945
has answer: http://stackoverflow.com/a/26201708
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap
type: Question
has comment: http://stackoverflow.com/comment/41087519
type: AnsweredQuestion
has title: jQuery doesn't locate specified anchors in bootstrap template

http://stackoverflow.com/q/26311951
downvote count: 0
tagged with: javascript
favorite count: 0
has body: (Note: I'm using the 'therubyracer', 'react-rails', and 'sprockets-coffee-react' gems) This is the code for my simple component (Hello.js.cjsx): # @cjsx React.DOM Hello = React.createClass( render: -&gt; &lt;div&gt; Hello {@props.name || "World"}! &lt;/div&gt; ) window.components ?= {} window.components.Hello = Hello In my rails view (index.html.erb) this works just fine: &lt;%= render_component('components.Hello', {name: 'Jack'}) %&gt; However, when I try this: &lt;%= react_component('components.Hello', {name: 'Jill'}, {prerender: true}) %&gt; I get this error: Encountered error "ReferenceError: components is not defined" which seems odd because I'm defining it in my component. What am I doing wrong?
tagged with: ruby
type: UnansweredQuestion
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/41298253
upvote count: 5
has title: How do I prerender a namespaced react component using the react-rails gem?
has comment: http://stackoverflow.com/comment/41298201
has answer: http://stackoverflow.com/a/26559559
has comment: http://stackoverflow.com/comment/41291974
tagged with: reactjs
has answer: http://stackoverflow.com/a/26508011
answer count: 2
score: 5

http://stackoverflow.com/q/26338000
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27571632
has answer: http://stackoverflow.com/a/27369770
tagged with: web
tagged with: service
tagged with: rest
type: UnansweredQuestion
has body: I created a mock service using mockable.io. For example: Putting this in the url works: http://demo#####.mockable.io/items But if I filter it with: http://demo#####.mockable.io/items?pid=5 It doesn't work as it should, it shows all the data instead of filtering them. Can anyone tell me what I'm doing wrong please?
has title: How to search by id in Mockable.io?
type: Question
has answer: http://stackoverflow.com/a/63414345
tagged with: javascript

http://stackoverflow.com/a/26217789
has comment: http://stackoverflow.com/comment/41117364
score: 1
has comment: http://stackoverflow.com/comment/41117865
answers question: http://stackoverflow.com/q/26217675
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: By doing Data = {text:"Hello2", show:true}; you completely overwrite initial Data object, which results into broken reference. That's why you can't just assign completely new object. You however can do it something like this: myApp.factory('Data', function(){ return { prop: {show: true, text: "Hello"} }; }); and later: Data.prop = {text: "Hello2", show: true};
has comment: http://stackoverflow.com/comment/41117497
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26217675

http://stackoverflow.com/a/26499164
score: 1
upvote count: 1
has body: This was resolved in the following manner. The InfoVis chart draws it's elements as HTML div elements inside the parent element. The problem was due to remainings of those generated div elements even after clearing up the data structures. Those were clearly shown in the previously attached images. This was resolved in the following manner. var list = document.getElementById("idOfParentElement"); list.removeChild(list.childNodes[0]); The code fragment extracts the parent InfoVis element and clears up all of it's generated child elements. This will eventually clears the canvas object where the visualization will be drawn. This resolved my issue. Hope this helps for anyone who is having the same issue.
accepted answer of: http://stackoverflow.com/q/26271127
answers question: http://stackoverflow.com/q/26271127
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41096679
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26206788
has text: What does your JavaScript console say?

http://stackoverflow.com/a/26249074
downvote count: 0
has comment: http://stackoverflow.com/comment/41176084
has body: "I need the script to take the same action it would when I click on the bookmark button (ID = bookmark) when the page reloads and has the anchor #bookmarkme" This will do what you want^ $('#bookmarkme').trigger('click');
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26249002
score: 2
answers question: http://stackoverflow.com/q/26249002

http://stackoverflow.com/a/26252704
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26252488
upvote count: 2
has body: Simply use addClass/removeClass methods: $('#searchInput, #searchInput2').keyup(function(){ if ($(this).val() == '') { //Check to see if there is any text entered //If there is no text within the input ten disable the button $('.enableOnInput').prop('disabled', true).addClass('red'); $(".aa").show(); $(".bb").hide(); } else { //If there is text in the input, then enable the button $('.enableOnInput').prop('disabled', false).removeClass('red'); $(".aa").hide(); $(".bb").show(); } }).keyup(); I also added trigged for keyup event to check initial state and set proper class. UPD. Or as @Terry suggests in comments it's even better to change CSS selector to from .red to .enableOnInput:disabled and go with just $('.enableOnInput').prop('disabled', true). Just note that this way it will not work in IE8 and below. Demo: http://codepen.io/anon/pen/CELut?editors=001
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26252488
has comment: http://stackoverflow.com/comment/41182372
has comment: http://stackoverflow.com/comment/41182120

http://stackoverflow.com/a/26265924
type: Answer
downvote count: 0
score: 1
has body: Add a .bowerrc file to c:\foo\ with the following contents: { "cwd": "bar } this will set the working directory for Bower to c:\foo\bar\.
accepted answer of: http://stackoverflow.com/q/26263092
answers question: http://stackoverflow.com/q/26263092
upvote count: 1
type: AcceptedAnswer

relative-path
type: Tag
tags question: http://stackoverflow.com/q/26233340
tag name: relative-path

http://stackoverflow.com/comment/41188095
comment on: http://stackoverflow.com/a/26255947
type: Comment
type: AnswerComment
score: 0
has text: @AlexPalombo Oh.. that's a nice move, though you can use my solution too.. see the updated answer..

http://stackoverflow.com/a/26208308
has body: You would want to get the current time at page load or init and perhaps store it in a global variable. Then everytime you call the draw function, you can determine the time elapsed from subtracting the current time from the initial time. var initialTime = new Date(); var lastUpdate = new Date(); var minTime = 100; function draw() { ... var currentTime = new Date(); //Don't update if enough time has not passed if(currentTime - lastUpdate &lt; minTime) { //Don't update the timer } else { //Update the timer } var timeTaken = currentTime - initialTime; if(x &lt;= 15) { var restart = confirm("It took you " + timeTaken + " seconds to complete the maze!"); } ... lastUpdate = Date.Now(); } }
has comment: http://stackoverflow.com/comment/41099647
has comment: http://stackoverflow.com/comment/41099623
has comment: http://stackoverflow.com/comment/41099787
has comment: http://stackoverflow.com/comment/41099527
type: Answer
has comment: http://stackoverflow.com/comment/41099745
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41099914
accepted answer of: http://stackoverflow.com/q/26208250
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26208250

http://stackoverflow.com/q/26347587
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26349411
tagged with: handlebars.js
tagged with: templates
has title: Organizing Handlebars files
type: AnsweredQuestion
has body: In this simple example... http://plnkr.co/edit/78ObAiirrSFPcvyiBKqn ...I try to have a Handlebars template and the content that should populate it into separate files, instead of having the template inside the HTML and the content object in the js script, as in this other example: http://embed.plnkr.co/KXdVgedRA8K95S17peuH/ And I also found this post where this guy means the same as I do (right?): Using pre-compiled templates with Handlebars.js (jQuery Mobile environment) I tried that (what's on the accepted answer, see the code below), but it doesn't work. I get "undefined is not a function". On the other hand, that answer has 90 upvotes so I must be missing something somewhere. Could someone point that out to me? Another related question: should I use AJAX to load a local file? index.html &lt;script src="cities.tmpl.js"&gt;&lt;/script&gt; &lt;!-- compiled template --&gt; &lt;script src="content.js"&gt;&lt;/script&gt; &lt;script src="script.js"&gt;&lt;/script&gt; script.js var template = Handlebars.templates['cities.tmpl']; // your template minus the .js var context = data_pr.all(); // your data var html = template(context);
score: 1
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/8659787
upvote count: 1
accepted answer: http://stackoverflow.com/a/26349411
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41095044
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26205592
has text: @Teemu Thanks for pointing that out :) Didn't think about it!

http://stackoverflow.com/q/26331787
tagged with: socket.io-1.0
tagged with: socket.io
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/59478402
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26331826
accepted answer: http://stackoverflow.com/a/26331826
score: 27
favorite count: 0
tagged with: sockets
has comment: http://stackoverflow.com/comment/117716683
upvote count: 27
tagged with: node.js
downvote count: 0
has comment: http://stackoverflow.com/comment/92745484
has body: Is there any plain and straight forward examples on how to serve an image? from server to client? through buffering or just a direct call to download? (the goal is to get image files in near real time efficiently to sort of present a near live stream of images) and append to a html image tag or just in the body of the html page. incomplete sample code: (mostly acquired from official sample or just codes from stackoverflow) index.js // basic variables var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var fs = require('fs'); // required for file serving http.listen(3000, function(){ console.log('listening on *:3000'); }); // location to index.html app.get('/', function(req, res){ res.sendFile(__dirname + '/index.html'); }); // only to test chat sample code from sample io.on('connection', function(socket){ console.log('a user connected'); // broadcast a message socket.broadcast.emit('chat message', 'System Broadcast Message: a user has been connected'); socket.on('chat message', function(msg){ io.emit('chat message', msg); }); // trying to serve the image file from the server io.on('connection', function(socket){ fs.readFile(__dirname + '/images/image.jpg', function(err, buf){ // it's possible to embed binary data // within arbitrarily-complex objects socket.emit('image', { image: true, buffer: buf }); console.log('image file is initialized'); }); }); (client side html page) index.html (we'll cut to the chase with only the portion which serves the image) What can we do on the client side to get the file and serve the image on the html page? socket.on("image", function(image, buffer) { if(image) { console.log(" image: from client side"); // code to handle buffer like drawing with canvas** &lt;--- is canvas drawing/library a requirement? is there an alternative? another quick and dirty solution? console.log(image); // what can we do here to serve the image onto an img tag? } }); thank you for reading Update: afte…
has title: socket io, node js, Simple example to send image/files from server to client

http://stackoverflow.com/comment/41076072
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26195126
type: Comment
has text: Thank you for working with me. I did try what you've mentioned, however if I remove the Jasny CSS file from the header, then the responsiveness doesn't work correctly: The off canvas menu doesn't show up at all. BUT - I haven't imported the other `*.less` files from Jasny that you've indicated. Where did you find them please?

http://stackoverflow.com/q/26303538
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26303743
score: 0
accepted answer: http://stackoverflow.com/a/26303743
has body: my javascript is getting a dice result from my Java Servlet. I am using a label in my html page to show the dice result, but I want to make a cheap effect that will display changing numbers on screen before the real result shows. because this is an ajax call that happens after pressing the "roll dice" button, then the real result is shown first, and the ones I choose randomly in the javascript page are shown after... (I tried that with setInterval() ). Can you help me find a good way to do that "effect"? Thank you! here's my js code: function onRollDiceClick() { ajaxGetDiceResult(gameName); } function ajaxGetDiceResult(gameName) { jQuery.ajax({ url: "rollDice?gameName=" + gameName, dataType: 'json', timeout: TIMEOUT_RATE, success: function(data) { var diceResult = data.diceResult; setIntervalXTimes(showRandomNumbers, 200, 20); $("#dice-result").text(diceResult); }, error: function(error) { } }); } function showRandomNumbers() { var randomNumber = Math.floor(Math.random() * (6) + 1); $("#dice-result").text(randomNumber); } function setIntervalXTimes(callback, delay, repetitions) { var x = 0; var intervalID = setInterval(function() { callback(); if (++x === repetitions) { clearInterval(intervalID); } }, delay); }
has title: dice effect - how to display fake results and the real one in the end (JavaScript)
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/41275847
tagged with: servlets
type: Question
tagged with: dice

http://stackoverflow.com/a/26317993
accepted answer of: http://stackoverflow.com/q/26317558
answers question: http://stackoverflow.com/q/26317558
has body: if you're just learning/prototyping, local storage should suit your needs. localStorage.setItem('key', 'value'); localStorage.getItem('key'); // returns 'value'
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/29823654
has comment: http://stackoverflow.com/comment/74151858
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26338563
has body: I ran into this warning myself and if you want to know the cause, it is because your IDE expect function names to start with a lowercase letter. Since your function is called CheckHidden with a capital C, it thinks it's a class declaration. However, you should still use jQuery's :visible selector to fix your specific issue.
upvote count: 86
score: 86
accepted answer of: http://stackoverflow.com/q/26338563

http://stackoverflow.com/comment/41470747
comment on: http://stackoverflow.com/a/26284380
type: AnswerComment
score: 0
type: Comment
has text: I've continued to try this, and it does appear to be the DOM giving the most trouble. As such, I've removed all ng-repeats in favor of hand-crafted DOM manipulation (with debouncing for IE to avoid touching it as often as I can in Chrome). So, still not perfect, but thanks for the tip!

http://stackoverflow.com/comment/41347417
type: Comment
has text: • I already use HTML elements semantically on sites: `a` elements link to pages normally, but on JS-enabled browsers the content loads via XHR below the buttons. • `:active` is something different. The issue here is about offering a `:focus` style without it interfering with other functionality — i.e. `:hover` or `.current`, like used in the linked example
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26328740

http://stackoverflow.com/a/50172293
accepted answer of: http://stackoverflow.com/q/26256271
type: AcceptedAnswer
type: Answer
has body: It looks like this is not a issue any more in newer version of Chrome. Tested in Chrome Version 66.
answers question: http://stackoverflow.com/q/26256271
score: 0

socket.io
tags question: http://stackoverflow.com/q/26348318
tags question: http://stackoverflow.com/q/26236151
tags question: http://stackoverflow.com/q/26290126
tags question: http://stackoverflow.com/q/26299841
tags question: http://stackoverflow.com/q/26352953
tags question: http://stackoverflow.com/q/26331191
type: Tag
tags question: http://stackoverflow.com/q/26207084
tags question: http://stackoverflow.com/q/26234085
tag name: socket.io
tags question: http://stackoverflow.com/q/26312406
tags question: http://stackoverflow.com/q/26324169
tags question: http://stackoverflow.com/q/26311600
tags question: http://stackoverflow.com/q/26299403
tags question: http://stackoverflow.com/q/26351226
tags question: http://stackoverflow.com/q/26331787
tags question: http://stackoverflow.com/q/26319320
tags question: http://stackoverflow.com/q/26327752

http://stackoverflow.com/q/26206636
has answer: http://stackoverflow.com/a/26207415
has title: Is there any method to draw Path (Polyline) on Leaflet with constant width/stroke in meters instead pixels?
has answer: http://stackoverflow.com/a/40064379
tagged with: javascript
favorite count: 0
tagged with: polyline
upvote count: 3
has body: Does anyone known any working method to draw polylines on Leaflet with constant width in meters? I can't find any working solutions for this. Documentation about Leaflet Path have only stroke with weight in pixels.
downvote count: 0
has comment: http://stackoverflow.com/comment/45052733
type: UnansweredQuestion
tagged with: maps
type: Question
score: 3
tagged with: leaflet
has answer: http://stackoverflow.com/a/31386007
answer count: 3

http://stackoverflow.com/a/26277018
answers question: http://stackoverflow.com/q/26268775
has body: You have two options: use threshold option use multicolor series plugin
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26268775
type: Answer
upvote count: 2

http://stackoverflow.com/q/26204952
has body: I have the following javascript variable with HTML code in it: var html_ticket = '&lt;!doctype html&gt;' + '&lt;html dir="ltr" lang="en" class="no-js"&gt;' + '&lt;head&gt; ' + ' &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt; ' + ' ...... ' + '&lt;/body&gt; ' + '&lt;/html&gt; '; I would like to open that variables content as a HTML in a new window. Is this possible or am i approaching it wrong? Regards
type: AnsweredQuestion
tagged with: popup
has comment: http://stackoverflow.com/comment/41092973
has answer: http://stackoverflow.com/a/26205120
type: Question
answer count: 2
has title: Open in new window html file stored in javascript variable
tagged with: javascript
tagged with: variables
score: 0
linked to: http://stackoverflow.com/q/10573404
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26205120
has answer: http://stackoverflow.com/a/26205012
accepted answer: http://stackoverflow.com/a/26205012
has comment: http://stackoverflow.com/comment/41093036

http://stackoverflow.com/comment/41108554
comment on: http://stackoverflow.com/a/26213126
score: 1
type: AnswerComment
has text: But how do I do the `HTML.BeginForm()` in the javascipt method?
type: Comment

http://stackoverflow.com/q/26269231
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Setting value of input with jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26269271
accepted answer: http://stackoverflow.com/a/26269271
downvote count: 0
type: Question
score: 1
has body: I'm having problem trying to set the value for an input using jquery, basically you click on a link, and it takes you to a different page with a form, and I'm trying to set the value of one of the inputs of that form. I don't know why is not working. Here's my code: page 1 (where you click the link that performs the function to set the value of the input) $400 - PS4 page 2 (form with the input that needs to show the value) Precio: Here's the javascript (javascript/metodos.js) $(document).ready(function() { $("#botonCompraPS4").click(function() { obtienePrecioPS4(); $("#precioI").val(retornaPrecio()); }); }); function obtienePrecioPS4() { sessionStorage.setItem("precio", $("#precioPS4").text()); } function retornaPrecio() { var r = sessionStorage.getItem("precio"); return r; }

http://stackoverflow.com/q/26321802
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/8752321
linked to: http://stackoverflow.com/q/9985090
has body: This is a common question asked many times but I am not able to find a solution for my problem. I have a HTML table in which the data is loaded using ajax. I need to bind a click event to the delete link. Since this data is loaded using ajax I have tried using jQuery on() method as shown below. $('.datagrid').on('load', '.action', function(){ $('.action a#deleteTrigger').each(function() { $(this).click(function() { alert('called..'); }) }); }) But this doesn't work. Below is a simple illustration of my HTML DOM. 1 admin Delete 1 admin Delete 1 admin Delete Can anyone please help me with this?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26321833
has title: Binding a click event to entities loaded dynamically using jQuery on()
linked to: http://stackoverflow.com/q/9814298
type: Question
accepted answer: http://stackoverflow.com/a/26321834
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26321834
has answer: http://stackoverflow.com/a/26321833
score: 0
answer count: 2

http://stackoverflow.com/comment/41101214
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26208945
has text: It would appear that circle-menu does not provide for changing the options after initialisation. There's an "init" command, which will re-initialise but with the same options as were originally applied. If there was a "destroy" command, then you could destroy and re-initialise with different options, however the documentation gives no indication that "destroy" exists. You could try re-initialising without destroying but the end result may behave erratically.

http://stackoverflow.com/comment/41199273
has text: I don't think that is the problem, but I have edited the question again :)
comment on: http://stackoverflow.com/a/26261596
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41323317
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26329609
has text: where does that ` ` element go? because as you've shown it, it's not in your html file, so it's not going to ever trigger. With that said, if you're starting with javascript, don't use `alert()`, but use the `console.log()` function instead, and check for its output in the developer console instead. alert blocks the page thread, console.log does not, and with the dev console, you can live-debug.
type: Comment

http://stackoverflow.com/comment/41300399
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26316174
type: Comment
has text: And, as to why: the reason I want to save reference to `Options.symbols` in a seperate variable is, that it is part of the attributes to a custom directive (called `table`). I'd like to collect all those attributes into a single object to keep better track of them, like so e.g. `$scope.tblAttr = {header: true, colors: ['red', 'orange'], symbols: Options.symbols /*or $scope.options.symbols*/, colCount: 5}`. Hope that makes sense

http://stackoverflow.com/comment/41151592
has text: You could remove everything before the third forward slash, if you are certain that the URL will always be in the format "http://example.com/"
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26236223
score: 0

http://stackoverflow.com/comment/41104792
type: QuestionComment
has text: I am still not sure what the question is :/ could you please give some examples what the content of `data` should look like and where specifically you are struggeling?
comment on: http://stackoverflow.com/q/26210973
score: 0
type: Comment

http://stackoverflow.com/comment/41100867
score: 0
type: AnswerComment
type: Comment
has text: Define 'ad infinitum', do you mean (0, 100n)?
comment on: http://stackoverflow.com/a/26208499

http://stackoverflow.com/a/26286345
has comment: http://stackoverflow.com/comment/41244376
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26285640
type: AcceptedAnswer
has body: In my case, I'd neglected to check whether Chrome was given permission to get geolocation data on the iPad. Once I enabled it in the Privacy settings, everything worked fine.
answers question: http://stackoverflow.com/q/26285640
has comment: http://stackoverflow.com/comment/41244324
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26312165
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26312119
has body: Yes!! I would suggest to go with querySelector and querySelectorAll methods. var body = document.querySelector('body'); var posts = body.querySelector('posts'); var chunks = body.querySelector('chunks'); var show = posts.querySelectorAll('show'); var edits = posts.querySelectorAll('edit'); var create = chunks..querySelectorAll('create'); if ( !show.length &amp;&amp; !edit.length &amp;&amp; !create.length) { // Something here }

http://stackoverflow.com/comment/41343685
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26329060
has text: You could use [eventRender](http://fullcalendar.io/docs/event_rendering/eventRender/) for that I guess or you could use [getView](http://fullcalendar.io/docs/views/View_Object/) and then filter [clientEvents](http://fullcalendar.io/docs/event_data/clientEvents/) using the interval start and end. If you go for the latter then [maybe this code will help](http://stackoverflow.com/questions/26278724/how-to-get-the-date-when-calendar-rendering-date-cells/26287368#26287368)

http://stackoverflow.com/q/26340808
has answer: http://stackoverflow.com/a/26341200
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41344227
downvote count: 1
has body: I have a simple running game where platforms scroll from right to left. These platforms are stored in an array, and when they are off screen I use array.splice(index, 1) to remove it. This however is causing an ever so slight lag on the exact second splice is called. I have also used Array.shift() but I can still see the slight dip in frame rate as this is called. Is there a better way to remove/destroy something? for(var x = 0; x &lt; platforms.length; x++){ var platform = platforms[x]; platform.x -= 10; if(platform.x + platform.width &lt; 0){ platforms.shift(); } }
has comment: http://stackoverflow.com/comment/41344056
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26341200
has comment: http://stackoverflow.com/comment/41344075
has answer: http://stackoverflow.com/a/26341132
tagged with: canvas
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26341132
favorite count: 0
has title: javascript splice causing lag in canvas
type: Question
has comment: http://stackoverflow.com/comment/41344192
answer count: 2
has comment: http://stackoverflow.com/comment/41343824

http://stackoverflow.com/a/26256542
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41196671
has comment: http://stackoverflow.com/comment/41193087
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26256127
answers question: http://stackoverflow.com/q/26256127
has comment: http://stackoverflow.com/comment/41198333
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41189024
has body: The ? formally know as the Query string or request parameter, is basically a variable passed to the server. The # formally know as the Fragment identifier or simply hash, is originally used to position pages so that the top of the element identified by the fragment id attribute is aligned with the top of the viewport. Use the Query string (?) if you want the processing to happen in the Server. Use the Fragment identifier (#) if you want the processing to happen in the Web Browser. I'm guessing form the jQuery tag that you want to implement this in the Web Browser so take a look at libraries such as Backbone.js that make implementing this functionally simple and clean using a mechanism called Routers, which will use the URL hash.

http://stackoverflow.com/comment/41323456
has text: Is there a reason why you are appending a time in the new jQuery code, but not in the old native, inline JS code? Also, you might want to wrap all your jQuery code within the DOM ready function.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26329752
score: 0

kendo-mobile
tags question: http://stackoverflow.com/q/26206954
type: Tag
tags question: http://stackoverflow.com/q/26257194
tag name: kendo-mobile

http://stackoverflow.com/a/26302192
has comment: http://stackoverflow.com/comment/41276164
has comment: http://stackoverflow.com/comment/41273234
type: Answer
has comment: http://stackoverflow.com/comment/41273746
score: 2
has comment: http://stackoverflow.com/comment/41274902
accepted answer of: http://stackoverflow.com/q/26302048
downvote count: 0
answers question: http://stackoverflow.com/q/26302048
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41275894
has comment: http://stackoverflow.com/comment/41273681
has body: This is invalid markup: <img src='<%#Eval("image_path")%>' onerror="this.src='assets/images/placeholder.png';" alt=""/> <%#Eval("product_line")%> <%#Eval("model")%> <%#Eval("serial_number")%> <img src='<%#Eval("display_status") %>'/> <%#Eval("date")%> <%#Eval("vehicle_number")%> There's an errant label as a child of a tr, which isn't valid. When the browser tries to make sense of this, it could be doing anything with that label to construct a valid DOM, which is going to effect your jQuery selectors. The label needs to be in a table cell: <img src='<%#Eval("image_path")%>' onerror="this.src='assets/images/placeholder.png';" alt=""/> <%#Eval("product_line")%> <%#Eval("model")%> <%#Eval("serial_number")%> <img src='<%#Eval("display_status") %>'/> <%#Eval("date")%> <%#Eval("vehicle_number")%> (Or, if it's always hidden anyway, you can probably put it in an existing table cell. Either way should work.) Additionally, if the client-side id is being explicitly set here, then any repetition of these records will result in duplicate ids in the DOM, which is also invalid. Different browsers respond to id-based selectors in different ways when there are duplicate ids, because the behavior is undefined. You probably want to use a class instead: <label class="vehicle_num" ... Since the label is no longer a child of the tr but rather a descendant of it, use find() instead of children(): $(this).closest('tr').find('.vehicle_num')
upvote count: 2

http://stackoverflow.com/q/26243202
answer count: 3
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41165168
favorite count: 0
has answer: http://stackoverflow.com/a/26243275
has body: I have 100 DIVS in an array called 'lights', appended to the page with a unique ID. Some of those DIVS are also in another array called 'frozen'. How can I change the background color of the DIVS in 'lights' but not the divs in the 'frozen' array? For example, to change all of the divs I would use: for(var l=0;l&lt;LIGHTS_NUMOF;l++){ $("#light"+l).css("background-color", "#ff0000"); } Generating the array: var LIGHTS_NUMOF = 100; var lights = []; for(var l=0;l&lt;LIGHTS_NUMOF;l++){ var newLight = $("&lt;div class=\"light\" id=\"light"+l+"\"&gt;&lt;/div&gt;"); $(".lights").append(newLight); lights.push(newLight); } However, this obviously changes ALL of the divs. How do I avoid changing the DIVS which are in the 'frozen' array? Ideally I would like to express lights.backgroundcolor = 'red' where DIV isn't 'frozen'. Adding DIV to 'frozen': $( ".light" ).click(function() { frozen.push(this); });
has comment: http://stackoverflow.com/comment/41165721
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41165279
score: 2
has answer: http://stackoverflow.com/a/26243435
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41165576
has comment: http://stackoverflow.com/comment/41165501
has comment: http://stackoverflow.com/comment/41165256
type: Question
has title: Change style for array of DIVS
has answer: http://stackoverflow.com/a/26243690
has comment: http://stackoverflow.com/comment/41165299

http://stackoverflow.com/q/26301184
has body: In mobile Safari (for example) if a user is on the full site and then switches to mobile, it persists the previous scale of the viewport. How can I force the browser to do a one-time forgetting of the memorized scale? I found this better-phrased question meant for android: How to reset viewport scaling without full page refresh? But I am seeing the same problem on iOS too, without hard refresh page scale never resets.
type: Question
score: 5
linked to: http://stackoverflow.com/q/5380385
has title: Can the viewport scale be reset without hard refresh?
tagged with: javascript
tagged with: mobile-safari
tagged with: viewport
favorite count: 0
upvote count: 5
type: UnansweredQuestion
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/41339690
type: Comment
type: QuestionComment
has text: Sorry, I'm struggling to understand your question. What exactly to you mean by "add an id to a variable"?
score: 1
comment on: http://stackoverflow.com/q/26338605

http://stackoverflow.com/q/26250545
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26250695
score: 0
has comment: http://stackoverflow.com/comment/41178495
has title: what does Uncaught SyntaxError: Unexpected token < mean?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41178441
type: UnansweredQuestion
has body: For this line of code : var result = eval('('+result+')'); In this context: function saveUser(){ alert(url); $('#fm').form('submit',{ url: url, onSubmit: function(){ return $(this).form('validate'); }, success: function(result){ var result = eval('('+result+')'); if (result.errorMsg){ $.messager.show({ title: 'Error', msg: result.errorMsg }); } else { $('#dlg').dialog('close'); // close the dialog $('#dg').datagrid('reload'); // reload the user data } } }); } How do i fix the error?
tagged with: php
has comment: http://stackoverflow.com/comment/41178461
upvote count: 2
downvote count: 2
tagged with: codeigniter

http://stackoverflow.com/a/26281584
score: 8
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26263132
answers question: http://stackoverflow.com/q/26263132
upvote count: 8
has body: You can use the Web Audio API to record the output of any Web Audio node, not just microphone input. If the webpage you want to record audio from is using the Web Audio API to generate sound, then you can definitely use the Web Audio API to record it (check out Recorder.js). If the sound is being played from html elements, you can turn it into a Web Audio node and record it. Check this out: http://updates.html5rocks.com/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41235436
type: Answer

http://stackoverflow.com/q/26342460
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/18871277
tagged with: javascript
has answer: http://stackoverflow.com/a/26342525
tagged with: angularjs
duplicate of: http://stackoverflow.com/q/18871277
has body: I need to add two classes through one ng-class definition One looks like {true: 'bar', false: ''}[someVar === 'bar'] And the other looks like {foo: someOtherVar === 'foo'} If I join them &lt;div ng-class="{true: 'bar', false: ''}[someVar === 'bar'],{foo: someOtherVar === 'foo'}"&gt; it doesn't work. What is the correct syntax ?
type: Question
possible better answer: http://stackoverflow.com/a/26342560
has answer: http://stackoverflow.com/a/26342537
has answer: http://stackoverflow.com/a/26342560
score: 0
answer count: 3
tagged with: ng-class
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/26342537
has title: AngularJs: ngClass with multiple statements

http://stackoverflow.com/comment/41240168
has text: It will not alert the innerHTML or href when left or right arrow keys are pressed, it will alert a string on arrow down but nothing when I use the dom selectors.
score: 0
comment on: http://stackoverflow.com/q/26284164
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41282667
comment on: http://stackoverflow.com/q/26307225
score: 0
type: QuestionComment
type: Comment
has text: i don't think you can "fix" this "problem" without reworking and controlling each page.

http://stackoverflow.com/comment/41236345
score: 0
type: Comment
type: QuestionComment
has text: What is that "debug method", Kevin B?
comment on: http://stackoverflow.com/q/26282239

http://stackoverflow.com/comment/41360883
comment on: http://stackoverflow.com/q/26350063
has text: remove the float, set the position to relative, and remove the overflow:hidden; I think the overflow:hidden is allowing the inner container to go outside of the bounds of the box.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26353119
has comment: http://stackoverflow.com/comment/41366125
has comment: http://stackoverflow.com/comment/41366786
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41368042
has comment: http://stackoverflow.com/comment/41365945
has comment: http://stackoverflow.com/comment/41366013
tagged with: javascript
has comment: http://stackoverflow.com/comment/41366028
favorite count: 0
has comment: http://stackoverflow.com/comment/41365911
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/41365958
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26353149
has comment: http://stackoverflow.com/comment/41366834
has body: I want to create a webpage with multiple forms and with each form having the same set of data like empid, empname, etc... Can i have multiple form and the id of each field same in each form(form id different).
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41365993
has comment: http://stackoverflow.com/comment/41366020
has title: Can one webpage have multiple form and elements with same id

http://stackoverflow.com/comment/41261696
type: Comment
type: QuestionComment
has text: Extending the *prototypes* of built-in objects is generally seen as bad practice except for shimming/polyfilling. But adding functions to non-prototypes (like `Math`) is pretty innocuous.
comment on: http://stackoverflow.com/q/26296097
score: 1

http://stackoverflow.com/q/26256217
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/28322623
type: UnansweredQuestion
tagged with: css
has body: I'm trying to do a responsive canvas. All my tests has been doing with a 600x600 canvas and with that height and width it works OK and paint every line correctly. The problem is that I have tried this: #myCanvas { background-color: #ffffff; border:1px solid #000000; min-height: 600px; height: 100%; width: 100%; } Just for the record, myCanvas is inside a sm-col-8. And it looks nice on my laptop and looks nice on my phone but (because of my draw() function, because it was thinking for a square) the draw starts more like in the down-left corner (nearby) and it should start at up-right corner. So, I don't want to change my draw() function but what I'm looking for is to reescale the canvas size. I mean: If I'm in a laptop/tablet.. with 600x600, show it at that size, but if I'm on my phone which has 384x640 show it like 300x300? I don't know if it could be a good solution. My draw function: function drawLines(lines,i,table,xtotal,ytotal){ var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var xIni; var xFin; var yIni; var yFin; xIni = (c.width*parseInt(lines[i][1])/xtotal); yIni = (c.height*parseInt(lines[i][2])/ytotal); xFin = (c.width*parseInt(lines[i][3])/xtotal); yFin = (c.height*parseInt(lines[i][4])/ytotal); ctx.beginPath(); ctx.moveTo(xIni,c.height-yIni); ctx.lineTo(xFin,c.height-yFin); ctx.lineWidth=4; ctx.strokeStyle = colorAleatorio(); ctx.stroke(); }
has answer: http://stackoverflow.com/a/26262963
score: 4
has title: Responsive Canvas in Bootstrap
tagged with: twitter-bootstrap-3
type: Question
upvote count: 4
tagged with: canvas
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41117768
comment on: http://stackoverflow.com/q/26218074
type: Comment
score: 1
has text: Isn't there a way to trigger the PA lookup itself through their API, rather than forcing a value change to trigger it? Would be surprised if you couldn't invoke it directly
type: QuestionComment

http://stackoverflow.com/a/26257806
score: 0
has body: you need to check the height of your inner-scroll div before moving like below so that whenever the top offset exceeds parent div offset it stops moving. if($(".inner-scroll").offset().top&gt;$('.scroll').offset().top){ //execute your code } demo
type: Answer
answers question: http://stackoverflow.com/q/26257270

http://stackoverflow.com/a/26247071
downvote count: 0
type: Answer
has body: It seems that value is a unique identifier, if that's the case you could store the "credit cards" in an object instead, like this: $scope.creditCards = { 'DEL': { name: 'VISA DEBIT/DELTA', transactionFee: false}, 'VIS': { name: 'VISA CREDIT', transactionFee: true }, 'MSC': { name: 'MASTERCARD CREDIT', transactionFee: true } }; And then you don't even need a function for checking if the Credit Card has a transactionFee, if you still want to have a function, that function would look like this: var hasTransFee = function(cardType){ return $scope.creditCards[cardType].transactionFee; }
answers question: http://stackoverflow.com/q/26246969
accepted answer of: http://stackoverflow.com/q/26246969
has comment: http://stackoverflow.com/comment/41174590
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/26424371
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26222176
answers question: http://stackoverflow.com/q/26222176
has body: As stated in the documentation you linked to, http://docs.amcharts.com/3/javascriptcharts/AmSerialChart#startEffect, the only effects that are available at this point in time are... easeOutSine easeInSine elastic bounce These are all bounce or slide in type graphs, they do not currently offer a join the dots type effect that you are wanting as yet.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26319298
answers question: http://stackoverflow.com/q/26319180
type: Answer
upvote count: 1
score: 1
has body: You have to use promise to make it convenient. function submitForm1 () { return $.ajax({ type:"POST", url: "/wp-admin/admin-ajax.php", data: $('#form1').serialize(), }); }); function submitForm2 () { return $.ajax({ type:"POST", url: "/wp-admin/admin-ajax.php", data: $('#form2').serialize(), }); }); submitForm2().done(function () { submitForm1(); });
has comment: http://stackoverflow.com/comment/41304071
downvote count: 0

http://stackoverflow.com/a/26319549
has comment: http://stackoverflow.com/comment/41304513
downvote count: 0
has comment: http://stackoverflow.com/comment/41305654
has body: You have two possibilities: [&amp;?]a=(.+?)(?:&amp;|$) [&amp;?]a=([^&amp;]+) So, either match non-greedily until you encounter a &amp; or the end of the string, or match greedily all characters except &amp;. Also, I've shortened your regex and made the group only capture the value of the a parameter, without the a= part. The .* are not needed, your regex doesn't have to match the whole string unless it's anchored with ^ and/or $. And that | in the character class was also wrong. Example with your test case: alert(JSON.stringify( /[&amp;?]a=([^&amp;]+)/.exec("http:/a.b.com/?a=123&amp;b=123") ))
accepted answer of: http://stackoverflow.com/q/26319530
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26319530
type: Answer
has comment: http://stackoverflow.com/comment/41304589
has comment: http://stackoverflow.com/comment/41304642
score: 1
has comment: http://stackoverflow.com/comment/41304482
upvote count: 1

http://stackoverflow.com/a/26300443
upvote count: 1
has body: It doesn't look like your listener method signature is correct. For Ext JS 4.2, the handler for the cellclick event takes the following arguments: this, td, cellIndex, record, tr, rowIndex, e, eOpts http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.Panel-event-cellclick Once you have the correct signature, you'll notice that the cellclick event also passes the record which is the model instance bound to the row on which the cellclick event occurred. You should be able to use this to easily retrieve the value from any field within your model instance without having to separately lookup the record from the store first...you already have it. Also, be sure to pay attention to the data types for the arguments. cellIndex, for example, is a Number, not an object.
answers question: http://stackoverflow.com/q/26299261
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/q/26242233
has title: "Not well formed JSON stream" when using moveto or copyto on file from SharePoint 2013 REST API
score: 1
has answer: http://stackoverflow.com/a/75765433
tagged with: sharepoint
type: Question
has answer: http://stackoverflow.com/a/29163443
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: rest
answer count: 3
has answer: http://stackoverflow.com/a/26876034
type: UnansweredQuestion
upvote count: 1
has body: I am trying to enable file move and copy operations on files in a sharepoint 2013 document library. I have the list and delete operations working but when I try to call /moveto(newfile=...,flags=1) or /copyto(strnewfile,boverwrite=true) I get an error "Not well formed JSON stream". I have tried the newurl (or strnewurl) both with and without the site prefix (e.g. /sites/dev). I have separately verified that getfilebyserverrelativeurl is in fact returning the file. Has anyone run into this before? function copyFile() { var executor = new SP.RequestExecutor(appweburl); executor.executeAsync({ url: appweburl + "/_api/SP.AppContextSite(@target)/web" + "/getfilebyserverrelativeurl('/sites/dev/Sample1/Customer.dim')" + "/copyto(strnewurl='/Sample1/filename.docx',boverwrite=false)" + "?@target='" + hostweburl + "'", method: "POST", headers: { "accept": "application/json;odata=verbose", "IF-MATCH": "*" }, success: function (data) { alert(JSON.stringify(data)); }, error: errorHandler }); } function moveFile() { var executor = new SP.RequestExecutor(appweburl); executor.executeAsync({ url: appweburl + "/_api/SP.AppContextSite(@target)/web" + "/getfilebyserverrelativeurl('/sites/dev/Sample1/Customer.dim')" + "/moveto(newurl='/Sample1/filename.docx',flags=1)" + "?@target='" + hostweburl + "'", method: "POST", headers: { "accept": "application/json;odata=verbose", "IF-MATCH": "*", "X-RequestDigest": $("#__REQUESTDIGEST").val() }, success: function (data) { alert(JSON.stringify(data)); }, error: errorHandler }); }
tagged with: sharepoint-2013

http://stackoverflow.com/q/26205143
has answer: http://stackoverflow.com/a/26206034
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4612255
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41093588
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
has title: jquery doesn't work in WebBrowser control with specific webpage
has answer: http://stackoverflow.com/a/26222198
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: webbrowser-control
favorite count: 0
has body: I'm trying to programmatically open the hidden div containing the bitrate information in this web page: http://www.myfreemp3.cc/mp3/jamie+jones+cookie+monster I'm using an hidden WebBrowser, in which i'm injecting and executing this code: $("[class^='bitrate butt bit']")[0].click(); but it doesn't work. If you put the code line above in the Firefox debugger's console it works... This is my code: webBrowser.Navigate("http://www.myfreemp3.cc/mp3/jamie+jones+cookie+monster"); waitTillLoad(webBrowser); //wait till the document finish to load string script = "function click_checkButtons () { $(\"[class^='controll_button playlist_button']\").click(); }"; HtmlElement head = webBrowser.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = webBrowser.Document.CreateElement("script"); IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement; element.text = script; head.AppendChild(scriptEl); webBrowser.Document.InvokeScript("click_checkButtons");

http://stackoverflow.com/comment/41186317
has text: @dcc I wanted a non-jQuery solution
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26254957
score: 0

http://stackoverflow.com/q/26299439
favorite count: 0
has body: I have a page with button and IFRAME. Inside IFRAME, I am loading a PDF file dynamically which is coming from different domain. when I try to print file using the button action I am getting the following error. Uncaught SecurityError: Blocked a frame with origin "http://localhost:8080" from accessing a frame with origin "http://www.cplusplus.com". Protocols, domains, and ports must match. If I load the pdf file from my local system I am to print it . I used the below code to print the iframe Pdf var iframe = document.querySelector("#unofficialtranscript"); iframe.focus(); iframe.contentWindow.print(); Any idea how I can print the file which is loaded into the iframe which is on another domain .
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
has title: Unable to print the pdf loaded in iframe
type: Question
has answer: http://stackoverflow.com/a/26299657
has answer: http://stackoverflow.com/a/26299534
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/19837354

http://stackoverflow.com/comment/41252178
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26290508
has text: Well if you are talking about speed, pop() is slower in chrome/ie than actually referencing the last index like you are doing.
score: 0

http://stackoverflow.com/a/26293997
answers question: http://stackoverflow.com/q/26293473
has body: Using jQuery : If $(element).attr("class").indexOf(' ') is not -1 then there are more than one class. function hasMultipleClasses(elem) { if(elem.attr("class").indexOf(' ')&gt;-1) return true; else return false; } DEMO
score: 0
type: Answer

http://stackoverflow.com/a/26300195
score: 1
type: Answer
has body: This is much more optimal way in any means: var short_trans = { 'Percent': '%', 'Number': '#', 'Invoice': 'Inv', 'Amount': 'Amt', 'Shipping': 'Ship', 'Production': 'Prod', 'Allocated': 'Alloc', 'Complete': 'Comp', 'Manager': 'Mgr' } $('label').each(function(){ if ($(this).height() &gt; 20) { var words = $(this).text().split(' '); for (var i in words) { if (short_trans[words[i]]) { words[i] = short_trans[words[i]]; } } $(this).text(words.join(' ')); } }); We once loop for any label tag, check if height &gt; 20, then split text into words loop each word and check if shorten version exists, if so replace it http://jsfiddle.net/wucd1mws/2/
upvote count: 1
answers question: http://stackoverflow.com/q/26299703
accepted answer of: http://stackoverflow.com/q/26299703
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41305863
type: Comment
has text: it's telling you there is no element with a `wrapper` id.
type: AnswerComment
comment on: http://stackoverflow.com/a/26290708
score: 0

http://stackoverflow.com/q/26262182
has answer: http://stackoverflow.com/a/26262317
tagged with: cryptojs
has title: reading encrypted object in javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26262317
score: 0
type: Question
tagged with: javascript
answer count: 1
has body: var token = "WMwiDeJrawUKHif7D5a8yd4ne6Mv"; var salt = "ERtrg56hfg5"; var key = CryptoJS.enc.Hex.parse('B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF'); var iv = CryptoJS.enc.Hex.parse('7E892875A52C59A3B588306B13C31FBD'); var encrypted = CryptoJS.AES.encrypt(token, key, { iv: iv }); context.setVariable("encryptedtoken", encrypted); but it is not setting to variable saying it is an object. what I need to do
has comment: http://stackoverflow.com/comment/41199498
has comment: http://stackoverflow.com/comment/41199416

http://stackoverflow.com/a/26308673
score: 1
has comment: http://stackoverflow.com/comment/41285260
has comment: http://stackoverflow.com/comment/41285285
downvote count: 0
has comment: http://stackoverflow.com/comment/41285728
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41285687
answers question: http://stackoverflow.com/q/26308187
has comment: http://stackoverflow.com/comment/41285783
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41285597
accepted answer of: http://stackoverflow.com/q/26308187
has body: for better browser support as you asked you can use pure CSS by using :first-child selector, since it is cross-browser and it is CSS 2.1, please see this link here and the table below that illustrates the browser support : so here is a snippet with CSS ONLY: .child:first-child { /*whatever CSS you want here -- just fot visualization and snippet :*/ background-color: red; color: white; } I want select this child and change it's css property. child 2 child 3 child 4

http://stackoverflow.com/q/26200588
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41087762
tagged with: xmlhttprequest
downvote count: 0
answer count: 0
linked to: http://stackoverflow.com/q/26205592
score: 1
has comment: http://stackoverflow.com/comment/41085383
type: Question
has comment: http://stackoverflow.com/comment/41086570
has comment: http://stackoverflow.com/comment/41094614
has comment: http://stackoverflow.com/comment/41093701
tagged with: javascript
tagged with: jquery
has body: I'm using a code similar to the simplified one below to search through several pages of posts on a forum website and then list the links in console. $(document).ready(function () { for(i = 0; i &lt;= 735; i += 15) { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + i, true); xhrs.onreadystatechange = function() { if (this.readyState == 4) { $(this.responseText).find('a').each(function() { var url = $(this).attr('href'); console.log(url); }); } } xhrs.send(); } } The problem is that sometimes I'll get errors like this in console: Resource interpreted as Image but transferred with MIME type text/html: "dailydawdle.com/". Error: GET http://puu.sh/4Ueom.png 404 (Not Found) 4Ueom.png:1 Error: GET http://thisUrlIsTooLong.jpg 403 (Forbidden) cellphonebuyers large verge super wide.jpg:1 These errors usually don't stop the code from finishing the list of urls, but one time it exited the webpage and went to a red screen in chrome that said something like 'security error'. Why do these errors occur and how do I stop them? Even if I only search each page for links that begin with a certain string I get these errors. I'm saying that even if I replace find('a') with find("a[href^='http://forum.posts/']") so that only the forum's links are searched through, I still get errors with outsider website links (posted by people in the forum probably) and sometimes a red warning page that says 'security error'. Why am I getting errors on links that don't even begin with the string I specified to search for?
tagged with: security
upvote count: 1
has title: XMLHttpRequest getting Errors and Security Issues

http://stackoverflow.com/q/26324064
upvote count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3
has comment: http://stackoverflow.com/comment/41312771
has answer: http://stackoverflow.com/a/26324127
has title: AJAX http GET request
favorite count: 0
has answer: http://stackoverflow.com/a/26324131
accepted answer: http://stackoverflow.com/a/26324131
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26324202
has body: I'm currently teaching myself some AJAX through jQuery. I've written a straight forward get request to load in data from an xml file into a section with a class of container. Here is my html file: I am using a local xml file after i created to dummy post on a WordPress site and got the feed. Here is the xml file: <?xml version="1.0" encoding="UTF-8"?> Biz-Tech.ie » Biz-Tech News <atom:link href="http://www.biz-tech.ie/category/biz-tech-news/feed/" rel="self" type="application/rss+xml" /> http://www.biz-tech.ie Sat, 11 Oct 2014 17:39:16 +0000 en-US <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> http://wordpress.org/?v=4.0 News http://www.biz-tech.ie/news/ http://www.biz-tech.ie/news/#comments Sat, 11 Oct 2014 17:39:16 +0000 <dc:creator> Michael </dc:creator> Biz-Tech News http://www.biz-tech.ie/?p=170 Output Box – Random strings/passwords will display here. Load objects used for random string generation into the “Object Input Box” above. Objects above can be characters, words, sentences, etc. Test by clicking the “Generate random strings” button above to generate 10, 14 character, random strings from the default input objects. NOTICE: Tool uses Javascript method Math.random() pseudorandom generator to obtain […] <content:encoded> Output Box – Random strings/passwords will display here. Load objects used for random string generation into the “Object Input Box” above. Objects above can be characters, words, sentences, etc. Test by clicking the “Generate random strings” button above to generate 10, 14 character, random strings from the default input objects. NOTICE: Tool uses Javascript method Math.random() pseudorandom generator to obtain random string. Do not use for critical random results. Privacy of Data: This tool is built-with and functions-in Client Side JavaScripting, so only your computer will see or process your data input/output. </content:encoded> <wfw:commentRss>http://www.biz-tech.ie/news/feed/</wfw:commentRss> <slash…
possible better answer: http://stackoverflow.com/a/26324127
type: Question

http://stackoverflow.com/a/26217888
has body: Your glyphicon span should have the following class: glyphicon glyphicon-align-justify as opposed to just glyphicon-align-justify
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26217701
answers question: http://stackoverflow.com/q/26217701
score: 4
upvote count: 4

http://stackoverflow.com/q/26260861
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26261374
has comment: http://stackoverflow.com/comment/41197216
possible better answer: http://stackoverflow.com/a/26261384
has comment: http://stackoverflow.com/comment/41197271
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41197367
has comment: http://stackoverflow.com/comment/41197162
type: Question
has comment: http://stackoverflow.com/comment/41197103
has comment: http://stackoverflow.com/comment/41197045
has comment: http://stackoverflow.com/comment/41197328
tagged with: javascript
has comment: http://stackoverflow.com/comment/41197307
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41197355
has answer: http://stackoverflow.com/a/26261374
has title: AngularJS text input with ng-model but needs default value not working with value= or ng-init=
has comment: http://stackoverflow.com/comment/41197108
has answer: http://stackoverflow.com/a/26261384
has body: I have an account form with many inputs. One of them below: &lt;input class="form-control " placeholder="First Name" type="text" ng-model="account.first_name" ng-init="account.first_name=user.account.first_name"&gt; I have a service in my controller that returns all of the user's information. I'm trying to, in inputs, show the current information on file. I want this in an input so they can also change (update) it. However, when I set value="{{user.account.first_name}}" which is returned by my API from my service and set equal to $scope.user, it shows nothing in the input. I searched for answers on SO and found a few that suggested ng-init, which still didn't work. I've also tried ng-bind, ng-value, and putting these before I set ng-model. How can I do this? Edit: Here is my account controller. The service just has return $http.get('/api/account'); app.controller('AccountCtrl', function($scope, Account) { Account.show() .success(function(data) { $scope.user = data; }); data is a JSON schema like so: {"account": {}, "documents": {}} But with data inside.
has comment: http://stackoverflow.com/comment/41196965
has comment: http://stackoverflow.com/comment/41197236

http://stackoverflow.com/a/26297716
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26297483
downvote count: 0
has body: Try row.packed = parseInt(row.packed, 10) + parseInt(row.newquantity, 10);

http://stackoverflow.com/a/26329268
answers question: http://stackoverflow.com/q/26329237
type: Answer
score: 2
downvote count: 0
has body: If you want to modify an input field in javascript, you can simply set the value attribute: document.getElementById('answer').value = "First Number: " + a + " plus Second Number: " + b + " is " + sum;
upvote count: 2

http://stackoverflow.com/comment/63233050
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26284123
has text: Don't do what i just did for an hour: make sure the URL part of `toDataURL()` is capitalized. I was positive all my code was correct but still getting this error....because `toDataUrl()` with lowercase Url isn't actually a function no matter how hard one may believe it is, haha.
type: Comment

http://stackoverflow.com/comment/41325443
comment on: http://stackoverflow.com/a/26330763
score: 0
type: AnswerComment
has text: is the aPerson.name a defined property (aka is it a published property on the Person instance) in this example? (I don't at all know coffeescript)
type: Comment

http://stackoverflow.com/a/26341963
score: 0
has comment: http://stackoverflow.com/comment/41346156
has comment: http://stackoverflow.com/comment/41347272
has comment: http://stackoverflow.com/comment/41346182
has comment: http://stackoverflow.com/comment/41346287
has comment: http://stackoverflow.com/comment/41346259
answers question: http://stackoverflow.com/q/26341842
has body: You can use objects as data points, but you cannot use custom names. It should be something like {y:10, name: 'yourname'}. So only what you need is use your mapped objects in correct structure.
has comment: http://stackoverflow.com/comment/41346402
has comment: http://stackoverflow.com/comment/41347243
type: Answer
has comment: http://stackoverflow.com/comment/41346819
has comment: http://stackoverflow.com/comment/41346765
has comment: http://stackoverflow.com/comment/41347491
has comment: http://stackoverflow.com/comment/41346457

http://stackoverflow.com/q/26302538
has body: I have this html block at an aspx page: &lt;td class="NormalBold"&gt; &lt;asp:TextBox runat="server" ID="txtSendSummary" ClientIDMode="Static" CssClass="NormalTextBox" style="width: 170px;" Enabled="False" &gt;&lt;/asp:TextBox&gt; &lt;asp:RegularExpressionValidator ID="txtSendSummaryValidEmail" runat="server" ClientIDMode="Static" ControlToValidate="txtSendSummary" ErrorMessage="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/&gt; &lt;/td&gt; I tried to reset the "*" with : document.getElementById('txtSendSummaryValidEmail').value = ""; But still "*" is there! How i can reset this span of the validator? Thanks in advance!
type: AnsweredQuestion
score: 2
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26302763
has title: How to reset this span's text generated from a regularExpressionValidator at asp with javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26302763
tagged with: asp.net
favorite count: 0
upvote count: 2

osx-mavericks
type: Tag
tag name: osx-mavericks
tags question: http://stackoverflow.com/q/26237024

http://stackoverflow.com/q/26198296
type: AnsweredQuestion
has title: How to use multiple classes with ng-class?
accepted answer: http://stackoverflow.com/a/26198321
has comment: http://stackoverflow.com/comment/41081273
score: 1
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41081228
has body: I have a layer with ng-class, and I need to use user.status with ng-class. and I have another class that I want to bind on the same layer. &lt;div ng-class="user.status, 'locked':(user.active === '0')"&gt; but whats the correct way of doing this? somehow it does not work.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26198321
upvote count: 1

http://stackoverflow.com/comment/41246816
type: Comment
comment on: http://stackoverflow.com/a/26287566
has text: @Full-Hybrid: If you don't need the `<a href..>`s and ` `s I can change the two input fields so that your example should work without them.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26341189
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26340404
answers question: http://stackoverflow.com/q/26340404
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41352605
score: 2
has body: In fact you can only do this using native JS. jQuery does not support methods to deal with CSS rules traversing. Firstly you have to loop through all the document.styleSheets, in each sheet, you have to loop through all the sheet.cssRules. Each CssRule has a property called selectorText, you can get this and compare against your rule text. However you need to care about the order of identifiers in the selector path here. Here is the demo code: var rulesChecker = { compactRuleText: function(text) { return text.replace(/[.#][^ +~&gt;]+/g, function(m){ return m.split(/([.#][^.#]+)/).sort().join(''); }) .replace(/(\s*?[&gt;+~]\s*|\s+?(?=\s))/g, function(m){ return m.trim(); }); }, ruleExistence : [], init : function(){ var sheets = document.styleSheets; for(var i = 0; i &lt; sheets.length; i++){ var rules = sheets[i].cssRules || sheets[i].rules; for(var j = 0; j &lt; rules.length; j++){ var a = this.compactRuleText(rules[j].selectorText); this.ruleExistence[a] = true; } } }, ruleExists : function(ruleText) { var key = this.compactRuleText(ruleText); return (key in this.ruleExistence); } }; rulesChecker.init(); //your rule text, note about the extra spaces and how close the identifiers are ... //this in fact should match the rule in the CSS code (which is normally written) var ruleText = ".f+.a.b#e &gt; .d .k"; //ruleText = ".c"; alert(rulesChecker.ruleExists(ruleText)); Demo.

http://stackoverflow.com/comment/41169132
has text: can you post the "combined" code the gave you this error? on it's own, the 2nd snippet should be fine
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26245154

http://stackoverflow.com/comment/41120477
comment on: http://stackoverflow.com/q/26215434
type: Comment
has text: .live is deprecated!!! Use .on
score: 0
type: QuestionComment

http://stackoverflow.com/q/26209892
tagged with: css
linked to: http://stackoverflow.com/q/22001305
has comment: http://stackoverflow.com/comment/41102936
has answer: http://stackoverflow.com/a/26210076
type: Question
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/26201424
answer count: 1
tagged with: web
has body: Following is the code of my jsp where there are two input fields regNo and studentName. I want the user to enter only numbers in regNo field. It should not contain any spaces and the length of the digits should be only 12. I added the check for characters and I added CSS and now my Search button isn't working. Only numbers are allowed OR
has title: Why does the search button in my jsp code not work?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26250810
possible better answer: http://stackoverflow.com/a/26251880
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26311582
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: three.js
has body: I had loaded 3 external model with the name into my scene using json loader and now i want to get the name of the model/object by clicking it. Below is the that i had used to load the model var object_material = new THREE.MeshBasicMaterial({ color: 0xd6d6d6, side: THREE.DoubleSide }); var loader = new THREE.JSONLoader(); loader.load("models/"+file, function(geometry, object_material) { var object = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(object_material)); model = new THREE.Object3D(); model.id=file; model.name='sample'+file; model.userData.id='sampledata'+file; model.add(object); model.position.set(obj_x,obj_y,obj_z); model.mirroredLoop = true; model.castShadow = true; model.receiveShadow = true; scene.add(model); } ); Below is my mouse down function function onMouseDown(event) { event.preventDefault(); mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1; var vector = new THREE.Vector3( mouse.x, mouse.y, 1 ); projector.unprojectVector( vector, camera ); var pLocal = new THREE.Vector3(0, 0, -1); var pWorld = pLocal.applyMatrix4(camera.matrixWorld); var ray = new THREE.Raycaster(pWorld, vector.sub(pWorld).normalize()); // Get meshes from all objects var getMeshes = function(children) { var meshes = []; for (var i = 0; i &lt; children.length; i++) { if (children[i].children.length &gt; 0) { meshes = meshes.concat(getMeshes(children[i].children)); } else if (children[i] instanceof THREE.Mesh) { meshes.push(children[i]); } } return meshes; }; function attributeValues(o) { var out = []; for (var key in o) { if (!o.hasOwnProperty(key)) continue; out.push(o[key]); } return out; } var objects = attributeValues(this.o3dByEntityId); var meshes = getMeshes(objects); var intersects = ray.intersectObjects(meshes); raycaster.set( camera.position, vector.sub( camera.position ).normalize() ); var intersects = raycaster.intersectObjects( scene.children ); console.log(scene); // this console displays all the …
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26311582
upvote count: 2
has answer: http://stackoverflow.com/a/26251880
has title: three.js - get object name with mouse click
type: Question

http://stackoverflow.com/a/26200647
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26196772
has body: Ha, I finally got it! You have to tell the model to use timestamps like this: var User = bookshelf.Model.extend( { tableName: "users", hasTimestamps: true } );
answers question: http://stackoverflow.com/q/26196772
upvote count: 22
has comment: http://stackoverflow.com/comment/123421968
type: AcceptedAnswer
score: 22

http://stackoverflow.com/comment/41083455
has text: Thank you again. I marked your answer as correct, as it is. It seems I'm running into some other issues related to the framework I'm using (MeteorJS) and how it currently handles traditional ObjectID's. After attempting your last suggestion, I'm getting ReferenceError: ObjectID is not defined, which led me to this: http://stackoverflow.com/questions/11979403/meteor-collection-update-with-traditional-id I'm going to work on this some more, but that has to be the issue. Thank you... like, a lot, for continuously commenting and your detailed answer. Your details in the answer are VERY helpful
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26199283

http://stackoverflow.com/a/26226714
answers question: http://stackoverflow.com/q/26225911
score: 2
has comment: http://stackoverflow.com/comment/41161724
has comment: http://stackoverflow.com/comment/41135110
has comment: http://stackoverflow.com/comment/41139771
has comment: http://stackoverflow.com/comment/41134761
has comment: http://stackoverflow.com/comment/41171036
has comment: http://stackoverflow.com/comment/41152084
has comment: http://stackoverflow.com/comment/41167699
has comment: http://stackoverflow.com/comment/41180096
has comment: http://stackoverflow.com/comment/41166535
downvote count: 0
has comment: http://stackoverflow.com/comment/41135142
upvote count: 2
has body: Try adding this: exports.createAuthor = function(req, res) { if(req.method == 'POST' &amp;&amp; req.url = 'REQUESTEDURL'){ console.log('POST REQUEST INCOMING!!! '+req.body); async.waterfall([ //TODO... ]); } Maybe the problem is that the favicon or some other resource is doing a request to
type: Answer
has comment: http://stackoverflow.com/comment/41135223

http://stackoverflow.com/comment/41100874
type: Comment
comment on: http://stackoverflow.com/q/26208960
type: QuestionComment
has text: The code above I wrote entirely myself other than the line for #4 which I copy-pasted from an SO answer, so I understand all of it except one line, I'm trying to understand that one line really.
score: 0

http://stackoverflow.com/q/26224988
score: 0
has comment: http://stackoverflow.com/comment/41131832
tagged with: session
has comment: http://stackoverflow.com/comment/41131472
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
has answer: http://stackoverflow.com/a/26225156
has body: I wrote a small jQuery code that will display a dialog box if the page is not refreshed for 1800 seconds. The dialog has a countdown before the session automatically ends. If the user click "Yes, Keep working" then the counter resets and the dialog disappears. Otherwise the user is transferred to the logout page. The issue that I am having here is when a user opens a new browser's tab and continue working on the new tab. Then the old tab will become idle "after 1800 seconds with no refresh" so they loose all their sessions and get logged out. I have created a PHP page that will return how many seconds remaining by checking the time in the database using $_SESSION information. But I am not sure how I can reset the counter of when the dialog opens up. I am not sure how can I modify my code to check the actual seconds remaining before the dialog box is displayed. Here is my code &lt;!-- This script will alert a user before forcing to logout --&gt; &lt;script type="text/javascript"&gt; var timer; var closeDialogAfter = 180; //The default counter value var idleTimeOutLimit = 1800 - closeDialogAfter; //Display the dialog after @idleTimeOutLimit seconds of idle time var signOutScript = '/index.php?action=logout'; //logout url var keepAliveScript = '/ajax/handler-keep-me-alive.php'; //php page to handle ajax request to keep the session alive var dialogCountdown = '#dialog-countdown'; // the lable that is used to display the counter var idleTimeout= '#idleTimeout'; //the div that is used for the dialog $(function(){ //start the idle time out counter startTimeoutCounter(); $( idleTimeout ).dialog({ resizable: false, autoOpen: false, width: 400, open: function(){ updateTimeoutCounter(); }, buttons: { "Yes, Keep working": function(e) { $.ajax({ url: keepAliveScript, success: function(data) { startTimeoutCounter(); $( idleTimeout ).dialog("close"); } }); }, "No, End Session": function(e){ forceLogOut(); $(this).dialog('close'); } } }); }); function startTimeoutCounter(){ timer =…
has title: How to change the setTimeout() counter using an ajax request?
has comment: http://stackoverflow.com/comment/41131754
has comment: http://stackoverflow.com/comment/41131767
type: Question
has comment: http://stackoverflow.com/comment/41131701
has answer: http://stackoverflow.com/a/26227037
answer count: 2
tagged with: php

http://stackoverflow.com/comment/41344045
comment on: http://stackoverflow.com/q/26315885
score: 0
type: Comment
type: QuestionComment
has text: i have written the complete Java and Javascript code. Even created fiddle. Still my code is not working, that is why i have posted the question. If there is something wrong in my code than please point it. I asked no one to give me complete code.

http://stackoverflow.com/comment/41090822
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26202389
type: Comment
has text: AFAICT, a work around for a feature that is not implemented is to grab the source code and implement the feature.

http://stackoverflow.com/a/26273806
has body: You can use square bracket notation to get variable variables. Provided these variables are defined in the window scope: function updateCommission(period){ $("input:text[name='commission']").val(window['commision_' + period]); } Having said that, defining numbered variables (all the way up to 2000..!?) isn't a good idea. An array was born to serve this purpose. My best answer would be to request these variables be re-written as an array, but I appreciate this is often easier said than done.
upvote count: 6
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26273710
downvote count: 0
answers question: http://stackoverflow.com/q/26273710
type: Answer
score: 6

http://stackoverflow.com/comment/41125086
type: QuestionComment
comment on: http://stackoverflow.com/q/26207916
score: 1
has text: In Postman you want to use `x-www-form-urlencoded` body.
type: Comment

http://stackoverflow.com/comment/41327584
type: QuestionComment
has text: what is your use case and why are you against using ajax?
comment on: http://stackoverflow.com/q/26331908
score: 1
type: Comment

http://stackoverflow.com/q/26223060
has answer: http://stackoverflow.com/a/26224288
has comment: http://stackoverflow.com/comment/41128256
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26224330
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Unexpected results with a menu at different browser sizes
has answer: http://stackoverflow.com/a/26224330
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41128840
has body: So I have been having some of the strangest errors that I think are because of the fact that I am manipulating an element using jquery at one browser size and expecting css to pick up the slack at a different browser size. Go here: http://jsbin.com/vipizukarobi/2 Resize the browser - Menu should leave (&lt; 768px), Box with Open should appear. Click nothing. Resize the browser (> 768) Box with Open should leave, menu is back. Repeat step one. Click Open - Watch magic. Issues: Resize the browser with the menu open (> 768px) after clicking "open" the box with the x will go away, ok. Now resize back down, the box with the x re-appears. This should not happen, the menu should disappear. The box with "Open" should re-appear, and you should have to "start over". Refresh the page, shrink the browser, click open, click the x after everything finishes. Resize the browser. Where is my menu. Why is the "Open" still on the page. Additional Issue Theres an additional error I cannot replicate with this fiddle, the issue is that when the x slides in, its a 32x32 box, it feels like the box slides in at 32x28 and then when it finishes sliding it it adds the additional 4 pixels making it look like if you walked into a room sideways holding a scrunched up towel and then when you finished walking in, let the towel drop to be full length (it looks broken) I cant replicate that here and I am using the same html, css and jquery. So it might be a conflicting library(?) - what would cause that?
possible better answer: http://stackoverflow.com/a/26224288
tagged with: css

http://stackoverflow.com/q/26275123
type: Question
score: -2
has body: I have this code that calls buy.php and makes a purchase and shows results. store.php Result: function buy(id) { $.ajax({ method: "GET", URL: "buy.php?id="+id+"", success: function (data) { $(".result").html(data); } }); } buy.php (after many check finally) echo 'Purchase Successful!'; OR echo 'Purchase Failed!'; When store.php calls buy.php I do get This shows that Jquery do makes a get request not to buy.php but to the page itself (store.php) and when i call the buy function the content on the current page duplicates. Why its doing so? Any Help?
tagged with: javascript
has answer: http://stackoverflow.com/a/26275180
answer count: 3
upvote count: 0
tagged with: jquery
has title: Jquery Get Response Data Error
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
accepted answer: http://stackoverflow.com/a/26275180
has answer: http://stackoverflow.com/a/26275205
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26275241
downvote count: 2
possible better answer: http://stackoverflow.com/a/26275205
tagged with: forms

http://stackoverflow.com/q/26206309
has comment: http://stackoverflow.com/comment/41128674
downvote count: 0
has comment: http://stackoverflow.com/comment/41165566
tagged with: ghostscript
favorite count: 0
has title: How to spawn ghostcript into node.js environment
has answer: http://stackoverflow.com/a/27609200
possible better answer: http://stackoverflow.com/a/42579432
has comment: http://stackoverflow.com/comment/41096242
has answer: http://stackoverflow.com/a/42579432
has comment: http://stackoverflow.com/comment/41096638
has comment: http://stackoverflow.com/comment/41096771
has comment: http://stackoverflow.com/comment/41099513
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27609200
type: AnsweredQuestion
score: 1
tagged with: process
upvote count: 1
type: Question
tagged with: spawn
has body: I have tried different configuration, but I cannot seem to succeed to execute "gs" (Ghostscript) in a node.js environment. var fs = require( "fs" ), child_process = require( 'child_process' ); ... var spawn = child_process.spawn; var opts = [ "-q ", "-dQUIET ", "-dSAFER ", "-dBATCH ", "-dNOPAUSE ", "-dNOPROMPT ", "-dMaxBitmap=500000000 ", "-dAlignToPixels=0 ", "-dGridFitTT=2 ", "-sDEVICE=jpeg ", "-dTextAlphaBits=4 ", "-dGraphicsAlphaBits=4 ", "-r150 ", "-sOutputFile=afile.jpg", " afile.pdf" ]; var gs = spawn( "gs", opts, { cwd: "/mnt/drive/" } ); gs.stdout.on( 'data', function( data ) { console.log( 'stdout: ' + data ); } ); gs.stderr.on( 'data', function( data ) { console.log( 'stderr: ' + data ); } ); gs.on( 'close', function( code ) { console.log( 'child process exited with code ' + code ); } ); ---Output --------------------------------------------------------- stdout: Unknown device: jpeg stdout: Unrecoverable error: undefined stdout: in .uninstallpagedevice stdout: Operand stack: defaultdevice stdout: child process exited with code 1 ------------------------------------------------------------------- The /mnt/drive directory is +read+write for all users. The gs -help execution returns: root@Machine:/# gs -help GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. Usage: gs [switches] [file1.ps file2.ps ...] Most frequently used switches: (you can use # in place of =) -dNOPAUSE no pause after page | -q `quiet', fewer messages -g&lt;width&gt;x&lt;height&gt; page size in pixels | -r&lt;res&gt; pixels/inch resolution -sDEVICE=&lt;devname&gt; select device | -dBATCH exit after last file -sOutputFile=&lt;file&gt; select output file: - for stdout, |command for pipe, embed %d or %ld for page # Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF Default output device: bbox Available devices: ... ijs imagen inferno inkcov iwhi iwlo iwlq jetp3852 jj100 jpeg jpegcmyk jpeggray la50 la70 la75 la75plus l…
tagged with: javascript
has comment: http://stackoverflow.com/comment/41098788
has answer: http://stackoverflow.com/a/75529358
answer count: 3

http://stackoverflow.com/q/26287140
has comment: http://stackoverflow.com/comment/41246022
has answer: http://stackoverflow.com/a/26287260
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41246298
has title: Transform parts of JSON string output to boolean
possible better answer: http://stackoverflow.com/a/26287260
type: AnsweredQuestion
has body: Is there any way to convert some parts of JSON string to booleans ? My JSON string example: { "file_id": { "width": "560", "height": "270", "esc_button": "1", "overlay_close": "1", "overlay_opacity": "1" } } If this was my personal project, I believe I would just convert the output of booleans into true/false strings and not 1 and 0, but since it isn't I wonder if there is a way to set what properties from JSON string are booleans. In this example booleans should be: esc_button, overlay_close but not overlay_opacity... So since this is JavaScript project, I wonder what are my options and is there any easy way to do this ? There are more settings from this JSON string, I just posted part of it. Settings change depending on click event (different file_id === different settings) EDIT: Just figured I could use parseInt(settings[file_id].esc_button) to get boolean, but do I really have to use that all the time ? There might be other ways that I am not aware of.
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26287267
accepted answer: http://stackoverflow.com/a/26287267
tagged with: javascript

http://stackoverflow.com/comment/41170619
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26242423
type: Comment
has text: Or this line clear every child `$('#interest_type_container').children().remove()`

http://stackoverflow.com/comment/41328771
has text: Or, even better, create a working code snippet.
comment on: http://stackoverflow.com/q/26332481
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41234955
has text: Better, except: 1. `.sort` isn't a supported jQuery function, 2. there's no need to `detach` - each node will be detached automatically when they're appended.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26281179

http://stackoverflow.com/a/26289408
has comment: http://stackoverflow.com/comment/41250624
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26289344
downvote count: 0
has comment: http://stackoverflow.com/comment/41250089
score: 3
has body: timeago doesn't automagically set a timer to update your HTML. You'll have to use setInterval to create a timer that will update the time stamp. Example: // Insert your HTML: $("#centerDiv").prepend("&lt;div id='postInner'&gt;&lt;div id='timeStamp'&gt;&lt;/div&gt;&lt;/div&gt;") // Get the timestamp: var msgDate = new Date(); // Update now, and again every minute: updateTimeStamp(); setInterval(updateTimeStamp, 60000); function updateTimeStamp() { // Update the text with the elapsed time: var timeAgo = jQuery.timeago(msgDate); $("#timeStamp").text(timeAgo); }

http://stackoverflow.com/q/26306887
tagged with: unit-testing
type: Question
has answer: http://stackoverflow.com/a/26307040
has answer: http://stackoverflow.com/a/26307054
accepted answer: http://stackoverflow.com/a/26307054
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26309192
tagged with: mocha.js
answer count: 3
has title: What is the purpose of Mocha's before() function?
favorite count: 0
has comment: http://stackoverflow.com/comment/41281766
has body: Mocha has several 'hooks' to run assistive functionality in a test separate from the test cases themselves (clearing databases, creating mock files, etc). However, in the case of before() (not beforeEach(), that one I get), it seems pretty redundant. before() runs the logic once before all of the tests in the current suite, so why do I need to even wrap it in a function? There's no observable difference between the two following: describe('Something', function() { before(doSomePreTestLogic); //Tests ahoy }); and describe('Something', function() { doSomePreTestLogic(); //Tests ahoy }); What's the point of wrapping my pre-test logic with before()?
downvote count: 2
has answer: http://stackoverflow.com/a/26309192
type: AnsweredQuestion
upvote count: 19
score: 17

http://stackoverflow.com/q/26305628
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: tags
has answer: http://stackoverflow.com/a/26305811
has comment: http://stackoverflow.com/comment/41279553
type: Question
has comment: http://stackoverflow.com/comment/41279327
has answer: http://stackoverflow.com/a/26305844
has comment: http://stackoverflow.com/comment/41279630
has comment: http://stackoverflow.com/comment/41279444
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41279449
has comment: http://stackoverflow.com/comment/41279522
has body: I would like to get the value of a tag after clicking on it. I just use javascript and no jquery. Here's my html : 1 2 3 I need the values 1,2,3, etc... into a variable. The div's work like a calculator button ! Thanks !
accepted answer: http://stackoverflow.com/a/26305844
answer count: 3
has title: Get the value of a tag with javascript
has comment: http://stackoverflow.com/comment/41279500
linked to: http://stackoverflow.com/q/19451144
favorite count: 0
possible better answer: http://stackoverflow.com/a/26305801
has comment: http://stackoverflow.com/comment/41279332
has answer: http://stackoverflow.com/a/26305801

http://stackoverflow.com/q/26243576
has comment: http://stackoverflow.com/comment/41166073
favorite count: 0
has comment: http://stackoverflow.com/comment/41166247
has comment: http://stackoverflow.com/comment/41166028
has comment: http://stackoverflow.com/comment/41166446
has comment: http://stackoverflow.com/comment/41166083
has title: Submit a two dimensional array in javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26243750
accepted answer: http://stackoverflow.com/a/26243750
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41166157
tagged with: javascript
score: -1
has body: checkdata['attendance_batch'] = [ {user_id_c: 'abcda', ispresent: 0}, {user_id_c: 'abxcda', ispresent: 2}, {user_id_c: 'abctda', ispresent: 1} ] I want my array in the above mentioned format in javascript MY HTML: " + entry["name"] + " Present Absent $("#frmattendance").submit(function(event) { event.preventDefault(); $form = $(this); var a = {}; var paramString = []; $($form).find(':input').each(function() { //console.log($(this).attr('name')); if ($(this).val() == 'Mark') { } else { a[{user_id_c: $(this).attr('iduser'), ispresent: $(this).val()}]; // console.log(a[$(this).attr('name')]); } }); var $sessiondata = sessionStorage.sessionid; $.ajax ({ type: "POST", url: saverecordurl + 'pcc_attendance', dataType: 'json', async: false, // session_id: $sessiondata, //json object to sent to the authentication url data: {checkdata: a, session_id: $sessiondata}, success: function(response) { //console.log(response); if (response.id !== null) { alert("You have successfully marked the attendance"); $.mobile.changePage("#eventdetails", { transition: "slide", reverse: true, changeHash: true }); } }, error: function(result) { $.mobile.changePage("#one", { transition: "slide", reverse: false, changeHash: true }); } }) }); Could someone help me with the format am i making a mistake?
upvote count: 0
answer count: 1
tagged with: arrays

http://stackoverflow.com/q/26219899
has answer: http://stackoverflow.com/a/26805048
accepted answer: http://stackoverflow.com/a/26220691
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41122008
possible better answer: http://stackoverflow.com/a/26805048
has comment: http://stackoverflow.com/comment/41121467
type: Question
tagged with: alert
has title: How do I get a variables value to be constantly decreased when operated on (+/- the requested change) (in javascript:alert boxes))
has comment: http://stackoverflow.com/comment/41121440
has body: &lt;script&gt; var x = 40 function ale() { a = document.getElementById("find").value if (a == 'Spark' || a == 'Fire') { var monster = x var damage = Math.floor(Math.random() * 10) alert('Enemy has ' + (monster - damage) + ' Health!'); } else if (a == 'water' || a == 'bubble') { var monster = x var damagew = 10 alert('Enemy has ' + (monster - damagew) + ' Health!') } Hi so what happens is whenever I type for example water the health of what x was 40 is now 30 but now I click it again and it tells me its the same thing 30 when I want to be 20 and then if I type fire for it to give me 20 - Math.floor(Math.Random()*10) to give something like 17 pretty much how my text based game works. But as for now it just keeps giving me 30 everytime I write water. Is it possible to get the x value working where it can constantly be edited then maintain its value after its been edited by for example a subtraction?
has answer: http://stackoverflow.com/a/26220691
answer count: 2
has comment: http://stackoverflow.com/comment/41122937
tagged with: javascript
has comment: http://stackoverflow.com/comment/41121375
tagged with: variables
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41121400

http://stackoverflow.com/comment/41315354
type: Comment
has text: @TJ: I've opened a discussion over on Meta, if you feel I was wrong in my actions (or simply want to observe the discussion): http://meta.stackoverflow.com/questions/274311/how-to-deal-with-check-my-answer-see-my-answer-comments
comment on: http://stackoverflow.com/q/26325035
type: QuestionComment
score: 0

http://stackoverflow.com/a/26298972
has comment: http://stackoverflow.com/comment/41268686
downvote count: 0
score: 3
has body: It is a default behavior. Basically controller is function used to argument Angular Scope. So it need to be called each time the page associated with the controller is opened. Each time your page is navigated angular will create new scope.
accepted answer of: http://stackoverflow.com/q/26298766
answers question: http://stackoverflow.com/q/26298766
has comment: http://stackoverflow.com/comment/41267404
type: AcceptedAnswer
upvote count: 3
type: Answer

http://stackoverflow.com/comment/82541946
comment on: http://stackoverflow.com/a/47790275
score: 4
type: AnswerComment
type: Comment
has text: Welcome to Stackoverflow. It would be better if you checkout [How to Answer](https://stackoverflow.com/help/how-to-answer) page for future endeavor at Stack overflow. -Thank you

http://stackoverflow.com/comment/41249236
type: Comment
comment on: http://stackoverflow.com/a/26288911
score: 1
type: AnswerComment
has text: `check` is undefined when the if conditional is executed, therefore the if condition fails.

http://stackoverflow.com/q/26210801
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41104904
tagged with: android
has body: I am working on an online Cordova app. I need to display an image from the SD card in the app. But when I give the path in image src attribute, I get the following error : "Not allowed to load local resource" Any idea, how to approach this issue?
upvote count: 1
has comment: http://stackoverflow.com/comment/46884056
answer count: 0
has title: Can't access file:// URIs when using a remotely hosted app
type: Question
has comment: http://stackoverflow.com/comment/41107532
has comment: http://stackoverflow.com/comment/41104592
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41106486
has comment: http://stackoverflow.com/comment/41104857
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/47073860

http://stackoverflow.com/a/26232394
has comment: http://stackoverflow.com/comment/41145038
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/41145063
downvote count: 0
has body: It's 0 because when the first iteration of the loop happens it sets the position of the first $('[data-distance]') to absolute, so when the second iteration happens, the first element is at position top: 0, left: 0. Because of this, the attribute position: absolute should be added after finding the offset of all matched elements. It should be like this http://jsfiddle.net/vp7jt2xj/ $('[data-distance]').each(function (i, el) { var $this = $(el), offset = $this.offset(); $this.css(offset); }); $('[data-distance]').css('position', 'absolute');
answers question: http://stackoverflow.com/q/26232245
accepted answer of: http://stackoverflow.com/q/26232245
score: 3
type: AcceptedAnswer

http://stackoverflow.com/a/26283451
type: Answer
accepted answer of: http://stackoverflow.com/q/26282684
answers question: http://stackoverflow.com/q/26282684
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You were close. You can do: r.db('dev').table('videos').filter(function(video) { return video("studio")("uid").eq("zyxwvut") })
has comment: http://stackoverflow.com/comment/41238852

http://stackoverflow.com/q/26220246
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27138479
has body: I have a content editable DIV containing a P tag with text in it and am using placeCaretAtEnd to position the caret at the end of the content inside the P tag. This seems to work well for every browser with the exception of Firefox (v32.0.3). On that, the caret just seemingly disappears. From what I can tell, the placeCaretAtEnd JS function is supposedly fully compatible with Firefox. Any idea why this isn't working in this instance? Working example at: http://jsfiddle.net/0ktff3zj/1/ Sample text. Sample text.
upvote count: 1
has title: placeCaretAtEnd seemingly not working in Firefox
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/26256854
favorite count: 0
has title: Bacon.js: select, drag-drop with mouse and touch and move using arrow keys
tagged with: drag-and-drop
upvote count: 2
has body: We are writing an application like powerpoint, and we're considering bacon.js. There are elements like pictures, text, etc that can be dragged onto the screen, then selected, moved using mouse drag drop or touch events and using the arrow keys. I made this simple sample using some guidelines from before with 2 divs that can be dragged around using the mouse: http://jsfiddle.net/5y6qqqg2/3/ // allKeyUps :: Observable KeyEvent var keyDown = $(document) .asEventStream('keyDown') .filter(function(ev){ return ev.keyCode==37 || ev.keyCode==38 || ev.keyCode==39 || ev.keyCode==40 }).log() function xyFromEvent(v) { return { x: v.clientX, y: v.clientY } } function getDelta(t) { var a = t[1]; var b = t[0]; return { x: a.x - b.x, y: a.y - b.y }; } function add(p1, p2) { return { x: p1.x + p2.x, y: p1.y + p2.y }; } $().ready(function () { var onMove = $("html").asEventStream('mousemove') addDraggable($("#1"), onMove); addDraggable($("#2"), onMove); }); function addDraggable(block, onMove) { var startDrag = block.asEventStream('mousedown') var endDrag = block.asEventStream('mouseup') var draggingDeltas = startDrag.flatMap(function () { return onMove.map(xyFromEvent) .slidingWindow(2, 2) .map(getDelta) .takeUntil(endDrag) }) var blockPosition = draggingDeltas.scan({ x: 0, y: 0 }, add); blockPosition.onValue(function (pos) { block.css({ top: pos.y + "px", left: pos.x + "px" }); }); } but I am not experienced enough with bacon.js to be able to hook the eventstream for keydown to move only one element not all of them.
type: AnsweredQuestion
tagged with: bacon.js
tagged with: onkeyup
type: Question
tagged with: javascript
tagged with: touch
has answer: http://stackoverflow.com/a/26273323
score: 2
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26273323

http://stackoverflow.com/comment/41363234
type: AnswerComment
score: 0
type: Comment
has text: many of those fingerprint sources could change on a user from an auto-update. canvas font fingerprinting is the newest/best method ATM. https://www.browserleaks.com/canvas
comment on: http://stackoverflow.com/a/26351512

http://stackoverflow.com/comment/41345722
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26341513
has text: All the elements who are inside of the body can't be visible.

http://stackoverflow.com/comment/41120748
type: Comment
comment on: http://stackoverflow.com/a/26218964
type: AnswerComment
has text: So, finally, we end up with what we have started 50 minutes ago :) +1 for first demo.
score: 0

http://stackoverflow.com/comment/41138318
comment on: http://stackoverflow.com/q/26228606
has text: Old versions of `IE` did not implement `setInterval()`, `setTimeout()` and similar functions.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41383982
has text: it's ok i dont put atention for it. i need to read twice to understand, i can put this in a JS file? ..
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26351001

http://stackoverflow.com/q/26346561
upvote count: 2
has comment: http://stackoverflow.com/comment/41356218
has comment: http://stackoverflow.com/comment/41358982
has body: I'm wanting to have a system set up where users can go to a page where there's a list of items that they can rate (say, 1 through 5) from a drop-down. This list is going to get quite long thus it would be much more convenient if they could go through and rank each item without ever having to hit "Save." I'm very much a novice when it comes to AJAX but I figure this can't be that difficult. I found an answer in a different discussion that I think is quite relevant but it doesn't provide enough information for me to know exactly what to do with it. In short, how do I use AJAX, in congruence with jQuery and ColdFusion, to update the database without the need for a save/submit button? CLARIFICATION: I should have clarified that the user can rate the items - not rank. Meaning that there's no #1, #2, #3, etc. Instead, each item can be rated on a scale from 1-5. Currently I'm basing everything off of ".change()" when the user makes a selection in the drop-down. At which point I have two jQuery variables that are set to the "ID" of the item changed as well as its new "rating." I just need to find a way to use these two variables to update the table in the database. Update On the main page, I now have a simple jQuery AJAX post call: $.post('update.cfc', {ID: inputID, rating: selRat}) that is triggered .onChange(). "inputID" is the ID of the entry that I want to update in the database and "selRat" is the selected rating in the drop-down. &lt;cfcomponent output="false"&gt; &lt;cffunction name="updateRating" access="remote" output="false"&gt; &lt;cfupdate datasource="#session.db#" name="update"&gt; UPDATE ajaxTest SET rating = #FORM.rating# WHERE ID = #FORM.ID# &lt;/cfupdate&gt; &lt;/cffunction&gt; &lt;/cfcomponent&gt; I'm currently getting a 500 (Internal Server Error). Thoughts/suggestions?
has comment: http://stackoverflow.com/comment/41354979
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26349289
has title: ColdFusion and AJAX - Updating Database
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/15208351
has comment: http://stackoverflow.com/comment/41393663
accepted answer: http://stackoverflow.com/a/26349289
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/41357831
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41357992

http://stackoverflow.com/q/26252257
tagged with: javascript
has comment: http://stackoverflow.com/comment/41182753
has answer: http://stackoverflow.com/a/26268523
has comment: http://stackoverflow.com/comment/41182990
has title: Javascript, Protractor and increment counters
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41205479
has body: I've already posted a similar question before but wanted to make it bit more clear and focused. So I'am writing here again (or should I keep editing the one I posted before?) I am writing e2e test specs for angularJS using protractor. Within the protractor spec, I'm also using JavaScript. The problem is that JavaScript counter variables are not working as I intended. I will show you code here: // codes here within this describe block made me come back :( call this sample 1 //'use strict'; describe('list page ', function () { it('should list page', function () { browser.get('/list'); var counterA = 0; element.all(by.repeater('page in pages')).each(function (page) { counterA++; //console.log(counterA); }) //console.log(counterA); // Please be true assertion :( expect(counterA).toBeGreaterThan(0); }) }); // testing against protractor spec: wrote within the same js file. call this sample 2 bigitems = [["somevalue", "t", "y"], ["somevalue", "somevalue", "y"]]; counterB = 0; for (smallitems in bigitems) { for (item in bigitems[smallitems]) { if (bigitems[smallitems][item] == "somevalue") { counterB++; } } } console.log(counterB) One thing I noticed is that 'sample 2' counterB is working and returns '3' to console. 'sample 1', however, return 0 for counterA outside .each{} block. here's console output. Using the selenium server at http://localhost:4444/wd/hub 3 0 1 2 3 4 5 6 . Finished in 11.877 seconds 1 test, 1 assertion, 0 failures and thank you again everyone helped me on this topic before.
tagged with: increment
accepted answer: http://stackoverflow.com/a/26268523
tagged with: selenium-webdriver
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41220319
tagged with: selenium
upvote count: 1
has comment: http://stackoverflow.com/comment/41184374
type: Question

http://stackoverflow.com/q/26215091
upvote count: 1
has body: Hey superheroes of Stackoverflow. I am currently working on a checklist using angularjs and the checklist-model directive. I am trying to figure out how I can diable all the unchecked boxes when reaching x-amount of checked boxes. I am fetching data from a json file, hence the reason for my checkboxes being in a ng-repeat. For now I am disabling all checkboxes. when reaching x-number of checked. Unfortunately the users should be able to change what has been chosen. &lt;label ng-repeat="item in items | orderBy:item_position"&gt; &lt;h3&gt;{{item.item_name}}&lt;/h3&gt; &lt;p&gt;{{item.item_position}}&lt;/p&gt; &lt;!--checkbox --&gt; &lt;input type="checkbox" ng-disabled="item.answers.length &gt;= 12" checklist-model="item.answers" checklist-value="player"&gt;
type: Question
has answer: http://stackoverflow.com/a/26215617
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/31965110
tagged with: angularjs
type: UnansweredQuestion
tagged with: checkbox
has title: Angularjs checklist-model - disable unchecked boxes

http://stackoverflow.com/q/26272054
possible better answer: http://stackoverflow.com/a/28023565
has answer: http://stackoverflow.com/a/28023565
type: Question
tagged with: candlestick-chart
answer count: 2
has body: How can I set series labels for chart legend in candlestick Google chart? Code: var chart_options = { legend: { position: 'bottom' } }; var chartdata = [ [new Date(2014, 3, 1), 95,100,98,110, null,null,null,null], [new Date(2014, 3, 2), 98,98,102,103, null,null,null,null], [new Date(2014, 3, 3), 90,102,95,105, 91,103,96,106], [new Date(2014, 3, 4), 93,95,103,103, 94,96,104,104], [new Date(2014, 3, 5), 94,103,104,105, 95,104,105,106], ]; chart1 = new google.visualization.CandlestickChart(document.getElementById('chart')); chart1.draw( google.visualization.arrayToDataTable(chartdata,true), chart_options); Source: http://jsfiddle.net/martinba/xt7cvv3k/
has answer: http://stackoverflow.com/a/26273861
accepted answer: http://stackoverflow.com/a/26273861
upvote count: 1
has title: How to set legend labels in Google Chart Candlestick
tagged with: google-visualization
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/41323550
type: Comment
has text: the new code works fine, but only when input is '0' not sure where the problem is :s
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26329141

http://stackoverflow.com/q/26244982
has body: I have completed code that has a user click a button (to the right of the canvas), then the image is added to the canvas and is constrained to only move around the circumference of a circle. In order to move the image the user just needs to click the image and then move the mouse. To release the image the user simply needs to click where the image goes on the canvas. Here is a fiddle showing what the current code does. http://jsfiddle.net/smacnabb/68awv7sq/9/ Question: I am looking to be able to have the images that move around the circumference of the circle rotate while moving around the circumference of the circle. This is what I mean: Here is a fiddle for the code I added to try and make this happen http://jsfiddle.net/smacnabb/68awv7sq/11/ in the handlemousemove method, it calls state.draw() every time the mouse move i'm passing mouseX, mouseY to state.draw. state.draw() is in addstate method and this was the code I added to make the image rotate var dx = mouseX - centerX; var dy = mouseY - centerY; var radianAngle = Math.atan2(dy, dx); context.save(); context.translate(centerX, centerY); context.rotate(radianAngle); if (this.dragging) { context.strokeStyle = 'black'; context.strokeRect(this.x, this.y, this.width + 2, this.height + 2) } context.drawImage(this.image, this.x, this.y); context.restore(); What am I doing wrong?
has comment: http://stackoverflow.com/comment/41168974
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41168824
score: 0
linked to: http://stackoverflow.com/q/20163948
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26245318
has title: HTML5 canvas, make image rotate around click to select and drag circle
type: UnansweredQuestion
type: Question
tagged with: canvas

http://stackoverflow.com/comment/101660526
type: AnswerComment
comment on: http://stackoverflow.com/a/53220241
type: Comment
score: 1
has text: This worked fine on Firefox for me, but on Chrome when the right panel became extremely narrow, it started going crazy - the panel would shrink faster than I moved the mouse over. It's because I was using flexbox and Chrome wasn't respecting `flex-shrink: 0` all the time. To fix that, I changed the line that contains `getComputedStyle` to be: `panel.style.width = (parseInt(panel.style.width) + dx) + 'px';`.

http://stackoverflow.com/q/26236223
accepted answer: http://stackoverflow.com/a/26236390
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41151592
type: Question
score: 0
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/35773723
has answer: http://stackoverflow.com/a/35773723
has answer: http://stackoverflow.com/a/26236390
has comment: http://stackoverflow.com/comment/41151543
has body: I am new to this, so sorry if the question is stupid or easy. I have a string variable that holds an absolute url. I want the relative url extracted from it. Example: http://something.com/fizz/buzz => /fizz/buzz Is there a library that I need to use, or should I write my own string manipulation function? If the later, should I go for regexp? EDIT: is there a best practice for this? or do I need to write my own hack?
has title: Get relative from absolute url

http://stackoverflow.com/q/26218656
has title: PHPExcel - Render HTML markups on output
type: Question
has body: In my site I have several forms using CKEditor to store it's data. So when I export all the content, in excel I can see markups all over my document. Is there an easy way to convert those to \n or somehow have PHPExcel recognize them as breaks? I also tried changing the export type to Excel2007 thinking that maybe Excel could just simply render the HTML markup, however when I switch types my report just crashes. So im sticking with Excel5. Any help would be appreciated. &lt;?php /** PHPExcel */ require_once '/Excelphp/Classes/PHPExcel.php'; // Create new PHPExcel object $objPHPExcel = new PHPExcel(); $rows=2; $sheet=$objPHPExcel-&gt;getActiveSheet(); // Set properties $objPHPExcel-&gt;getProperties()-&gt;setCreator("Maarten Balliauw") -&gt;setLastModifiedBy("Maarten Balliauw") -&gt;setTitle("Office 2007 XLSX Test Document") -&gt;setSubject("Office 2007 XLSX Test Document") -&gt;setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") -&gt;setKeywords("office 2007 openxml php") -&gt;setCategory("Test result file"); //This is the hard coded *non dynamic* cell formatting $sheet-&gt;getColumnDimension('A')-&gt;setWidth(5); $sheet-&gt;getColumnDimension('B')-&gt;setWidth(15); $sheet-&gt;getColumnDimension('C')-&gt;setWidth(50); $sheet-&gt;getColumnDimension('D')-&gt;setWidth(50); $sheet-&gt;getSheetView()-&gt;setZoomScale(90); $sheet-&gt;getStyle('A:D') -&gt;getAlignment()-&gt;setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); //Font Setting for the Support group title. $Support_team = array('font'=&gt; array('bold'=&gt; true,'color' =&gt; array('rgb' =&gt; '4D4D4D'),'size' =&gt; 22,'name' =&gt; 'Arial'),'alignment' =&gt; array('horizontal' =&gt; PHPExcel_Style_Alignment::HORIZONTAL_CENTER,'vertical' =&gt; PHPExcel_Style_Alignment::VERTICAL_CENTER),); //Font settings for the header cells only. $headers = array('font'=&gt; array('bold'=&gt; true,'color' =&gt; array('rgb' =&gt; '4D4D4D'),'size' =&gt; 12,'name' =&gt; 'Arial'),'alignment' =&gt;…
answer count: 1
has comment: http://stackoverflow.com/comment/41119115
tagged with: javascript
has answer: http://stackoverflow.com/a/26218829
accepted answer: http://stackoverflow.com/a/26218829
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: phpexcel
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41118949
has comment: http://stackoverflow.com/comment/41119165

http://stackoverflow.com/a/26210672
downvote count: 0
has comment: http://stackoverflow.com/comment/41104813
answers question: http://stackoverflow.com/q/26210600
has comment: http://stackoverflow.com/comment/41330057
type: Answer
has comment: http://stackoverflow.com/comment/41323519
upvote count: 1
has body: You are not supposed to change the values of the Radius 'myRadius', it must be constant (simple math). var myColor = ["#ff0","#00f","#002","#003","#004"]; var myData = [10,30,20,60,40]; var myRadius = 120;//[120,80,40,70,40]; &lt;=====Changed here function getTotal(){ var myTotal = 0; for (var j = 0; j &lt; myData.length; j++) { myTotal += (typeof myData[j] == 'number') ? myData[j] : 0; } return myTotal; } function plotData() { var canvas; var ctx; var lastend = 0; var myTotal = getTotal(); canvas = document.getElementById("canvas"); ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); for (var i = 0; i &lt; myData.length; i++) { ctx.fillStyle = myColor[i]; ctx.beginPath(); ctx.moveTo(200,150); ctx.arc(200,150,myRadius,lastend,lastend+(Math.PI*2*(myData[i]/myTotal)),false);//&lt;=====And Changed here console.log(myRadius[i]); ctx.lineTo(200,150); ctx.fill(); lastend += Math.PI*2*(myData[i]/myTotal); } } plotData(); Check http://jsfiddle.net/sameersemna/xhpot31v/
score: 1
has comment: http://stackoverflow.com/comment/41319646
has comment: http://stackoverflow.com/comment/41104218

http://stackoverflow.com/comment/41200089
comment on: http://stackoverflow.com/a/26259498
type: AnswerComment
score: 0
type: Comment
has text: @JunaidSaleem - I've posted a more detailed explanation as an answer. Please let me know if you have any other questions or need further assistance.

http://stackoverflow.com/comment/41198794
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26261852
has text: Sounds like `whatever_you_want.mp3` doesn't exist...

http://stackoverflow.com/comment/41416807
type: QuestionComment
comment on: http://stackoverflow.com/q/26329451
has text: May i ask why return false?
score: 0
type: Comment

http://stackoverflow.com/comment/41180039
comment on: http://stackoverflow.com/a/26251315
has text: thanks for your answer but what I need is let me explain with you an example- In the autocompletion address field I want the search done for a particular city only lets say Bangalore,India. If I am typing "Korm...." it shouuld suggest me "Kormangala" in bangalore only
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26283349
answers question: http://stackoverflow.com/q/26283145
type: Answer
downvote count: 0
score: 1
has body: There are many ways to skin this cat but one common way is to filter the data for the selection: var pickCirlces = circleGroup.selectAll("circle") .filter(function(d) {return d.color === "purple"}) .transition().duration(1200) .style("fill", "yellow") Here is the FIDDLE. You can read more about this technique here.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41238941
accepted answer of: http://stackoverflow.com/q/26283145
has comment: http://stackoverflow.com/comment/41239064

http://stackoverflow.com/comment/41432522
type: Comment
has text: As you can see I am not much of a programmer. I don't know much of css nor javascript. I implemented in on our beta site. The toggle is working but the checkboxes still not working. It's driving me insane. I would provide a user id and pw to access it but don't want to do it publicly because it's not yet public. How do I give it to you? I am new to this site.
comment on: http://stackoverflow.com/a/26352128
type: AnswerComment
score: 0

http://stackoverflow.com/a/26318605
upvote count: 4
has body: Here is another one: Map#entries returns an iterator over (key, value) tuples. The most elegant way to iterate over them is use destructuring: for (var [key, value] of map.entries()) { // ... }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41313666
answers question: http://stackoverflow.com/q/26317521
score: 4

http://stackoverflow.com/q/26260195
has body: &gt;Object.getPrototypeOf(Object) [Function: Empty] &gt;Object.prototype {} why I got difference result? But if I use: &gt;Object.getPrototypeOf({}) {} everything is fine. Is any point I missed about getPrototypeOf??
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/68143380
has comment: http://stackoverflow.com/comment/41195883
type: Question
has answer: http://stackoverflow.com/a/26260264
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/46092202
has answer: http://stackoverflow.com/a/46092202
has title: What difference betwwen Object.getPrototypeOf(Object) and Object.prototype?
accepted answer: http://stackoverflow.com/a/26260264

http://stackoverflow.com/comment/58231348
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26227662
has text: @dejakob Referring to `this` in a static method will reference the CLASS (prototype, to be exact), not the object. By using a symbol which is defined out of the class, we are essentially creating a private class member (which is different from a private instance member). The only reason to do this is to maintain class semantics. I strongly prefer to not use singletons, however. I much prefer the container be responsible for the lifetime. I don't like it when classes are responsible for their lifetime. It always feels wrong.
type: AnswerComment

http://stackoverflow.com/comment/41271692
type: AnswerComment
has text: Thank you, this worked! Learned a lot during this discussion, the learning curve for Javascript is huge.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26301473

http://stackoverflow.com/comment/41245546
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26286417
type: Comment
has text: I've never used it to generate an image, but it appears to be a supported feature. From their website: _Convert web pages, HTML strings to raster image formats_

http://stackoverflow.com/comment/41308227
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26320906
type: AnswerComment
has text: It's not hard to coalesce them yourself, though. Just do `var frame;` outside whatever code is going to invoke requestAnimationFrame, then `if (!frame) frame=requestAnimationFrame(function display(){frame=null; /*other code goes here*/ })` inside it (display function inlined for comment brevity)

http://stackoverflow.com/a/26204600
has comment: http://stackoverflow.com/comment/41094863
has comment: http://stackoverflow.com/comment/41095185
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26204107
type: Answer
answers question: http://stackoverflow.com/q/26204107
upvote count: 1
has body: I ran into something similar when using Redactor so perhaps this will help. In my case, I had a change listener on the textarea to which Redactor was bound to (a similar approach to what I believe Bootstrap Validator is doing) but the problem was that Redactor was eating the change event on the original textarea. To get around this, I implemented the following when initializing the Redactor plugin. var $mytextarea = $('selector-for-textarea'); $mytextarea.redactor({ changeCallback: function( html ) { $mytextarea.trigger( 'change' ); } }); Hope this helps, cheers.

http://stackoverflow.com/comment/41170747
has text: @zerkms I tried doing that in both Chrome and Mozilla, yields nothing besides that of which I already know (i.e. the 'eval()' function trying to evaluate the '#' symbol). Thanks anyways!
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26246063

http://stackoverflow.com/comment/41100700
has text: The code is inside a Chrome Extension
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26208811

http://stackoverflow.com/comment/41152750
type: AnswerComment
comment on: http://stackoverflow.com/a/26236566
type: Comment
score: 0
has text: I have asked them they told my file size is 96 MB so i want to modify that size externally

http://stackoverflow.com/comment/41298868
type: Comment
has text: Browsers may display title in other ways than simply using the `location.href`. E.g. a customization which prepends `location.href` with a value or simply showing only the domain and not the path.
comment on: http://stackoverflow.com/a/26316403
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41237500
comment on: http://stackoverflow.com/a/26267067
type: AnswerComment
has text: Exactly what I wanted. Thanks a mil!
score: 0
type: Comment

http://stackoverflow.com/comment/41241617
type: QuestionComment
comment on: http://stackoverflow.com/q/26285008
has text: This looks [terrifyingly insecure](http://bobby-tables.com/). Are you **sure** your user parameters are [properly escaped](http://bobby-tables.com/php)?
score: 0
type: Comment

http://stackoverflow.com/q/26314645
has title: CSS / JavaScript digit counter
has answer: http://stackoverflow.com/a/26316640
tagged with: animation
tagged with: css
type: AnsweredQuestion
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26316640
tagged with: counter
tagged with: javascript
score: -1
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: basically, what I am looking for is an animation for digits, a great example would be on this site: http://www.arkanbuilds.com/ If you scroll down you'll see their 'Builds completed' etc counting up. How do I do this? I have NO knowledge of Javascript neither jQuery if those are necessary, so help would be appreciated. Also a small sub-question that links to this question; how can I make a number increase monthly / yearly etc, like on that website, the 'months online'. I would appreciate the answers.

http://stackoverflow.com/comment/41180703
has text: correction: $_REQUEST['temp_unit'] outputs "Â°C" when echoed in PHP. I used javascript's alert and the data is coming from the php thru ajax that's why it showed as "°C". What seems to be the problem in PHP?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26251020

http://stackoverflow.com/a/26245668
answers question: http://stackoverflow.com/q/26245403
type: Answer
has body: If you redirect the browser with a Location Header, any javascript code on the page itself is not executed, because the page you're redirecting to is loaded instead. Also, I don't think you can echo or otherwise output any content before calling the header function. If you want to show an alert, do it on the page you're redirecting to, or, if that's not under your control, redirect using javascript instead of with the Location header: document.location = 'http://isometricstudios.co.uk/news.html'; Also, it's probably easier to not use echo for writing javascript, because then you'd have to escape quotes, which you failed to do in echo 'alert("Thank you! You've now joined the e-mail club!")'; It's easier to just keep javascript outside your php tags, so something like &lt;?php (do server-side php stuff) ?&gt; &lt;script&gt; (do client-side javascript stuff) &lt;/script&gt; &lt;?php (do more server-side php stuff) ?&gt;
score: 0

http://stackoverflow.com/a/26347914
has body: This examples shows you how you can pass $variable from php to Javascript &lt;?php $x = 'hello world'; ?&gt; &lt;script type="text/javascript"&gt; var str = '&lt;?php print("Hello World"); ?&gt;' ; $("#id").html(str); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41357334
answers question: http://stackoverflow.com/q/26347659
type: Answer
score: 0

http://stackoverflow.com/comment/41346785
has text: Not probably the answer but you can take a look at [Moment.js](http://momentjs.com/) for easy date and time manipulation.
score: 0
comment on: http://stackoverflow.com/q/26342405
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41360880
type: Comment
comment on: http://stackoverflow.com/a/26347887
score: 0
type: AnswerComment
has text: @vohuman Thank you. Just two other things, when I click the "reset" button I have on the page the current amount selected beside total eg. 10 doesn't clear, if their anyway to fix this so that it does? Secondly I tried changing values to 9.99 for example but the decimal places don't show up and it gets rounded down to 9? Thanks a lot!

http://stackoverflow.com/comment/41103277
type: Comment
has text: I mentioned your suggestion in my Q just in case, and that is wrong method. As you see my code, the resolution is a millisecond. Do you want to iterate through Years of 2000-2014 incrementing 1 millisecond? Obviously No.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26208210

http://stackoverflow.com/comment/41342168
type: AnswerComment
comment on: http://stackoverflow.com/a/26337393
has text: added response body. Thanks.
type: Comment
score: 0

http://stackoverflow.com/q/26204244
has answer: http://stackoverflow.com/a/26204329
type: AnsweredQuestion
has body: I have implemented a menu with jQuery where the items and the functions are assigned dynamically. This code works. But since I need to hide the menu when the option is clicked, I changed p.click(funcs[i].f); to p.click(function(){ menu.hide(); funcs[i].f; }); as in here,but I get Uncaught TypeError: Cannot read property 'f' of undefined because the variable i is out of bounds. how to fix this code?
has title: jQuery: function assigned dynamically is not working
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/1451009
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26204329
possible better answer: http://stackoverflow.com/a/26204317
has answer: http://stackoverflow.com/a/26204317

marker
tag name: marker
tags question: http://stackoverflow.com/q/26295797
type: Tag

http://stackoverflow.com/comment/42755457
score: 2
comment on: http://stackoverflow.com/a/26680892
type: AnswerComment
has text: This is mostly correct though harp does not clear out your source when you compile back one dir. Here is the source that handles that logic https://github.com/sintaxi/harp/blob/master/lib/helpers.js#L237-L266
type: Comment

http://stackoverflow.com/comment/41406699
comment on: http://stackoverflow.com/a/26335383
score: 0
type: Comment
has text: Thanks for the reply. The code works. I have another doubt. Is there a possibility to pass the tpl as a URL because I have a html page which I need to render. Here you have directly written the html code in the tpl variable whereas I need to pass an url.
type: AnswerComment

http://stackoverflow.com/comment/41352274
has text: thats because the dom is redone for every page.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26345441

http://stackoverflow.com/comment/41120891
has text: full working code http://jsfiddle.net/sanoj908572/bsfa8qb4/
comment on: http://stackoverflow.com/q/26219689
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26222534
answers question: http://stackoverflow.com/q/26222050
has body: While others suggested how to fix the issues brought by a design issue, I suggest that you should rather fix your design issue. If there's code that shouldn't run, why do you actually run that code? If in your new page you only need two.js and a subset of one.js excluding some pieces of it, well you should further segregated your code into more files. subset-of-one.js two.js Having many files with $.ready is also another bad practice, but that's probably outside the scope of this question.
score: 0
type: Answer

http://stackoverflow.com/q/26225402
has answer: http://stackoverflow.com/a/26229467
tagged with: dynamic
has body: I have this animation setup to indicate which SVG was selected. The animation adds a svg:use element, and 3 animate or animateTransform elements within the svg:use element. Thanks to some great help here on SO I was able to get this working properly. My new problem however is that the animation only works once as designed once. If a second element is selected, the animation appears to try to take place, as you can see the stroke-width increase, but the scale doesn't happen. I thought this would be a simple fix by using a setTimeout to call a function and remove the svg:use after the animation completed. I wasn't so lucky. An example of my problem can be seen here: http://codepen.io/JoeyCinAZ/pen/GHhbw The function I wrote to remove the animation is here setTimeout( function() {removeAnimation(objID)}, 5000); function removeAnimation(objID) { var useEl = document.getElementById(objID); useEl.nextSibling.remove(); }
accepted answer: http://stackoverflow.com/a/26229467
type: Question
has title: Dynamic SVG animation only works once
answer count: 2
possible better answer: http://stackoverflow.com/a/26225578
downvote count: 0
has answer: http://stackoverflow.com/a/26225578
tagged with: javascript
score: 2
has comment: http://stackoverflow.com/comment/41132110
has comment: http://stackoverflow.com/comment/41132281
has comment: http://stackoverflow.com/comment/41132271
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/41178832
has text: Is that an interview ? The instructions for these very basic operations look clear, what's the problem exactly ?
comment on: http://stackoverflow.com/q/26250794
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26331060
answers question: http://stackoverflow.com/q/26331032
has comment: http://stackoverflow.com/comment/41326827
has comment: http://stackoverflow.com/comment/41326316
accepted answer of: http://stackoverflow.com/q/26331032
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41325888
downvote count: 0
has comment: http://stackoverflow.com/comment/41326495
has comment: http://stackoverflow.com/comment/41325897
type: Answer
has body: Using .map() + .toArray(): var ddlArray = $('#ddl option').map(function() { return this.value; }).toArray(); Or .toArray() + the generic iterator $.map(): var ddlArray = $.map($('#ddl option').toArray(), function(option) { return option.value; }); Live demo
has comment: http://stackoverflow.com/comment/41329523
has comment: http://stackoverflow.com/comment/41327015
has comment: http://stackoverflow.com/comment/41327073
has comment: http://stackoverflow.com/comment/41326192
has comment: http://stackoverflow.com/comment/41328988
has comment: http://stackoverflow.com/comment/41326233
upvote count: 5

http://stackoverflow.com/comment/41336912
type: AnswerComment
comment on: http://stackoverflow.com/a/26336975
has text: While I wouldn't say the using typeof is "less professional", I would say that it's mostly used due to muscle memory and propagation of "this worked" more than an actual understanding of why it is used and/or needed on bare identifiers. (Why people still use `typeof x === 'undefined'` on a local variable or a property is beyond me.)
type: Comment
score: 1

http://stackoverflow.com/comment/54396981
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26326608
type: Comment
has text: No, ajax calls can be made with the standard included vanilla, so it's considered pure js. Search for [XMLHttpRequest](http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery)

http://stackoverflow.com/q/26332223
linked to: http://stackoverflow.com/q/1582534
has comment: http://stackoverflow.com/comment/41328123
has answer: http://stackoverflow.com/a/26332240
has title: textwidth of innerHTML in javascript
has body: I am trying to get the textwidth of innerhtml in Javascript. Tried clientwidth,$(p.width()) but still unable to get it.Can anyone please help. PFB the sample code ABCDEFGH
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/1582534
has comment: http://stackoverflow.com/comment/41328174
type: Question
linked to: http://stackoverflow.com/q/118241
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41212269
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26268640
has text: there is. nothing at all in your CSS is forcing you to chose styles according to anything other than what you want. So if I picked a test class that you current have in use like `.boxes` then just use your own class. If you want to select each div individually then use the id's I left on the div's. This is why I left them. Theres far too many reasons to usually want to select a wrapper class like a div, individually.

http://stackoverflow.com/comment/41357242
comment on: http://stackoverflow.com/q/26346565
type: Comment
type: QuestionComment
has text: One more thing, try not to use `ng-init` for initializing a variable outside ng-repeat. it should actually be done in the controller. If you look at [official documentation](https://docs.angularjs.org/api/ng/directive/ngInit) it states `The only appropriate use of ngInit is for aliasing special properties of ngRepeat, as seen in the demo below. Besides this case, you should use controllers rather than ngInit to initialize values on a scope.`
score: 0

http://stackoverflow.com/q/26253682
tagged with: node.js
linked to: http://stackoverflow.com/q/22519784
answer count: 1
has answer: http://stackoverflow.com/a/26254276
has body: I have a function like this: var f = function(options, successCallback, errorCallback) { ... } and I want to convert it's call to a promise. My current solution is this: var deferred = Q.defer(); f(options, function (result) { deferred.resolve(result); }, function (err) { deferred.reject(err); } ); return deferred.promise; I can't use the Q.fcall because it expects a Node.js-style callback function(err, result) { ... } So, is there a way to improve my code using the Q API?
upvote count: 5
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
accepted answer: http://stackoverflow.com/a/26254276
favorite count: 0
tagged with: promise
type: Question
has title: How to convert function call with two callbacks to promise
score: 5

http://stackoverflow.com/q/26302032
has body: I'm currently trying to make a search function that searches an array for a string and returns the index of the location in the array for which it matches the string. Ex: Array: [1,2,3,4,5,2,3,1,6,5,2] Search input: 3 Output: 2 6 Search input: 2 Output: 1 5 10 Currently i have it outputting only 1 value by using document.getElementById("result").innerHTML= But I want it to return multiple results
has answer: http://stackoverflow.com/a/26302149
type: Question
score: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26302033
answer count: 3
has answer: http://stackoverflow.com/a/26302034
has title: Search function return multiple results
has comment: http://stackoverflow.com/comment/41272661
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41272613
has comment: http://stackoverflow.com/comment/41275719

http://stackoverflow.com/a/26241532
has comment: http://stackoverflow.com/comment/41166869
type: Answer
has body: According to the specification the checking event is always the first event. the user agent is checking for an update, or attempting to download the manifest for the first time. This is always the first event in the sequence. I think it is a mistake to refresh the browser since that will not automatically fetch a new copy. If you look at the MDN guide for using the applicationCache you'll see that files are always loaded from the applicationCache first and then proceed to go through the cycle of events you attempted to avoid by refreshing. Instead of refreshing you should simply make proper use of the applicationCache event life cycle in order to initialize and start your application. i would like prevent my application code from running, since i will refresh the browser after updating my app. You have a lot of control of when your application begins to run, if you really wanted to refresh the browser, just always start the app after updateready or noupdate events, but really instead of refreshing it seems like you should use window.applicationCache.swapCache instead. I found this question and answer useful.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26241217
has comment: http://stackoverflow.com/comment/41162949
upvote count: 1

http://stackoverflow.com/comment/41125272
comment on: http://stackoverflow.com/a/26220305
score: 1
type: AnswerComment
has text: from question title : "Change the font color of the last word **typed**" So, yes it was stated. And if the goal is a texteditor I'm pretty much sure it has to run when actively typing as lastword typed might not be the real last typed one when blur this text editor
type: Comment

http://stackoverflow.com/comment/41209436
type: Comment
type: QuestionComment
has text: the expression (Type = "A") always returns true, after setting the value of Type to "A". I assume you want Type == "A" or Type === "A" which are logical comparisons. IF, ELSE IF and ELSE need to be in lower case, (if, else if, else). As well as AND and OR ... http://www.w3schools.com/js/js_comparisons.asp
score: 0
comment on: http://stackoverflow.com/q/26267266

http://stackoverflow.com/q/26320569
has answer: http://stackoverflow.com/a/26320766
has comment: http://stackoverflow.com/comment/41306778
tagged with: flickr
accepted answer: http://stackoverflow.com/a/26320766
has title: Why does the Flickr API not let me name my own callback function for a JSONP request? Am I viewing this right?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: Question
tagged with: jsonp
score: 0
has body: It appears that when I use my own callback function via JSONP, Flickr wraps the JSON with its own function name called jsonFlickrFeed. And if I type the url/src directly on the browser, I do see that it's indeed wrapped. Does this mean I'm supposed to name my function to jsonFlickrFeed? I thought when using JSONP, we get to name our own functions? P.S. I've browsed the site for answers, but I couldn't find any direct answer. The only answer I found was that someone did use jsonFlickrFeed as the callback function name; however, being forced to use the name is what I want clarification on. I'm also using javascript without jquery.
answer count: 1

http://stackoverflow.com/comment/41313671
comment on: http://stackoverflow.com/a/26324541
has text: Here is my template to get a better view to maybe see what is going on. http://laravel.io/bin/LN8Kx
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41312089
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26317911
has text: Okay, I think we're abusing the comment system ;) please let me know your email so we can exchange info
type: AnswerComment

http://stackoverflow.com/q/26294941
favorite count: 0
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/26295870
tagged with: sinon
type: AnsweredQuestion
upvote count: 1
tagged with: ruby-on-rails
type: Question
has body: fileModel=new Backbone.Model({ "filename":"HigResolution4.jpg", "uuid":"798643982", "uploaded_by":"xyz", "pixel_width":800 }); filenameStub=sinon.stub(fileModel,'get("filename")',function(){ return 'filename'; }); fileuuidStub=sinon.stub(fileModel,'get("uuid")',function(){ return 'uuid'; }); I am using sinon.js for unit testing for BackBone script.I would like stub an a method basing on the attribute of a model. Can anyone please help what is the mistake I am doing.
has answer: http://stackoverflow.com/a/26295870
score: 1
has title: stubbing using get method of a model basing on attribute
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41155867
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26238328
score: 0
has text: @j08691 i have dyslexia so sorry and i am looking for eather a ajax or php answear lght i have a file using php to get the files html and then i have it going threw this file and grabbing all the a link that have a set text in the href but i didnt know to get the text as well

http://stackoverflow.com/comment/41179508
comment on: http://stackoverflow.com/a/26251061
type: AnswerComment
score: 0
type: Comment
has text: @ÁngelDiMaría URL is not a route. In Zend Framework router is a class (or array in the framework's config), that makes correspondence between requested URL and Action Controller and method in it. I'm not sure that you looked at the Zend's manual.

http://stackoverflow.com/q/26306284
has title: Get property value from deep object
has answer: http://stackoverflow.com/a/26306472
answer count: 3
has body: My goal: create a way to get a property's value from a multi-level javascript object. For example, here is an object I'd like to get a property's value from: var originalCookieObject = { User: "notmyemail@gmail.com", GridStates: { gridName : { "page": 1, "pageSize": 50, "sort": [ { field: "CommonName", dir: "desc" } ] } }, ProtectionState: { SelectedRow: "string", PanelsOpen: ['string', 'string'] } } And here is how I might retrieve the property's value: getProperty(originalCookieObject, 'gridName'); I've tried the following recursive function so far: function traverse(toTraverse, findKey) { if( typeof toTraverse == "object" ) { var foundValue = toTraverse[findKey]; if (foundValue){ return foundValue; } $.each(toTraverse, function(k,v) { // k is either an array index or object key traverse(v, findKey); }); } } var objectValue = traverse(originalCookieObject, 'gridName'); console.log(objectValue); My issue is when I try to go more than one level deep, that current traverse() call only returns the property value to the parent traverse() call. My questions: How could I make a child traverse() call return the property value to the parent traverse() function? Is there a better way to do this?
score: 0
has answer: http://stackoverflow.com/a/26306679
accepted answer: http://stackoverflow.com/a/26306679
possible better answer: http://stackoverflow.com/a/26306459
linked to: http://stackoverflow.com/q/6491463
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26306459
tagged with: javascript
type: Question

http://stackoverflow.com/comment/41190664
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26256689
score: 0
has text: Don't give us a link to the page, provide a minimal snippet that demonstrates the problem. Links break, making your question turn into nonsense; Examples will always be useful to others once your question has been answered. Plus, giving us a link assumes we'll chase down the needed information necessary to help you, but instead they tend to discourage people who would answer you, so help us help you.

http://stackoverflow.com/q/26292295
has answer: http://stackoverflow.com/a/26292344
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26292497
answer count: 4
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/26292444
has comment: http://stackoverflow.com/comment/41254850
type: Question
type: AnsweredQuestion
score: -2
downvote count: 2
has body: the $(document).html() return empty rather than the whole html string.How to get it?
has answer: http://stackoverflow.com/a/26292321
possible better answer: http://stackoverflow.com/a/26292444
tagged with: javascript
has title: why $(document).html() cannot get whole html string?Is there other methods to get this?
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26292497

http://stackoverflow.com/q/26251807
tagged with: selected
type: Question
has title: AngularJS - How to preselect value in select?
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41181576
score: 0
tagged with: angularjs
type: UnansweredQuestion
has body: i have array of available select items: // Default available date formats $scope.dateformats = [ { code: 'YY.MM.DD', name: 'YY.MM.DD' }, { code: 'DD.MM.YY', name: 'DD.MM.YY' } ]; And I'm trying to default preselected value like this: $scope.actualDateformat = $scope.dateformats[0].code; {{actualDateformat}} Problem is, that "preselected" value appears in list as first option tag> {{actualDateformat}} After select of any from two remaining dynamically added items is text in first option appended with text (and value) of the selected item. How can in solve it please? I would like to have result like this: YY.MM.DD DD.MM.YY Thanks for any help.
has answer: http://stackoverflow.com/a/26252244
has answer: http://stackoverflow.com/a/26252030
tagged with: select

http://stackoverflow.com/comment/41082194
type: AnswerComment
has text: @user3116989 Well, show a sample of your HTML. `$` is not really an html parser... it will try to parse your string as HTML if it thinks it's HTML, but might be confused with text nodes. Try my solution...
type: Comment
comment on: http://stackoverflow.com/a/26198747
score: 0

http://stackoverflow.com/comment/41201482
score: 0
type: Comment
type: QuestionComment
has text: If nobody involved with implementing your site knows anything about security, it's wildly unethical to *advertise* it as secure.
comment on: http://stackoverflow.com/q/26263182

http://stackoverflow.com/comment/41346924
comment on: http://stackoverflow.com/a/26339526
type: Comment
type: AnswerComment
has text: Thanks alot! I will play around with it this afternoon and will pm you if I have some problems! :-D
score: 0

http://stackoverflow.com/comment/41148889
score: 0
has text: use find() instead of siblings()...
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26234849

http://stackoverflow.com/a/34709842
downvote count: 0
answers question: http://stackoverflow.com/q/26226773
score: 5
has body: You should check this project: https://github.com/makrohn/Universal-LPC-spritesheet. And for the integration in Phaser, try Something like that: function preload() { game.load.spritesheet('female_body', 'sprites/body/female/light.png', 64, 64); game.load.spritesheet('female_hair', 'sprites/hair/female/pixie/blonde.png', 64, 64); game.load.spritesheet('female_torso', 'sprites/torso/tunics/female/teal_tunic.png', 64, 64); game.load.spritesheet('female_legs', 'sprites/legs/pants/female/teal_pants_female.png', 64, 64); } function create() { var group = game.add.group(); group.add(game.add.sprite(200, 200, 'female_body', 13 * 9)); group.add(game.add.sprite(200, 200, 'female_hair', 13 * 9)); group.add(game.add.sprite(200, 200, 'female_torso', 13 * 9)); group.add(game.add.sprite(200, 200, 'female_legs', 13 * 9)); group.callAll('animations.add', 'animations', 'walk', Phaser.ArrayUtils.numberArrayStep(13 * 9, 13 * 9 + 9)); group.callAll('animations.play', 'animations', 'walk', 9, true); }
type: AcceptedAnswer
upvote count: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/26226773

http://stackoverflow.com/comment/41120400
score: 1
comment on: http://stackoverflow.com/q/26219422
type: QuestionComment
type: Comment
has text: Is `.each` a function.?

http://stackoverflow.com/comment/41187530
has text: Hmm, seems like it's available in Chrome 38. And in Chrome 31 with the flag `Enable Experimental JavaScript` enabled... Chrome 38 was promoted to stable yesterday, it should auto update itself for you in the near future.
comment on: http://stackoverflow.com/q/26255775
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41333237
type: QuestionComment
comment on: http://stackoverflow.com/q/26329761
has text: JSFiddle has nothing to do with it. There's no need to use `ready` for the code you have written.
score: 0
type: Comment

http://stackoverflow.com/comment/84355396
comment on: http://stackoverflow.com/a/26266720
type: Comment
score: 1
has text: Is this npm package still good to be used for just setting doc title? I am using React 15.1.0.
type: AnswerComment

http://stackoverflow.com/comment/41227345
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26274036
has text: Instead of this .....innerHTML.replace, use ....innerHTML = "new"
type: Comment

http://stackoverflow.com/a/26243435
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26243202
score: 2
has body: If you are actually looking at items in the DOM, you can easily do what you want using jQuery.not() like the following example. $(document).ready(function() { $("#changeLights").on("click", function() { $(".lights").not(".frozen").addClass("frozen"); }); }); div { height : 50px; width : 50px; background-color : #CCC; margin: 5px; float: left; } .frozen { background-color : #F00; }
downvote count: 0

http://stackoverflow.com/q/26194798
tagged with: javascript
favorite count: 0
has body: I have two modules: var client = require('./handlers/client.js'); var server = require('./handlers/server.js'); server.createClient() client.js var client = function(){ console.log("New client"); } exports = module.exports = client; server.js var server = { createClient: function() { var newClient = new client(); } } exports = module.exports = server; Doing this, the server module says that the client function is undefined. How can I get this to work?
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26194908
upvote count: 3
has answer: http://stackoverflow.com/a/26194908
type: AnsweredQuestion
score: 3
has title: Call functions between nodejs modules
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41112806
type: Comment
score: 2
has text: @san.chez — It makes no difference when comparing objects.
comment on: http://stackoverflow.com/a/26214987
type: AnswerComment

http://stackoverflow.com/comment/71350410
comment on: http://stackoverflow.com/a/42088469
type: Comment
has text: upvoted, but would be great if you expand on the answer with some example code :)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41160872
has text: Ah, ok I didn't see that, but makes sense
comment on: http://stackoverflow.com/a/26239830
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41261437
score: 0
type: QuestionComment
type: Comment
has text: I don't think this is possible because you are basically trying to change the main domain's cookie from a sub-domain.
comment on: http://stackoverflow.com/q/26295762

http://stackoverflow.com/a/26303150
score: 0
has body: Change $('.heading').children("#fil").remove(); to $('.heading').children("#fil").empty();
answers question: http://stackoverflow.com/q/26302895
type: Answer

http://stackoverflow.com/comment/41150166
type: AnswerComment
has text: Glad you got the problem sorted :)
comment on: http://stackoverflow.com/a/26231650
type: Comment
score: 0

http://stackoverflow.com/a/31175773
score: -1
has body: I found a way to solve this on Colorbox FAQ: http://www.jacklmoore.com/colorbox/faq/#faq-click It is not copy/paste and go, but might put you on the right direction. var $gallery = $("a[rel=gallery]").colorbox(); $("a#openGallery").click(function(e){ e.preventDefault(); $gallery.eq(0).click(); }); It is important to remove rel attribute on your gallery button (which prevents the duplication of the image).
has comment: http://stackoverflow.com/comment/50360502
answers question: http://stackoverflow.com/q/26221716
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/50365968
downvote count: 1
has comment: http://stackoverflow.com/comment/50359255

http://stackoverflow.com/q/26259630
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26268755
score: 0
has answer: http://stackoverflow.com/a/26259749
answer count: 3
accepted answer: http://stackoverflow.com/a/26259749
possible better answer: http://stackoverflow.com/a/26261169
has answer: http://stackoverflow.com/a/26261169
tagged with: audio
type: AnsweredQuestion
has body: I have been working on a simple audio player for a site. I only want it to have play and stop capabilities. I have it working so that it will play, set it so playing cant overlap by unbinding the selector. After it is finished I want to bind the selector again. It doesn't seem to do it. Maybe I am just not understanding where bind and unbind should be placed. function playMusic(){ var audioElement = document.createElement('audio'); var audioElementSrc = $(this).attr('data-audio-src'); audioElement.setAttribute('src', audioElementSrc); $.get(); audioElement.addEventListener("loadeddata", function(){ audioElement.play(); }, true); $('.pause').click(function() { audioElement.pause(); }); audioElement.addEventListener("playing", function(){ $('.play').unbind('click'); }); audioElement.addEventListener("ended", function(){ $('.play').bind('click'); }); } $(function(e){ $('.play').click(playMusic); });
type: Question
has comment: http://stackoverflow.com/comment/41194540
has title: preventing audio from playing then allowing after end with jquery function

http://stackoverflow.com/a/26283845
has comment: http://stackoverflow.com/comment/41239608
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26283556
accepted answer of: http://stackoverflow.com/q/26283556
has body: When you invoke the Puzzle.shuffle() here: $("#start-stop").click(function() { switch ($(this).text()) { case 'START': $(this).removeClass("btn-success").addClass("btn-danger").text("STOP"); Puzzle.shuffle(); Timer.start(); Counter.reset(); break; case 'STOP': $(this).removeClass("btn-danger").addClass("btn-success").text("START"); Puzzle.reset(); Timer.reset(); Counter.reset(); break; } }); It initializes the board and passes it to renderBoard here shuffle: function() { //initialBoard = randomBoard(); initialBoard = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,'',15]]; renderBoard(initialBoard); } Then renderBoard does this: currentBoard = board; Which causes both variables point to the same object. If you want them to be separated, then in renderBoard you should clone the object, instead of assigning it. Something along the lines of this if you use jQuery: currentBoard = []; $.extend(currentBoard, board);
has comment: http://stackoverflow.com/comment/41240890
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41240221
has comment: http://stackoverflow.com/comment/41239453
type: Answer
has comment: http://stackoverflow.com/comment/41239519
has comment: http://stackoverflow.com/comment/41239732

http://stackoverflow.com/a/26327698
type: Answer
has comment: http://stackoverflow.com/comment/41392537
answers question: http://stackoverflow.com/q/26327532
accepted answer of: http://stackoverflow.com/q/26327532
has comment: http://stackoverflow.com/comment/41319490
score: 1
has body: Is it possible that you are trying to load data from a file and not a running server(for example by double-clicking the .html from your file manager)? If your are on the file:// protocol (which you can see in your url) this will not work. You could try changing to the development directory and runnig python3 -m http.server which will start a small development server. You can than change to http://localhost:8000 and see if it works.
has comment: http://stackoverflow.com/comment/41320499
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41322629

http://stackoverflow.com/comment/41134226
comment on: http://stackoverflow.com/q/26226568
type: Comment
type: QuestionComment
score: 1
has text: The checkbox element is probably the wrong element to use here. This element has two values - one when checked and another when unchecked. The unchecked element is not submitted to the server. If you are just changing the prompts then - give the label an id. In the script - if checked == false then get the id and put the appropriate text for the label.

http://stackoverflow.com/comment/41316285
has text: The URLs you used in the `src` of your `img` tags are relative paths. Make sure the images are at the right location (in an `images` directory next to the HTML document you're calling in your browser)
comment on: http://stackoverflow.com/q/26325937
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26213193
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41108619
answers question: http://stackoverflow.com/q/26212987
has comment: http://stackoverflow.com/comment/99382130
score: 1
has comment: http://stackoverflow.com/comment/41108901
upvote count: 1
has comment: http://stackoverflow.com/comment/99363294
has comment: http://stackoverflow.com/comment/41108795
has body: You are sending a GET request. Because you are mapping your parameters on the queryString. If you want to use it like that you should add the [HttpGet] attribute to the action. But I'd rather recomend you to use HttpPost in your AJAX request. Edit: since you are using POST request should be like this $.ajax({ type: "POST", url: '/Maps', contentType: "application/json; charset=utf-8", data: {easting: easting, northing: northing}, //Maps the controller params dataType: "json", success: function() { alert('Success'); } });

http://stackoverflow.com/q/26218035
tagged with: time
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26219179
tagged with: average
type: Question
tagged with: arrays
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26219179
has title: Stopwatch jQuery, calculate average and display
has body: I am working on a stopwatch and for now it works, but I want that I can calculate the average of time people get. E.g. let's say I have 5 times in an array which looks like the following: scores = ["00:32:192", "00:30:126", "00:31:542", "00:25:236", "00:36:320"];. You may think now: What the hell is it? Well the times are in: minutes:seconds:milliseconds. The array is printed to the screen by using a for loop. jQuery var int, ms=0, s=0, m=0; $('#swatch').text("00:00:00"); function swatch(){ var startTime = new Date().getTime(); int = setInterval(function(){ var time = new Date().getTime(); var dif = time-startTime; ms= dif%1000; s = Math.floor(dif/1000)%60; m = Math.floor(dif/1000/60)%60; if(ms &lt; 10) { ms = '0'+ms; } if(s &lt; 10) { s = '0'+s; } if(m &lt; 10) { m = '0'+m; } $('#swatch').text(m+':'+s+':'+ ms); },1); } var scores= []; $(document).on('keydown', function(e){ var result = $('#swatch').text(); var i = parseInt(scores.length); if(e.keyCode == 32 &amp;&amp; !int){ swatch(); } else if (e.keyCode == 32){ clearInterval(int); int=0; scores.push(result); $('#score ol').append('&lt;li&gt;' + scores[i] + '&lt;/li&gt;'); if(scores.length &gt;= 5) { $('#ao5').html("ao5: 00:27:43"); $('#ao5').slideDown(500); } if (scores.length &gt;= 12) { $('#ao12').html("ao12: 00:27:43"); $('#ao12').slideDown(500); } } }); In my code above this, you see this: if(scores.length &gt;= 5) { $('#ao5').html("ao5: 00:27:43"); $('#ao5').slideDown(500); } if (scores.length &gt;= 12) { $('#ao12').html("ao12: 00:27:43"); $('#ao12').slideDown(500); } I want if the array has 5 different time values (as in the example above where I showed you the array format) it outputs the average on the screen. As you see I just filled it in for myself to picture it, but I want a function that calculates it. I am building this in jQuery because the timer worked better in here than in JS. If some of you guys could give me an example and re-write my code with the function in it, that'd be great. I am really …

http://stackoverflow.com/comment/41320366
comment on: http://stackoverflow.com/a/26328132
type: AnswerComment
type: Comment
has text: The reason this is only happening in Firefox is that Firefox isn't performing "hoisting" of variables and functions to the top of where they were defined.
score: 1

http://stackoverflow.com/comment/41260102
type: AnswerComment
comment on: http://stackoverflow.com/a/26292268
type: Comment
has text: In your javascript please add this line too ..so that i could try to figure out the actual problem Orginal Line data: formID.serialize(), // serializes the form's elements. Replace with data: formID.serialize()+'&'+$.param({ 'submit': 1 }, // serializes the form's elements. hope it helps us to solve the problem
score: 0

http://stackoverflow.com/a/65652728
score: 1
has body: A bit enhanced version of great answer given by @user663031 var errors = { uppercase: { regex: /[A-Z]/, description: 'At least one uppercase letter' }, lowercase: { regex: /[a-z]/, description: 'At least one lowercase letter' }, digit: { regex: /[0-9]/, description: 'At least one digit' }, special: { regex: /[^A-Za-z0-9]/, description: 'At least one special symbol' }, length: { test: e =&gt; e.length &gt; 2, description: 'Should be more than 2 characters' }, }; function validatePassword(e) { return Object.entries(errors).flatMap(([name, { test, regex, description }]) =&gt; { const isValid = test ? test(e) : regex.test(e); return isValid ? [] : { description, name }; }); } console.log(JSON.stringify(validatePassword('a'),null,2))
answers question: http://stackoverflow.com/q/26322867
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/26319596
has comment: http://stackoverflow.com/comment/41304812
has comment: http://stackoverflow.com/comment/41305007
has body: In our angular application we have a form with validation and a reset button. We based it off of the examples in the documentation: https://docs.angularjs.org/guide/forms The trouble happens when someone tries to reset the form when a field is in an invalid state. My expectation is that upon reset, the field should be reset to an initial value and any validation will also be reset. However, I haven't figured out how to clear the validationl. This can be demonstrated in the aforementioned example from the documentation: https://docs.angularjs.org/guide/forms Load the demo and type in an invalid email address (potatoes) and then press reset. It resets valid fields, but not invalid. We have tried using $setPristine() and fiddling with $valid hasn't led anywhere either. This seems like a straight forward usecase, but I have not been able to find any answers. Please someone point how the trivial solution we have overlooked! Update: added code from https://docs.angularjs.org/guide/forms Name: E-mail: Gender: male female RESET SAVE form = master =
type: Question
has comment: http://stackoverflow.com/comment/41304894
linked to: http://stackoverflow.com/q/18648427
has comment: http://stackoverflow.com/comment/41305286
tagged with: javascript
score: 0
tagged with: validation
answer count: 1
tagged with: angularjs-validation
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/40219796
has comment: http://stackoverflow.com/comment/64656679
has title: How to reset validation with angular on reset?

http://stackoverflow.com/q/26309647
has comment: http://stackoverflow.com/comment/41287620
accepted answer: http://stackoverflow.com/a/26311264
has body: I am trying to serialize a form and send it over to the server using the http POST method... i have the code as follows for jquery .. var data = $scope.modal.element.find('form').serialize(); $.ajax({ type: "POST", url: "/user/add.html", data: data }).success(function(ret){ $scope.modal.body = $sce.trustAsHtml(ret); $http.get("/user/list.json").success(function(data){ $scope.users = data; }); }); the code above works just fine... when i use angular to post the data with the following code... var data = $scope.modal.element.find('form').serialize(); $http.post("/user/add.html", data).success(function(html){ $scope.modal.body = $sce.trustAsHtml(html); $http.get("/user/list.json").success(function(data){ $scope.users = data; }); }); the server freaks out ... and cannot understand any of the variables that are sent over... the server returns an error saying all my fields are empty ... (it cannot parse it) i have read some answers where it involves editing the html of the form and use ng-model to get the variables unfortunately i am in liberty of doing that ... please tell me what the difference between these 2 methods are ... and why one is working and the otherone is not... PS: i would like to use angular to POST the data
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26311264
type: Question
tagged with: javascript
tagged with: post
score: 0
has comment: http://stackoverflow.com/comment/41287149
answer count: 1
tagged with: jquery
has title: jquery post vs angular using POST method
linked to: http://stackoverflow.com/q/12190166
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41302608

http://stackoverflow.com/comment/41337721
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26336756
has text: $scope.catFn1 = function (button_value) { sharedService.prepForBroadcast(button_value); }
type: AnswerComment

http://stackoverflow.com/q/26353422
type: Question
has answer: http://stackoverflow.com/a/26353515
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26353775
has body: here is my comment form's textarea with my hidden inputs. $('#c_text').click(function() { if ($('#hidden_part').attr('class') == 'closed') { $('#hidden_part').css('display','block'); $('#hidden_part').removeClass('closed'); } else { $('#hidden_part').css('display','none'); $('#hidden_part').addClass('closed'); }; }); when i click, textarea hidden input apper well, but, how can i hide this part name called #hidden_part anywhere else on page ?
possible better answer: http://stackoverflow.com/a/26353515
tagged with: hidden-field
score: 0
has comment: http://stackoverflow.com/comment/41366610
has answer: http://stackoverflow.com/a/26353536
has answer: http://stackoverflow.com/a/26353792
accepted answer: http://stackoverflow.com/a/26353775
answer count: 4
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has title: jQuery disable a div, when click anywhere on page

http://stackoverflow.com/comment/41300877
has text: @Winestone : maybe it's browser-related but your fiddle produces a mousedown() event for me (using the latest version of Chrome for OsX)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26317430

http://stackoverflow.com/comment/41287459
score: 0
type: Comment
has text: Damn, D'UH! I should have known all that text would lead to a ridiculously simple question. In all the rush I've been through, I forgot that {name:"Adam"} is a mere key-value pair, so I can reach it by both, position (index) or name. Funny thing is, I was about to comment your answer a few minutes ago, in it's first version. Now, I have to add: I had no idea forEach was a valid method for the array object in js. When I first glimpsed your code, I thought you were posting a C# code. :D Thanks a lot!
type: AnswerComment
comment on: http://stackoverflow.com/a/26309941

http://stackoverflow.com/q/26336229
has answer: http://stackoverflow.com/a/26336458
type: Question
has body: Is there a way to define a variable inside of a project that I can reference inside of javascript/php that gets autofilled by webstorm before deployment (local or remote)? As an example, I have the variable: var foo = "/hello/world" This variable is used to define a relative path on the remote server (and is handled by the remote webserver). However, when I use the local webstorm server to do some local tests, it cannot map correctly and I would have to manually alter it to point to: var foo = "http://localhost:1234/hello/world" This makes errors more likely during deployment as I would have to double check each such variable in my project before deploying. My question is whether it is possible to replace these types of declaration with a special webstorm variable that can be customized based on each deployment location or if i can set a custom mapping for certain paths for the webstorm local webserver.
answer count: 2
tagged with: javascript
tagged with: webstorm
tagged with: jetbrains-ide
score: 0
tagged with: phpstorm
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26358685
has title: How to define separate local and remote variables (PHPStorm, Webstorm)
tagged with: php

http://stackoverflow.com/a/26277513
downvote count: 0
has body: As a rule converting strings to code isn't such a good idea. Why not just use an array of functions? var funcs = [ function($elem) { return $elem.attr('id') }, function($elem) { return $elem.html() } // ... etc. ]; tableRows.each(function() { $(this).children().each(function(i) { console.log( funcs[i]($(this)) ); }); });
type: Answer
answers question: http://stackoverflow.com/q/26276975
upvote count: 5
score: 5

http://stackoverflow.com/q/26248172
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/35716915
has comment: http://stackoverflow.com/comment/41176224
favorite count: 0
linked to: http://stackoverflow.com/q/8940182
has answer: http://stackoverflow.com/a/26248203
has comment: http://stackoverflow.com/comment/41175204
has comment: http://stackoverflow.com/comment/41175683
accepted answer: http://stackoverflow.com/a/26249593
tagged with: php
type: AnsweredQuestion
score: 3
has body: I am able to pass one variable (ID) to the javascript function, however when I go to add the businessname variable, the popupdiv does not display. Button to displaydiv and pass ID (this works) Javascript (works) function displayDiv(divid) { e=document.getElementById("zbadmin-"+divid); strUser=e.options[e.selectedIndex].value; if (strUser=='2') { document.getElementById('def').style.display = "block"; document.getElementById('link-id').href="delete?id="+divid; } } But when I add businessname, doesnt work Javascript (doesnt work) function displayDiv(divid,divbizname) { e=document.getElementById("zbadmin-"+divid); strUser=e.options[e.selectedIndex].value; if (strUser=='2') { document.getElementById('def').style.display = "block"; document.getElementById('link-id').href="delete?id="+divid+"&businessname="+divbizname; } } Am I missing something very simple? I replaced it with plain text and it didnt work either. EDIT: Heres the code prior to the button. It grabs data from SQL table and produces a dropdown. As a test, ive put $id as both variables in the below code, it works fine and displays the popup. while($row = mysql_fetch_array($proposal_result)) { $date=substr($row["date"], 0, 50); $formatted_date=date('d/m/Y', strtotime($date)); $id=substr($row["idproposal"], 0, 50); $businessname=substr($row["businessname"], 0, 50); $status=substr($row["status"], 0, 50); $staff=substr($row["staff"], 0, 50); $file_access='<storage-bucket>'; $file_name='proposal_'.$id.'_'.$businessname.'.pdf'; $file=$file_access.$file_name; print " ".$formatted_date."</ ".$id." ".$businessname." ".$staff." ".$status." Select and action...* Change Status for ID#".$id." Delete Proposal If I use the $id, $date it works fine as its grabbing numbers, but as soon as I replace the second variable with one thats a string, it doesnt display the popupdiv below: Reason for deleting proposal Added by mistake No longer required Incorrect Information Provided Reason 4
downvote count: 0
has answer: http://stackoverflow.com/a/26249593
type: Question
possible better answer: http://stackoverflow.com/a/26248203
tagged with: function
has title: Passing multiple variables to Javascript Function
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/41175900

http://stackoverflow.com/a/26448163
type: AcceptedAnswer
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26318030
has body: Probably because the server side code offers you more access such as: Required. Specifies the scopes to which the user who is signing in consents. For a single scope, use this format: scope: "wl.signin". For multiple scopes, use this format: scope: ["wl.signin", "wl.basic"]. If no scope is provided, the scope value of WL.init is used. If no scope is provided in WL.init or WL.login, WL.login returns an error. Note WL.login can request the "wl.offline_access" scope, but it requires a server-side implementation, and the WL.init function must set its response_type property to "code". Basically the client secret gives you higher security clearance so you can access extra stuff that you can't do otherwise. Note: You may be able to get around this limitation by provisioning your app as desktop/mobile app at your live sdk dashboard.
answers question: http://stackoverflow.com/q/26318030

http://stackoverflow.com/comment/41118767
type: Comment
has text: Are you aware that your regexp only match com/org/net domain name ? Don't you want an universal regexp ?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26218595

http://stackoverflow.com/comment/41117835
type: Comment
has text: sorry bother you, and thank you for you're commentnya it is correct Thank you very much
comment on: http://stackoverflow.com/a/26216798
type: AnswerComment
score: 0

http://stackoverflow.com/a/26250608
answers question: http://stackoverflow.com/q/26250536
has body: you can use jquery : Html : GO Script : $(document).ready(function() { $('h2').click(function() { $(this).html("STOP"); }); }); jsfiddle demo or you can use javascript : GO jsfiddle demo
score: 0
type: Answer

http://stackoverflow.com/a/26279748
answers question: http://stackoverflow.com/q/26279531
accepted answer of: http://stackoverflow.com/q/26279531
type: Answer
has body: That's happening becuause you have &lt;base&gt; tag. The base URL to be used throughout the document for relative URL addresses. Since the base URL href is '/', it always start from root. So on local machine it doesn't find any css/js files, as it would check the files from root i.e. C/D/E drive. And it totally works fine for webserver, since the root would be your public folder. Get rid of base tag.
score: 7
upvote count: 7
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26245013
type: Answer
answers question: http://stackoverflow.com/q/26243894
has body: The solution is based on Use of .apply() with 'new' operator. Is this possible? JSON config { shape: 'SphereGeometry', properties: [ null, 7, 16, 16 ] } and creating an new object: new (Function.prototype.bind.apply( THREE[object.shape], object.properties ))
score: 0

http://stackoverflow.com/comment/41182502
has text: "Create an empty **object**..."?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26252918
type: AnswerComment

http://stackoverflow.com/a/26342526
upvote count: 1
type: Answer
has body: I don't know what your php script returns now, but I would have it return key - value pairs of username slugs and statuses. Then you could add the username slug as an ID to each user span and target the correct span to change the status if necessary or to add an additional user if it is not found in the html. At the moment you are simply appending span's each time your ajax function returns a result instead of checking the existing list against the returned list from the server.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26342314

http://stackoverflow.com/a/26210914
accepted answer of: http://stackoverflow.com/q/26210777
score: 0
answers question: http://stackoverflow.com/q/26210777
has body: You needed to clear the interval $("#ZoomOut").mousedown(function() { mouseStillDown = true; doZoomOut(); }); $("#ZoomOut").mouseup(function() { mouseStillDown = false; clearInterval(int); }); $("#ZoomIn").mousedown(function() { mouseStillDown = true; doZoomIn(); }); $("#ZoomIn").mouseup(function() { mouseStillDown = false; clearInterval(int); }); var int; function doZoomOut() { if (!mouseStillDown) { return; } if (mouseStillDown) { int = setInterval(ZoomOut, 100); } }; function doZoomIn() { if (!mouseStillDown) { return; } if (mouseStillDown) { int = setInterval(ZoomIn, 100); } }; JSFIDDLE: http://jsfiddle.net/TRNCFRMCN/ctdzgx5a/3/.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26323510
tagged with: this
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has title: preserving both `this` references when using jQuery proxy
has answer: http://stackoverflow.com/a/26323536
has body: I'm writing a jQuery plugin, and I use $.proxy to remain in context when attaching events to functions. Something like this: function myPlugin(element) { this.element = $(element); } $.extend(myPlugin.prototype, { init: function() { this.btns = this.element.find('.control-btns'); this.register_events(); }, register_events: function() { this.btns .off('click.myplugin') .on('click.myplugin', $.proxy(this.foo, this)); }, foo: function(e) { this.bar(); var btnClicked = $(e.target); }, bar: function() { // some code here } }); As you can see, when running foo I need to have the right context for this in order to be able to call the bar function (it's just for the example, I do more than call one specific function). However, I also need the other this - the one representing the button being clicked. I thought e.target will be enough, but it turns out that it catches the thing that was clicked, not the element with the event listener - i.e. if my button has some inner area (say a span), clicking it will propagate, but then e.target will point to the &lt;span&gt; instead of the &lt;button&gt;. I made a small demo showing the problem. How can I pass the correct this context, without losing the one I would've gotten otherwise?
type: Question
accepted answer: http://stackoverflow.com/a/26323536
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/comment/41325332
comment on: http://stackoverflow.com/q/26330701
score: 0
has text: How to download the response? In [jQuery's ajax function](http://api.jquery.com/jquery.ajax/) you'll get the response in the success method, as the first parameter.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26320965
downvote count: 1
score: 3
upvote count: 4
answers question: http://stackoverflow.com/q/26320525
type: Answer
has body: I don't think that can be done with regular textareas. What you can do (and how most online code editors do it) is to create a transparent textarea that overlays on top of a div that contains the styled code. The user would still be able to type and interact with the input (and it fires the associated form events), and you can show syntax highlighting in the div that the user will visually see (see Textarea that can do syntax highlighting on the fly?) Now as for JSON formatting, I would add custom events to the textarea so that when a user types or paste something, run it through a Javascript JSON prettifier (see How can I pretty-print JSON using JavaScript?) and then re-populate the div and textarea accordingly

http://stackoverflow.com/comment/41291510
type: QuestionComment
score: 2
has text: Could you keep track of it's index in the string?
comment on: http://stackoverflow.com/q/26312116
type: Comment

http://stackoverflow.com/comment/41227635
has text: @Cerbrus I can provide a bit more context but the strange thing is this: it works in other browsers, even in IE8. My script is executed after the DOM is ready and the only way to get it working all of the time is when you deactivate browser cache...
type: Comment
comment on: http://stackoverflow.com/q/26277630
score: 0
type: QuestionComment

http://stackoverflow.com/q/26302056
has comment: http://stackoverflow.com/comment/41274019
score: 1
has title: HTML5 Canvas scaling an image animation
type: Question
tagged with: canvas
has answer: http://stackoverflow.com/a/26302821
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has body: I've created a straight forward linear HTML5 animation but I now want the image to continuously scale bigger then smaller until the end of the canvas' height. What's the best way to do this? Here's a JSFIDDLE window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame; var canvas = document.getElementById('monopoly-piece'); var context = canvas.getContext('2d'); var img = document.createElement("img"); img.src = "images/tophat.png"; img.shadowBlur = 15; img.shadowColor = "rgb(0, 0, 0)"; var xSpeed = 0; //px per ms var ySpeed = 0.15; function animate(nowTime, lastTime, xPos, yPos) { // update if ((img.style.height + yPos) &gt; canvas.height) { xPos = 0; yPos = 0; } var timeDelta = nowTime - lastTime; var xDelta = xSpeed * timeDelta; var yDelta = ySpeed * timeDelta; // clear context.clearRect(0, 0, canvas.width, canvas.height); // shadow context.shadowOffsetX = 3; context.shadowOffsetY = 7; context.shadowBlur = 4; context.shadowColor = 'rgba(0, 0, 0, 0.4)'; //draw img context.drawImage(img, xPos, yPos); if (yPos &gt; canvas.height - img.height ) { addMarker(); } else { requestAnimationFrame( function(timestamp){ animate(timestamp, nowTime, xPos + xDelta, yPos + yDelta); } ); } } animate(0, 0, -10, 0); Here is my current code which animates an image from the top of the canvas element to the bottom and then stops. Thanks.
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/41399635
comment on: http://stackoverflow.com/q/26225191
score: 0
type: Comment
type: QuestionComment
has text: Can you provide files to test locally?

function-parameter
type: Tag
tags question: http://stackoverflow.com/q/26273624
tag name: function-parameter

http://stackoverflow.com/q/26324762
has title: jQuery sent URL request
tagged with: php
has comment: http://stackoverflow.com/comment/41314072
has comment: http://stackoverflow.com/comment/41314034
has body: In my page i want to send a jQuery request to another PHP script, without reloading the whole page. When clicking a button, the request needs to be sent to another PHP script, through POST. I just can't get it to work. My code so far: Javascript: PHP code of button & URL to be sent: if($member['Paused']==0){ $pausedata = '?action=agentpause&agent='.$member['Location'].'&paused=true'; echo(' Pause&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp '); } else{ $pausedata = '?action=agentpause&agent='.$member['Location'].'&paused=false'; echo(' Unpause '); } Any suggestions/ideas?
accepted answer: http://stackoverflow.com/a/26324841
score: 0
has comment: http://stackoverflow.com/comment/41314061
answer count: 1
tagged with: javascript
tagged with: post
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26324841
tagged with: jquery
type: Question

http://stackoverflow.com/comment/41166706
type: AnswerComment
type: Comment
has text: link only answers are discouraged
comment on: http://stackoverflow.com/a/26243955
score: 0

http://stackoverflow.com/a/26280740
answers question: http://stackoverflow.com/q/26280695
type: Answer
has comment: http://stackoverflow.com/comment/41234962
score: 2
has comment: http://stackoverflow.com/comment/41233793
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26280695
has comment: http://stackoverflow.com/comment/41233706
type: AcceptedAnswer
downvote count: 0
has body: You can just split after removing the rest. var line = "ERROR 2014-10-08 15:01:16,646 [localhost-startStop-1] Cannot alter it is not a table."; var arr = line.replace(/\s+/g," ").replace(/\s\[.+$/,"").split(" "); console.log(arr);
has comment: http://stackoverflow.com/comment/41234371

http://stackoverflow.com/q/26288949
tagged with: css
has answer: http://stackoverflow.com/a/26289125
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: dom
type: Question
has title: Is it possible to show an element just before entering a long running sync process?
has answer: http://stackoverflow.com/a/26289450
has comment: http://stackoverflow.com/comment/41249408
tagged with: javascript
has body: This is a very simple use case. Show an element (a loader), run some heavy calculations that eat up the thread and hide the loader when done. I am unable to get the loader to actually show up prior to starting the long running process. It ends up showing and hiding after the long running process. Is adding css classes an async process? See my jsbin here: http://jsbin.com/voreximapewo/12/edit?html,css,js,output
has answer: http://stackoverflow.com/a/26289179
answer count: 3
accepted answer: http://stackoverflow.com/a/26289450
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26289125

http://stackoverflow.com/comment/41347326
has text: why is your script outside the head and body tags? move it just before the end `body` tag.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26342710

http://stackoverflow.com/q/26194707
score: 1
has comment: http://stackoverflow.com/comment/41080889
has comment: http://stackoverflow.com/comment/41093716
type: Question
tagged with: javascript
has body: Background I decided I would practice by making a simple calculator app in JS. The first step was to implement a stack class. I ran into some problems however in achieving data encapsulation with the revealing prototype pattern (?). Here's how it looks right now: Stack "class": var Stack = (function () { var Stack = function() { this.arr = []; // accessible to prototype methods but also to public }; Stack.prototype = Object.prototype; // inherits from Object Stack.prototype.push = function(x) { this.arr.push(x); }; Stack.prototype.pop = function() { return this.arr.length ? (this.arr.splice(this.arr.length - 1, 1))[0] : null; }; Stack.prototype.size = function() { return this.arr.length; }; Stack.prototype.empty = function() { return this.arr.length === 0; }; return Stack; })(); Test code: var s1 = new Stack(); var s2 = new Stack(); for(var j = 1, k = 2; j &lt; 10, k &lt; 11; j++, k++) { s1.push(3*j); s2.push(4*k); } console.log("s1:"); while(!s1.empty()) console.log(s1.pop()); console.log("s2:"); while(!s2.empty()) console.log(s2.pop()); The Problem The only problem is that the arr is accessible. I would like to hide the arr variable somehow. Attempts at a Solution My first idea was to make it a private variable like Stack: var Stack = (function () { var arr = []; // private, but shared by all instances var Stack = function() { }; Stack.prototype = Object.prototype; Stack.prototype.push = function(x) { arr.push(x); }; // etc. })(); But of course this approach doesn't work, because then the arr variable is shared by every instance. So it's a good way of making a private class variable, but not a private instance variable. The second way I thought of (which is really crazy and definitely not good for readability) is to use a random number to restrict access to the array variable, almost like a password: var Stack = (function() { var pass = String(Math.floor(Math.pow(10, 15 * Math.random())); var arrKey = "arr" + pass; var Stack = function() { this[arrKey] = []; // pr…
tagged with: prototype
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26194761
tagged with: private-members
favorite count: 0
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26199235
linked to: http://stackoverflow.com/q/21799353
has answer: http://stackoverflow.com/a/26195012
has comment: http://stackoverflow.com/comment/41075093
has title: Making private instance variable accessible to prototype methods enclosed in anonymous function

http://stackoverflow.com/q/26342832
tagged with: checkbox
score: 0
has comment: http://stackoverflow.com/comment/41348628
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41348208
answer count: 0
tagged with: swap
tagged with: javascript
tagged with: compare-and-swap
has comment: http://stackoverflow.com/comment/41347962
has title: Swapping imputed values. Z axis optimization. Making smallest value the Z axis
type: Question
has comment: http://stackoverflow.com/comment/41348055
tagged with: http://stackoverflow.com/tag/html
has body: I am making a simple cost estimator. It takes 3 imputed values X,Y,Z and displays a price which is a simple calculation of a value by the z axis (the third of 3 collected values). You can view the estimator here: http://codepen.io/FredHair/pen/FgJAd What I would like to add is a checkbox that when clicked would check that the smallest value is stored as the Z axis. So if the user imputed 3 values and the X or Y value was the smallest then that value would be swapped with with the z axis value. How would I go about writing a function for this? Any help would be greatly appreciated even in pseudo code, which I could then write myself. I have made a checkbox: &lt;input type="checkbox" id="zAxis"&gt;Z Axis Optimization&lt;br&gt; This is my function for the Estimator: //Calc with Switch// function calculator(){ var x = Number(document.getElementById("x").value); var y = Number(document.getElementById("y").value); var z = Number(document.getElementById("z").value); var p = Number(3); var result; var calc = document.getElementById("choice").value switch(calc){ case"1" : result = z * p; break; case"2" : result = (z * p) + 50; break; case"3" : result = (z * p) + 30; break; } //Display Result// document.getElementById("result").innerHTML = " = £ " + result; I know I will need to write a function like: IF (x&lt;=y &amp;&amp; &lt;=z) then do something OR (y&lt;=y &amp;&amp; &lt;=x) then do something But any help will be greatly appreciated. Here is Codepen again: http://codepen.io/FredHair/pen/FgJAd Thanks in advance.

http://stackoverflow.com/comment/41143501
type: QuestionComment
comment on: http://stackoverflow.com/q/26231105
has text: can you provide an example of DOM lookalike please ?
score: 0
type: Comment

http://stackoverflow.com/comment/41279001
type: Comment
type: QuestionComment
has text: when you instantiate the region, you can provide an el property for it that is a jquery object - does something like that work?
comment on: http://stackoverflow.com/q/26298347
score: 0

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/26282111
tags question: http://stackoverflow.com/q/26331503
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/26340590

http://stackoverflow.com/comment/41279327
has text: And where exactly did you get stuck, when you attempted to solve this yourself?
comment on: http://stackoverflow.com/q/26305628
type: Comment
type: QuestionComment
score: 8

http://stackoverflow.com/comment/41096517
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26206703
score: 2
has text: You would need JavaScript. It's not a good idea for reasons of usability. Having things behave in a way that users do not expect violates the Principle of Least Astonishment: http://en.wikipedia.org/wiki/Principle_of_least_astonishment

http://stackoverflow.com/comment/41145916
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26233206
has text: you are validating controls in javascript then why you need to validate again in c#?

http://stackoverflow.com/q/26289896
has comment: http://stackoverflow.com/comment/41251114
has comment: http://stackoverflow.com/comment/41251096
possible better answer: http://stackoverflow.com/a/26289954
linked to: http://stackoverflow.com/q/16063394
accepted answer: http://stackoverflow.com/a/26289960
has comment: http://stackoverflow.com/comment/41251063
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/26289954
has answer: http://stackoverflow.com/a/26289960
type: Question
has body: In javascript, I have an object literal: var objA = { doStuff: function() { // do objA stuff } } I extend objA, and override the doStuff method: var objB = _.extend(objA, { doStuff: function() { // do objB stuff } }); However, now when objB.doStuff() is called only objB stuff gets done. I would like for both objA and objB stuff to be done. I tried the following: var objB = _.extend(objA, { doStuff: function() { this.prototype.doStuff.call(this, arguments); // do objB stuff } }); objB.__proto__ = objA; However this doesn't work. I guess I don't understand how prototypal inheritance works when extending object literals. So, what is the right way to do this?
has comment: http://stackoverflow.com/comment/41250822
has title: Object Literals and Prototypal Inheritance?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41252542
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26290058

http://stackoverflow.com/a/26320401
answers question: http://stackoverflow.com/q/26320371
has comment: http://stackoverflow.com/comment/41306518
downvote count: 0
type: Answer
has body: I'd suggest, as you say, using filter(): $(document).find(".middletext:not(.quoteheader) &gt; a[href^='http://fakeURL.com/']") .filter(function(){ return $(this).text().indexOf('Re:') !== 0; }).css('color','red'); // or whatever References: JavaScript: String.prototype.indexOf(). jQuery: filter(). find(). text().
score: 1
upvote count: 1

http://stackoverflow.com/comment/41262720
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26262027
has text: thanks this works great and I will mark it as the answer. Quick followup. `http://jsfiddle.net/zg6536nv/2/` I've pre added 2 additional fields with remove buttons. But I can't remove them. Have I missed something obvious ?
type: Comment

http://stackoverflow.com/comment/41169719
has text: Ken Fyrstenberg wrote some nice code to pixelate an image on this Stackoverflow post: http://stackoverflow.com/questions/19129644/how-to-pixelate-an-image-with-canvas-and-javascript/19129822#19129822
type: Comment
comment on: http://stackoverflow.com/q/26245516
score: 0
type: QuestionComment

http://stackoverflow.com/q/26246229
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26246353
has title: Bootstrap styling of glyph as a button
has body: I'm building a page with a series of inputs. One of them is a select list of email addresses. I'm including a Plus glyph at the right end of the list as a button to invoke some javascript that will add additional select lists for more recipients. I've spent quite a bit of time trying to do this without the results I was hoping for. The best I can do is this code example. If you click directly on the plus, you get the result. However, I wish that the entire square surrounding the glyph was clickable instead - not unlike a button. Any suggestions? Thank you! Requested By user1@domain.com user2@domain.com
tagged with: css
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26246353
type: AnsweredQuestion
tagged with: javascript
type: Question

http://stackoverflow.com/comment/41238365
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26282749
score: 2
has text: If `gBCR()` is read-only whether not, is not mentioned at [MSDN](http://msdn.microsoft.com/en-us/library/ms536433%28v=vs.85%29.aspx), but [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect#Browser_compatibility) article says: `"In IE8 ... additional properties ... cannot be added onto these TextRectangle objects."`

http://stackoverflow.com/comment/41251242
type: Comment
comment on: http://stackoverflow.com/a/26287559
type: AnswerComment
score: 0
has text: ah, i understand. The `top` property just needed to be reset when the class was removed. Updated fiddle above

object
tags question: http://stackoverflow.com/q/26239140
tags question: http://stackoverflow.com/q/26240900
tag name: object
tags question: http://stackoverflow.com/q/26277820
tags question: http://stackoverflow.com/q/26319146
tags question: http://stackoverflow.com/q/26211412
tags question: http://stackoverflow.com/q/26220911
tags question: http://stackoverflow.com/q/26324395
tags question: http://stackoverflow.com/q/26341383
tags question: http://stackoverflow.com/q/26305374
tags question: http://stackoverflow.com/q/26289509
tags question: http://stackoverflow.com/q/26236600
tags question: http://stackoverflow.com/q/26266913
tags question: http://stackoverflow.com/q/26347501
tags question: http://stackoverflow.com/q/26246063
tags question: http://stackoverflow.com/q/26248001
tags question: http://stackoverflow.com/q/26245289
tags question: http://stackoverflow.com/q/26255867
tags question: http://stackoverflow.com/q/26207410
tags question: http://stackoverflow.com/q/26296250
tags question: http://stackoverflow.com/q/26284528
tags question: http://stackoverflow.com/q/26319089
tags question: http://stackoverflow.com/q/26351853
tags question: http://stackoverflow.com/q/26301703
tags question: http://stackoverflow.com/q/26351632
tags question: http://stackoverflow.com/q/26337196
tags question: http://stackoverflow.com/q/26284681
tags question: http://stackoverflow.com/q/26320302
tags question: http://stackoverflow.com/q/26203194
tags question: http://stackoverflow.com/q/26304694
tags question: http://stackoverflow.com/q/26297318
tags question: http://stackoverflow.com/q/26313092
tags question: http://stackoverflow.com/q/26296850
tags question: http://stackoverflow.com/q/26307461
tags question: http://stackoverflow.com/q/26226352
type: Tag
tags question: http://stackoverflow.com/q/26279539

http://stackoverflow.com/a/26211689
score: 0
answers question: http://stackoverflow.com/q/26199537
has body: It seems as if you have the ADE activated, which is not necessary on a mobile device. In your HTML, please delete the line (your path to ade.js might differ slightly). This will make the error go away. In addition, my suggestion is to also add an onError event to the tracker. In this case, you'll be notified when the tracker cannot be loaded (wrong location specified, invalid file etc), and you can react accordingly.
type: Answer

http://stackoverflow.com/q/26226624
upvote count: 1
type: AnsweredQuestion
has title: iframes wont work with wildcard catchall sub-domains and dnsmasq
has comment: http://stackoverflow.com/comment/41134334
has body: I have a local development box that's setup up with apache2 and catchall wild-card sub-domains, dnsmasq and a local website. This set up is convenient for testing with multiple browsers since the web application on the local site doesn't allow multiple browsers to log in from the same location/domain. This system works well except when I tried testing iframes and using wild-card sub-domains within the iframes src url. After which I get a page not found error. As evident from the URL contained within the error message that you can view at the bottom of this page, it seems that there may be some conflict between apache configuration files for virtual hosts in game and the redirect in jsgame but I'm at a loss at how to fix it. Can anyone suggest how to fix resolve this problem? The OS is Debian 6 and this is how my system is set up. Apache Within etc/apache2/sites-available/game &lt;VirtualHost *:80&gt; ServerName catchall.game ServerAlias *.game VirtualDocumentRoot /var/www/%1 &lt;/VirtualHost&gt; # &lt;VirtualHost *:80&gt; ServerName mplayer.game ServerAlias *.game DocumentRoot /var/www/game/public &lt;/VirtualHost&gt; Website Within etc/apache2/sites_available/jsgame Alias /jsgame/ usr/share/jsgame RedirectMatch ^/jsgame/?$ /jsgame/example/index.html ProxyRequests Off &lt;Proxy *&gt; Order deny,allow Allow from all &lt;/Proxy&gt; ProxyPass /JSGAME_REST http://127.0.0.1:19384/JSGAME_REST retry=1 ProxyPass /AVATAR http://127.0.0.1:19384/AVATAR retry=1 ProxyPass /UPLOAD http://127.0.0.1:19384/UPLOAD retry=1 Dnsmasq line 62 within etc/dnsmasq.conf # Add domains which you want to force to an IP address here. # The example below send any host in doubleclick.net to a local # webserver. address=/.game/127.0.0.1 index.html The web application is accessed via: master.game/jsgame/example/index.html?game_id=45 iframe iframe code within /jsgame/example/index.html &lt;iframe id="player0" width="25%" height="25%" src="player0.game/jsgame/pts1.html" style="position:absolute;left:0p…
has answer: http://stackoverflow.com/a/26247029
type: Question
tagged with: apache
has comment: http://stackoverflow.com/comment/41170253
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41171593
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26247029
has comment: http://stackoverflow.com/comment/41172218
score: 1
tagged with: dnsmasq

http://stackoverflow.com/a/26237424
accepted answer of: http://stackoverflow.com/q/26237261
has comment: http://stackoverflow.com/comment/41154352
has comment: http://stackoverflow.com/comment/41154282
upvote count: 3
has comment: http://stackoverflow.com/comment/41157166
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41153845
has body: You can do this simpler using delay in a basic for loop, but you also need to use fadeIn instead of fadeTo as the opacity animation of fadeTo is not handled by IE7: JSFiddle: http://jsfiddle.net/TrueBlueAussie/7u8qmdoo/6/ $(document).ready(function() { for (var i = 0; i &lt; 8; i++){ $("#num" + i).delay(i * 2000).fadeIn(1000); } }); This is the same as: $("#num0").delay(0).fadeIn(1000,1); $("#num1").delay(2000).fadeIn(1000,1); $("#num2").delay(4000).fadeIn(1000,1); etc
type: Answer
answers question: http://stackoverflow.com/q/26237261
score: 3
downvote count: 0

http://stackoverflow.com/comment/41080228
type: AnswerComment
type: Comment
has text: Wow, upvoted/accepted the answer that copied what @MelanciaUK said in the comments and what I described in detail in my answer... there is justice.
comment on: http://stackoverflow.com/a/26197739
score: 0

http://stackoverflow.com/q/26213836
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/41109938
has comment: http://stackoverflow.com/comment/41109664
has body: Im trying to view THIS on my google chrome browser (Version 37.0.2062.124 m), and for some reason, the animation isnt following the cursor like it does on other browsers. There's nothing wrong with the code since it seems to be working on chrome on my other PC too. I've tried to Clear everything on the cache, deleted my temp file and flushed my DNS, both in Windows and Chrome, but its not working. Is there anything else I can clear?
has comment: http://stackoverflow.com/comment/41109640
tagged with: javascript
has title: Is there anything else to clear besides browser cache?
tagged with: browser
score: 0
has comment: http://stackoverflow.com/comment/41110066
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0

http://stackoverflow.com/a/26251431
has body: You're right chrome.storage.sync.clear(), removes all storage from sync. However, if you want to use that function when the browser 'exists', you'll have to look at the Processes Api. You would probably want to use this function (from the documentation) : chrome.processes.onExited.addListener(function(){...}); It takes processId as one of the arguments. So you would just have to get hold of the processId for the browser process. I found a relevant answer for this on SO only. It suggests you do something like: //Basically loop through all the processes to get the browser's Process Id var browserId; chrome.processes.getProcessInfo([], false, function(processes) { processes.forEach(function(process) { if (process.type === 'browser') { browserId = process.id; } }); }); Once you have the browser's Process Id, you can add a listener to the exit event and do the needful. I hope it gets you started in the right direction.
score: 0
has comment: http://stackoverflow.com/comment/41180079
type: Answer
answers question: http://stackoverflow.com/q/26250840

http://stackoverflow.com/a/26347821
has comment: http://stackoverflow.com/comment/41387318
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41359432
type: Answer
has comment: http://stackoverflow.com/comment/41369838
downvote count: 0
has comment: http://stackoverflow.com/comment/41356877
answers question: http://stackoverflow.com/q/26347202
score: 1
has comment: http://stackoverflow.com/comment/41463962
accepted answer of: http://stackoverflow.com/q/26347202
has body: Seems like this previous response didnt return data, which used to fill table. So You are trying to attach datatables script to empty table. So I am assume error somewhere in loading table contents. Small example with static data: Column 1 Column 2 Row 1 Data 1 Row 1 Data 2 Row 2 Data 1 Row 2 Data 2
has comment: http://stackoverflow.com/comment/41425072
has comment: http://stackoverflow.com/comment/41387108
has comment: http://stackoverflow.com/comment/41421428

http://stackoverflow.com/q/26260692
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41196448
has answer: http://stackoverflow.com/a/26260820
has body: I need to create a promise based on a ajax call to a web method. Originally, I had it working using this method: $.ajax({ url: window.location.pathname + "/LoadPage" )}.done(function(data){ //do some stuff }).fail(function(){ //do other stuff }); Then I ran into the issue of needing to wait for something to load, before doing something else, so I decided to create a variable to hold the promise object. var promiseObj = $.ajax({...}); Then create a named function to call function someFunction(data){...} get access to the response from the server var someData = promiseObj.responseText; and call it like promiseObj.done(someFunction(someData)); and it didn't work. I was getting undefined errors. So I tried just to console.log it console.log(promiseObj) //shows the object console.log(promiseObj.responseText) //gives undefined What am I doing wrong? How to I send the data from the ajax call to another function using this method? Any help would be appreciated.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26260820
tagged with: javascript
type: Question
score: 0
has title: Cannot access jquery ajax responseText in a deferred object

http://stackoverflow.com/comment/41120499
type: AnswerComment
has text: @IsmaelMiguel: Yeah, I was just editing to fix that.
comment on: http://stackoverflow.com/a/26218884
type: Comment
score: 0

http://stackoverflow.com/comment/41387672
comment on: http://stackoverflow.com/q/26213540
has text: @bnz: Given I am an Google Maps for API V3 for Work customer, do you know where I can put my clientId and signature in my request?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41194914
score: 0
has text: A pat on the back and a coupon for another pat on the back
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26259910

http://stackoverflow.com/comment/41238523
score: 2
type: QuestionComment
type: Comment
has text: It's accordiOn, not accordiAn :)
comment on: http://stackoverflow.com/q/26283411

http://stackoverflow.com/q/26348585
has body: I have a SharePoint list with a date column, a RedTeamScore column, and a BlueTeamScore column (see screenshot) My Highcharts graph currently consist of a single series - RedTeamScore (see screenshot) I'd like to add an additional series to my chart from the BlueTeamScore column. Below is a snippet of my code
answer count: 1
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26365094
type: Question
accepted answer: http://stackoverflow.com/a/26365094
has title: Need assistance adding an additional series to a Highcharts graph using a SharePoint list and PSServices
tagged with: highcharts
tagged with: javascript
tagged with: sharepoint
has comment: http://stackoverflow.com/comment/41358079
tagged with: spservices

http://stackoverflow.com/a/26295671
score: 1
upvote count: 1
has body: I fixed up some of your code for optimization. First update your transform coordinates as such: #new-link-line { -webkit-transform-origin: top center; -moz-transform-origin: top center; -o-transform-origin: top center; -ms-transform-origin: top center; transform-origin: top center; } Second, update your linkline left CSS position as such: .css('left', offset.left + $(this).outerHeight() / 2 - ($linkLine.width() / 2)); This will achieve the desired effect. Updated jsFiddle: http://jsfiddle.net/25E8W/416/ Full updated JS: // Store this now so you don't have to search DOM for it every time you do mousemove var $op = $('#origin-point'); $op.mousedown(function() { var $linkLine = $('&lt;div id="new-link-line"&gt;&lt;/div&gt;').appendTo('body'); var offset = $op.offset(); $linkLine .css('top', offset.top + $(this).outerWidth() / 2) .css('left', offset.left + $(this).outerHeight() / 2 - ($linkLine.width() / 2)); $(document) .mousemove(linkMouseMoveEvent) .bind('mousedown.link', function(event) { if(event.which == 3) { endLinkMode(); } }) .bind('keydown.link', function(event) { // ESCAPE key pressed if(event.keyCode == 27) { endLinkMode(); } }); }); function linkMouseMoveEvent(event) { var offset = $op.offset(); if ($('#new-link-line').length &gt; 0) { var originX = offset.left + $op.outerWidth() / 2; var originY = offset.top + $op.outerHeight() / 2; var length = Math.sqrt( (event.pageX - originX) * (event.pageX - originX) + (event.pageY - originY) * (event.pageY - originY) ); var angle = 180 / 3.1415 * Math.acos((event.pageY - originY) / length); if (event.pageX &gt; originX) angle *= -1; $('#new-link-line') .css('height', length) .css('-webkit-transform', 'rotate(' + angle + 'deg)') .css('-moz-transform', 'rotate(' + angle + 'deg)') .css('-o-transform', 'rotate(' + angle + 'deg)') .css('-ms-transform', 'rotate(' + angle + 'deg)') .css('transform', 'rotate(' + angle + 'deg)'); } } function endLinkMode() { $('#new-link-line').remove(); $(document).unbind('mousemove.link').u…
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26295128
downvote count: 0
answers question: http://stackoverflow.com/q/26295128
type: Answer

http://stackoverflow.com/comment/41275923
comment on: http://stackoverflow.com/q/26303766
score: 0
type: QuestionComment
type: Comment
has text: Javascript [doesn't have](http://www.crockford.com/javascript/inheritance.html) a classical inheritance mechanism.

http://stackoverflow.com/comment/41150239
type: QuestionComment
has text: By the way, just hiding it like that isn't enough... I can still see it in the edit history xD. If you can regenerate it then I would do
comment on: http://stackoverflow.com/q/26235159
score: 0
type: Comment

http://stackoverflow.com/q/26346395
answer count: 2
has comment: http://stackoverflow.com/comment/41354156
upvote count: 1
has answer: http://stackoverflow.com/a/26346626
tagged with: javascript
has comment: http://stackoverflow.com/comment/41354140
score: 0
linked to: http://stackoverflow.com/q/7295634
downvote count: 1
has comment: http://stackoverflow.com/comment/41354275
favorite count: 0
has comment: http://stackoverflow.com/comment/41354213
has body: I know that sounds weird, but bear with me. I have an object like this: Functions = { function1: function() { function2: function() { alert('bam'); } } } How can I fire function2? I tried Functions.function1.function2and Functions.function1().function2() but none works. Am I doing something wrong?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41354178
has comment: http://stackoverflow.com/comment/41354080
has comment: http://stackoverflow.com/comment/41354090
has title: Access function inside function inside object
has answer: http://stackoverflow.com/a/26346560
has comment: http://stackoverflow.com/comment/41354229
has comment: http://stackoverflow.com/comment/41354126
type: Question

http://stackoverflow.com/comment/41083023
has text: Yea, even if there was a plugin you would most likely have to re-make the image to conform with the plugin anyhow, so cropping them would be easier most likely. I would probably just use `background-size` to test though if it's just for conceptual reasons.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26199269
type: Comment

http://stackoverflow.com/q/26336147
has body: I'm looking for a way to generate proper fragmented *.mp4 files for MediaSourceExtension (Chrome). I tried out the example from here: http://people.mozilla.org/~jyavenard/tests/mse_mp4/paper.html and with the given video file it worked just fine. So I tried out some settings for avconv / MP4 box to get my own video files working, but I'm just getting video errors... avconv -i file -c:v libx264 -c:a aac -f mp4 -movflags frag_keyframe+empty_moov output.mp4 MP4Box -rap -frag-rap -dash 30000 -segment-name out.mp4 output.mp4 Chrome media-internals says: error Skipping unrecognized top-level box: ftyp So does anyone know how to convert them properly?
type: Question
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/37776289
answer count: 1
downvote count: 0
has title: Converting fragmented mp4 file for MSE (Media Source Extensions)
favorite count: 0
tagged with: mse
tagged with: avconv
type: UnansweredQuestion
score: 6

http://stackoverflow.com/comment/41249372
has text: I don't mean to say that there aren't exceptions, but rather that it should be used sparingly.
comment on: http://stackoverflow.com/a/26288955
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26272172
downvote count: 0
has comment: http://stackoverflow.com/comment/41402775
upvote count: 2
type: AcceptedAnswer
has body: Don't use inline onclick handlers. You can clear input simply with ngClick directive: I would also recommend to clear HTML, move styles to CSS files, it would make you code more comprehensive.
accepted answer of: http://stackoverflow.com/q/26272019
type: Answer
answers question: http://stackoverflow.com/q/26272019
score: 2

http://stackoverflow.com/comment/41262057
has text: 7min delay is active... :)
comment on: http://stackoverflow.com/a/26296239
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/26260855
score: 0
has body: am using the patterns like "/[a-zA-Z0-9][^\s]/" and "/\s/" but no one is working. can you give any solution for this "ng pattern for input tag and which allows oly alphanumeric but it does not allow spaces in the input field ".
answer count: 3
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26261803
has title: ng pattern which allows alphanumeric but without spaces for input tag in angular js
upvote count: 1
has answer: http://stackoverflow.com/a/38972814
downvote count: 1
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/19423827
has answer: http://stackoverflow.com/a/26277346

http://stackoverflow.com/comment/41252327
type: Comment
type: AnswerComment
has text: I got it to work http://jsfiddle.net/3ec67gne/4/. Now is it possible to style the not rated, 0%, and 100% using CSS? Also reverse the order, when you press the down arrow it should be 0 and up should be 100.
score: 0
comment on: http://stackoverflow.com/a/26290385

http://stackoverflow.com/q/26264534
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26264854
has body: I am working on using turn.js. I have not been successful with integrating the API, so I started working in JSFiddle to understand where I am making my errors. The example I am following is from the Creative Technologist with a JSFiddle Demo. However, when I do a simple copy and paste I am unable to get a working demo my demo. The pages of the book are not being hidden. When I run the code locally I get the following error Uncaught TypeError: undefined is not a function Here is the partial code where the browser is directing me to: plugins: function () { // run the plugin $(this.el).turn({ gradients: true, acceleration: true }); // hide the body overflow document.body.className = 'hide-overflow'; } Where the line that is pointed to is $(this.el).turn({ I am currently using turnjs4 and jquery 2.1.1. Update: I was able to get the local viewing accomplished. I am currently using handlebars in my server stack. When I was injecting the the turn.min.js script it was not in the right order with the layout where the jQuery script was inserted. I even attempted to rearrange the ordering of the template to have the turn.min.js injection after the jQuery script that was in the layout, but it still did not work. The final solution was to include the turn.min.js script after the jQuery script in the layout file! That way the turn.min.js file calling functions from the jQuery script were defined.
type: Question
answer count: 1
has title: Turn.js: Responsive Design With a Double-Page Viewing Format Not Working
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: turnjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26264854

http://stackoverflow.com/comment/41099468
has text: ppl only need whats between the tags otherwise your code needs to be scrolled :/ remove the rest
comment on: http://stackoverflow.com/q/26207772
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26211127
accepted answer of: http://stackoverflow.com/q/26196730
score: 2
answers question: http://stackoverflow.com/q/26196730
downvote count: 0
has body: It should be either be var client = aerospike.client({ hosts: [ { addr: 'localhost', port: 3000 } ] }).connect(function connect_callback(err){ if (err.code != status.AEROSPIKE_OK) { console.log("Aerospike server connection Error: %j", err); } }); or function connect_callback(err) { if (err.code != status.AEROSPIKE_OK) { console.log("Aerospike server connection Error: %j", err); } } followed by var client = aerospike.client({ hosts: [ { addr: 'localhost', port: 3000 } ] }).connect(connect_callback);
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41182347
score: 1
has text: Thanks @NicolasAlbert - at least now I know it is not a jQuery feature
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26252728

recurly
type: Tag
tag name: recurly
tags question: http://stackoverflow.com/q/26268233

http://stackoverflow.com/a/26334172
has comment: http://stackoverflow.com/comment/41332196
score: 3
answers question: http://stackoverflow.com/q/26334108
has body: It makes sure preventDefault and stopPropagation indeed exist before executing them. Other ways of doing the same thing include: var empty = function(){}; (e.preventDefault || empty)() if(typeof e.preventDefault !== "undefined") e.preventDefault();
upvote count: 3
has comment: http://stackoverflow.com/comment/41331762
accepted answer of: http://stackoverflow.com/q/26334108
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41331642
has comment: http://stackoverflow.com/comment/41331767
type: Answer
has comment: http://stackoverflow.com/comment/41336471
downvote count: 0

http://stackoverflow.com/comment/41366411
type: QuestionComment
has text: What are you trying to achieve? Why do you need to call different functions for the different items?
score: 0
comment on: http://stackoverflow.com/q/26353316
type: Comment

http://stackoverflow.com/q/26239048
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41157127
has title: which submit button was clicked
has comment: http://stackoverflow.com/comment/41157201
has comment: http://stackoverflow.com/comment/41157084
has comment: http://stackoverflow.com/comment/41157207
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26239236
has comment: http://stackoverflow.com/comment/41157144
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41157256
has body: How can I know that which submit button was clicked on submit the form. HTML: Queue Process JQUERY: $('form#create_tran_form').on('submit',function(e){ var submit_value = $(this).attr('id'); alert(submit_value); e.preventDefault(); }); I am getting the form ID that is: create_tran_form. I want to get submit button's name or value. How can I achieve this? Thanks.
upvote count: 3
accepted answer: http://stackoverflow.com/a/26239236

http://stackoverflow.com/comment/77204136
type: AnswerComment
type: Comment
has text: Thank you so much for the detailed explanation with relative ASCII art, really helpful.
comment on: http://stackoverflow.com/a/45100521
score: 0

http://stackoverflow.com/comment/41306052
type: AnswerComment
has text: Hi sorry, I'm looking at my application and I've noticed that something that was suppose to render only when all promises were completed is triggered much earlier, resulting in missing data...could this have something to do with the promises not 'settling'?
type: Comment
comment on: http://stackoverflow.com/a/26320100
score: 0

http://stackoverflow.com/q/26334107
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
has title: Expand/Collapsible list of objects
has comment: http://stackoverflow.com/comment/41362403
tagged with: django
upvote count: 1
tagged with: python
has answer: http://stackoverflow.com/a/26355702
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26355702
type: Question
has comment: http://stackoverflow.com/comment/41336446
has body: I'm trying to display a list of object Models (Robots), the models have a field Parent which can be another Robot. I've implemented a nested list using MPTT for Django: {% load mptt_tags %} &lt;ul&gt; {% recursetree nodes %} &lt;li&gt; &lt;a href="{{ node.get_absolute_url }}"&gt;{{ node.name }}&lt;/a&gt; {% if not node.is_leaf_node %} &lt;ul class="children"&gt; {{ children }} &lt;/ul&gt; {% endif %} &lt;/li&gt; {% endrecursetree %} &lt;/ul&gt; I'd now like to make the list exandable/collapsable - eg I can shrink all nodes children. I'm having trouble using Javascript for this because the nodes are all of the same class. Is there any other simple way of implementing this?

http://stackoverflow.com/q/26322558
has answer: http://stackoverflow.com/a/26340526
score: 1
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/31204289
has body: Here is my braintree javascript code. braintree.setup("&lt;?=$clientToken?&gt;", "custom", { id: "checkout_prem", paymentMethodNonceReceived: function (event, nonce) { return false; } }); After i click on submit button it will submit the form that i don't want to. Can anybody help me to solve this.
answer count: 2
downvote count: 0
linked to: http://stackoverflow.com/q/28068003
tagged with: javascript
tagged with: braintree
favorite count: 0
has title: Braintree Payment gateway : paymentMethodNonceReceived unable to stop submitting form
type: UnansweredQuestion
upvote count: 1
tagged with: php

http://stackoverflow.com/comment/41288190
comment on: http://stackoverflow.com/q/26310398
has text: Better you use confirm("Are you a boy?"). If true then boy and if false than girl. So it will avoid to receive other value
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26259601
type: Question
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/4255472
answer count: 2
upvote count: 1
has title: Get the value of an object property dynamically
possible better answer: http://stackoverflow.com/a/26259628
has comment: http://stackoverflow.com/comment/41194407
favorite count: 0
downvote count: 2
type: AnsweredQuestion
has body: I want to get the value of an object property. For reasons I wont go in to, I need the function to be abstract so i can use it in different scenarios. Here's what I have: function getPropertyValue(obj, prop){ return obj.prop; } var obj = { name: "tom", age: 23 } console.log('age is '); console.log(getPropertyValue(obj, "age")); This returns underfined because it's looking for the property "prop" on the object, which doesn't exist. How do I get it to look for the property passed as prop, e.g. if "name" is passed as prop it would look for obj.name? The jsfiddle is here
duplicate of: http://stackoverflow.com/q/4255472
has answer: http://stackoverflow.com/a/26259649
accepted answer: http://stackoverflow.com/a/26259649
has answer: http://stackoverflow.com/a/26259628

http://stackoverflow.com/comment/131898288
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/74733439
type: Comment
has text: note; only issue with this is "drop" events will still emit the "addedfiles" event which will actually include the duplicated file being dropped. However, the file will not be added to the queue but the "addedfiles" event will receive a list of files that are possibly duplicated. i dont use that event, so i dont care.

http://stackoverflow.com/q/26310013
has comment: http://stackoverflow.com/comment/41288832
score: 1
has comment: http://stackoverflow.com/comment/41287818
has body: Looking to split phrases on white-space, except when there's a possible acronym. Example: "Frank worked at I B M forever" -> Frank,worked,at,I B M,forever Another option would be to "squish" the acronym -> "Frank worked at IBM forever"
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26310179
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26311053
possible better answer: http://stackoverflow.com/a/26310179
has comment: http://stackoverflow.com/comment/41287577
has answer: http://stackoverflow.com/a/26310992
has comment: http://stackoverflow.com/comment/41290502
answer count: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41287894
has title: Splitting phrase on whitespace, except in acronyms
tagged with: regex
has answer: http://stackoverflow.com/a/26311053
type: AnsweredQuestion

http://stackoverflow.com/comment/47451810
type: Comment
comment on: http://stackoverflow.com/a/26230442
type: AnswerComment
score: 0
has text: Even after updating angular-route to pick correct version it didn't work for some reason.

http://stackoverflow.com/comment/41098371
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26204130
type: AnswerComment
has text: okay I think I understand. I'll work on it and post my code Thanks!

http://stackoverflow.com/q/26324855
tagged with: gmail-api
has answer: http://stackoverflow.com/a/26344297
tagged with: google-api
tagged with: google-api-nodejs-client
has body: I wish to send an email with an attachment through gmail. I'm using google-api-nodejs-client for node.js. My current message sending code is: var gmailClass = google.gmail('v1'); gmailClass.users.messages.send({ auth: OAuth2Client, userId: 'me', resource: { raw: base64EncodedEmail }, } ,function(err, results) { if (!err) { //do something } else { //do something } }); Is there a way to add an attachment to the send function?
tagged with: node.js
type: AnsweredQuestion
score: 2
type: Question
tagged with: javascript
upvote count: 2
accepted answer: http://stackoverflow.com/a/26344297
answer count: 1
has title: How to send a mail with an attachment in gmail api using google-api-nodejs-client for nodejs
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41366610
comment on: http://stackoverflow.com/q/26353422
type: Comment
type: QuestionComment
has text: `jQuery disable a div` Can you please explain what this exactly means?
score: 0

http://stackoverflow.com/q/26288968
linked to: http://stackoverflow.com/q/5250403
type: Question
has comment: http://stackoverflow.com/comment/41249345
has body: In working to make a HTML5 browser game, I can't help but consider the fact that a game like that can't be competitive or valued based on the ease of editing the code of the game through dev console. For example like this: https://www.youtube.com/watch?v=lQaTW3vCqC0 The user changes around values of variables and then resumes the scripts causing the game to be directly effected. I'm thinking of possible ways to avoid such manipulations: Custom Browser (setup like Tor? custom routing used to detect unhampered browser with no console tools avialable) detection if dev tools are open Find out whether Chrome console is open , How to detect Chrome Inspect Element is running or not? (but this is only Chrome, what about IE, FF, SF, O? Any insight or additional thoughts would be great.
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/41252303
has answer: http://stackoverflow.com/a/26289022
tagged with: browser
linked to: http://stackoverflow.com/q/7527442
has title: Is it possible to prevent JavaScript Worker html5 game manipulation?
answer count: 1
tagged with: javascript
tagged with: console
linked to: http://stackoverflow.com/q/7798748
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41249304
has comment: http://stackoverflow.com/comment/41275367
has comment: http://stackoverflow.com/comment/41252426
type: UnansweredQuestion
score: 0

http://stackoverflow.com/a/27494457
type: Answer
answers question: http://stackoverflow.com/q/26272648
has body: I've never used coffeescript but.. looks like an issue with the trailing semicolons. Particularly at the ctrl assignment. I have not enough reputation for add a comment so I reply.. sorry about that. Good luck
score: 0

http://stackoverflow.com/comment/41343393
type: QuestionComment
has text: Hm... I have not used cfinput in a while, so I am not sure whether it really supports masks or not (outside of flash). Maybe that changed in later versions? What version of CF are you using?
comment on: http://stackoverflow.com/q/26286518
score: 0
type: Comment

http://stackoverflow.com/q/26232265
has comment: http://stackoverflow.com/comment/41144882
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41144338
has answer: http://stackoverflow.com/a/26233153
has answer: http://stackoverflow.com/a/26232345
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26232345
type: AnsweredQuestion
has title: Submit Form into specific window
accepted answer: http://stackoverflow.com/a/26233153
type: Question
tagged with: forms
score: 0
answer count: 2
has body: I have a HTML form in a popup window's iframe and would like to submit it into the popup's opening window (window.parent.opener). The form does not exist in the opening window, but only in the popup's iframe. What's the easiest way to do this? I figure form targets don't help, as they only allow to specify _parent, and the opening window does not have an iframename. Dynamically re-creating the iframe's form in the opening window could be an option, as long as it does not become visible. Is there a library to dynamically create a form given serialized form data? (jQuery solutions preferred)

http://stackoverflow.com/q/26292350
has comment: http://stackoverflow.com/comment/41285766
tagged with: animated
answer count: 0
has comment: http://stackoverflow.com/comment/41287001
tagged with: scroll
tagged with: scrolltop
type: Question
has comment: http://stackoverflow.com/comment/41254862
tagged with: javascript
has title: Getting a glitch when using scrollTop (page goes to 0 position and then does required animation)
score: 0
has body: My auto scroll is working properly if scroller position = 0; But if I manually scroll down a little-bit and scroller position changes from 0 to something let's say 120. After clicking on a link it takes me back to 0 at first (very fast 0.1sec) an then back to 120 and starts animation and goes to specific element. But this looks like bug which I want to avoid. I was looking around trying to find a solution in other similar posts. nothing particular unfortunately! Here is my code: Function Scroll_C(name,time) { $("body,html").animate({ scrollTop: $(name).offset().top }, time); };
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/a/26248144
answers question: http://stackoverflow.com/q/26244628
score: 3
downvote count: 0
upvote count: 3
type: Answer
has body: If I understand what you are asking - you want to create a calculator for the angle formed between 3 dots (A, B middle, C). Your function should work for the final calculation but you need to recall the function every time a point has moved. I created a nice fiddle to demonstrate how you can achieve it with : jQuery, jQuery-ui, html. I used the draggable() plugin of the UI library to allow the user to manually drag the dots around And I'm recalculating the angle while dragging. Take a look: COOL DEMO JSFIDDLE The CODE ( you will find all HTML &amp; CSS in the demo): $(function(){ //Def Position values: var defA = { top:20, left:220 }; var defB = { top:75, left:20 }; var defC = { top:200, left:220 }; //Holds the degree symbol: var degree_symbol = $('&lt;div&gt;').html('&amp;#12444;').text(); //Point draggable attachment. $(&quot;.point&quot;).draggable({ containment: &quot;parent&quot;, drag: function() { set_result(); //Recalculate }, stop: function() { set_result(); //Recalculate } }); //Default position: reset_pos(); //Reset button click event: $(&quot;#reset&quot;).click(function(){ reset_pos(); }); //Calculate position of points and updates: function set_result() { var A = get_middle(&quot;A&quot;); var B = get_middle(&quot;B&quot;); var C = get_middle(&quot;C&quot;); angle = find_angle(A,B,C); $(&quot;#angle&quot;).val(angle + degree_symbol); connect_line(&quot;AB&quot;); connect_line(&quot;CB&quot;); } //Angle calculate: function find_angle(A,B,C) { var AB = Math.sqrt(Math.pow(B.x-A.x,2)+ Math.pow(B.y-A.y,2)); var BC = Math.sqrt(Math.pow(B.x-C.x,2)+ Math.pow(B.y-C.y,2)); var AC = Math.sqrt(Math.pow(C.x-A.x,2)+ Math.pow(C.y-A.y,2)); radians = Math.acos((BC*BC+AB*AB-AC*AC)/(2*BC*AB)); //Radians degree = radians * (180/Math.PI); //Degrees return degree.toFixed(3); } //Default position: function reset_pos() { $(&quot;#A&quot;).css(defA); $(&quot;#B&quot;).css(defB); $(&quot;#C&quot;).css(defC); set_result(); } //Add lines and draw them: function connect_line(point…

http://stackoverflow.com/comment/41319359
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26326705
has text: why do you want to compile coffee via a jade template, just for a console.log? you should extract scripts (js or coffee) into a own file
score: 0

http://stackoverflow.com/comment/41228246
type: QuestionComment
has text: Could you add a class on your button ?
comment on: http://stackoverflow.com/q/26277886
score: 0
type: Comment

http://stackoverflow.com/comment/126302507
type: Comment
score: 1
has text: then a link for others to inspect that code would be nice. I suppose this suffices: https://github.com/nodejs/node/blob/v17.7.1/lib/buffer.js#L344
comment on: http://stackoverflow.com/a/42088469
type: AnswerComment

http://stackoverflow.com/comment/41299576
type: Comment
comment on: http://stackoverflow.com/a/26316374
score: 0
type: AnswerComment
has text: Yes that's exactly what I'm wondering (why not only on click?..) Is there a way to prevent/workaround that calling?

http://stackoverflow.com/q/26305619
tagged with: javascript
tagged with: jquery
score: 0
has title: jquery modal pop up in asp.net mvc
accepted answer: http://stackoverflow.com/a/26305839
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26305839
tagged with: asp.net-mvc
tagged with: modal-dialog
has body: I'm trying to replicate the example I see here http://jqueryui.com/dialog/#animated with the following asp.net mvc view @{ ViewBag.Title = "Partial"; } This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon. Open Dialog @section scripts{ @Scripts.Render("~/Scripts/jquery-1.10.2.js") @Scripts.Render("~/Scripts/jquery-ui-1.8.11.js") } but the jquery isn't firing, I'm not sure if I'm linking the jquery scripts right or what... I've also tried this on the top of the page but nothing ultimately my goal is to use @Ajax.ActionLink (which is working for me) and then make the "div" that gets updated with the partial view into a modal popup. But for now, I can't get this modal working, I appreciate the help guys
answer count: 1

http://stackoverflow.com/comment/41280190
has text: Ok! I used thisa.childNodes[0].innerHTML and it works!! Thanks a lot
comment on: http://stackoverflow.com/a/26305844
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41099102
has text: Are you sure the path is right? In the requester subdirectory located in the same directory as main?
score: 0
comment on: http://stackoverflow.com/q/26207690
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41193953
score: 5
comment on: http://stackoverflow.com/q/26259402
type: Comment
type: QuestionComment
has text: To state the obvious, check the browser's console for any errors..

http://stackoverflow.com/comment/41202765
type: QuestionComment
has text: It would also helpful to see your HTML structure. What I am guessing is the absolute positioning is putting the menu some place off screen.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26263736

http://stackoverflow.com/q/26249174
tagged with: jquery
has answer: http://stackoverflow.com/a/26249235
has title: How to print a object html
has comment: http://stackoverflow.com/comment/41176205
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41176189
has comment: http://stackoverflow.com/comment/41176358
tagged with: javascript
score: 0
has body: I have a variable that has a couple of clone items. Im trying to print it out but I keep getitng "[object HTMLDivElement]" instead of the actual html $.each(theGood, function() { $('#work .slider').wrap(function(){ $('#work .slider').prepend('&lt;div class="group"&gt;'+this+'&lt;/div&gt;'); }); }); } Here's the code I'm using. I tried doing a for loop with theGood[i} but no luck
answer count: 1

http://stackoverflow.com/comment/41242370
type: Comment
type: QuestionComment
has text: Still interesting that this won't work. I can reproduce it in IE11. The string *looks* like `"10"` but when compared with `"10"` yields false.
comment on: http://stackoverflow.com/q/26285330
score: 0

http://stackoverflow.com/q/26308643
type: Question
has answer: http://stackoverflow.com/a/26308768
accepted answer: http://stackoverflow.com/a/26308768
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26308725
has title: AngularJS - polling into persistent data store
score: 0
tagged with: polling
has body: Angular noob here. I'm building an app that needs to poll a url every second, and store that data persistently, as it needs to be accessed by multiple views/controllers. What I've done to handle this is put my http request into a factory, and the data is made available to controllers through functions in the factory. The issue I'm having now is that the factory function is envoked before the http request, causing errors in my app. Here is the code: App.factory('metrics', function($http){ var service; var users = [{laps:[]}]; var updateMetrics = function(){ //updates the users array in the factory }; $http.get('data.csv').success(function(data) { var temp_array = data.split(" "); updateMetrics(0, temp_array); }); service.lastLapInfo = function(){ var lastlap = []; for (var i=0; i&lt;users.length;i++) { var lap = users[i].laps[users[i].laps.length-1]; lastlap.push(lap); } return lastlap; }; return service; }); App.controller('mainController', function($scope, $http, metrics) { $scope.users=metrics.lastLapInfo(); }); lastLapInfo() is getting called before the http request which is causing errors as there is no data in the array. Any thoughts? Additionally - if I'm generally going about the wrong way to meet my use case (e.g. I should be using something else instead of a Factory) let me know!
tagged with: angularjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26308725
linked to: http://stackoverflow.com/q/14944936
has comment: http://stackoverflow.com/comment/41285085
tagged with: http

http://stackoverflow.com/comment/41282438
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26306415
type: QuestionComment
has text: objects are always unique, so you need to compare by individual property values, not by whole objects. using a string compare can work with certain data but not others, for example: with numerical strings like shown, you risk colliding {a:"1"} with {a:1}.s

http://stackoverflow.com/comment/58631151
has text: @superjos in this case the express server is started independently of webpack. But of course you can join the two commands with something like `&&` and put it to package.json.
type: AnswerComment
comment on: http://stackoverflow.com/a/26218192
score: 0
type: Comment

http://stackoverflow.com/q/26344724
downvote count: 0
has answer: http://stackoverflow.com/a/26364849
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41351377
type: UnansweredQuestion
tagged with: http-redirect
tagged with: php
score: 2
upvote count: 2
type: Question
has body: I'm using an angular.js app to fetch content via an external API. All works great, except for metadata and opengraph values. As we can't rewrite all metadata, we decided to use some redirection to send crawler on specific pages with metadata. We use this method : https://github.com/michaelbromley/angular-social-demo All seems to work, but when we need to get "route" params from .htaccess file, we don't have anything. We can send FB crawler on specific page, but without information. Here is our .htaccess : RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet) RewriteRule the-page-with-angular-app.html(.*)$ http://www.oursite.net/some/directory/static-page.php?id=$1 [P] Here is our URL : http://www.oursite.net/the-page-with-angular-app.html#/someInfo/3437/46 Please note that our angular.js app need "#" in URL (for some reasons we can't use html5mode). We want redirect to page : oursite.net/some/directory/static-page.php?id=someInfo/3437/46 at least, even if it could be better to redirect to oursite.net/some/directory/static-page.php?id1=someInfo&amp;id2=3437&amp;id3=46 For the moment, we just can redirect to oursite.net/some/directory/static-page.php (we can pass GET id if we force it in .htaccess). The rewrite cond works great. Thanks for help,
linked to: http://stackoverflow.com/q/8626812
tagged with: javascript
has title: Redirecting .htaccess from angular.js route
tagged with: .htaccess
has comment: http://stackoverflow.com/comment/41367896
answer count: 1

http://stackoverflow.com/a/26240920
type: AcceptedAnswer
has body: Your problem is that you're using Parse.Messages when it's not a built-in class. Since it's your own class, then you'd use "Messages". var query = new Parse.Query("Messages");
type: Answer
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26240600
accepted answer of: http://stackoverflow.com/q/26240600

http://stackoverflow.com/q/26337012
has comment: http://stackoverflow.com/comment/41336959
tagged with: hover
type: Question
has comment: http://stackoverflow.com/comment/41336963
has comment: http://stackoverflow.com/comment/41337059
has body: I have a table which is populated taking data from an array of contacts. I need to pass to the function hover one of each contact data (your image). How could he? Here is the code of the dynamic creation of each row. What would have to put behind tr, to capture it on hover? for(var i in tbContactos) { var contacto = JSON.parse(tbContactos[i]); $("#tblList tbody").append("&lt;tr alt="+contacto.Imagen+"&gt;"); ..... ..... $("#tblList").hover(function(event){ var src = $(this).attr("alt"); ............ ............
tagged with: javascript
has answer: http://stackoverflow.com/a/26337131
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/41336949
has title: How to pass an attribute to the function hover?
has comment: http://stackoverflow.com/comment/41337413
has comment: http://stackoverflow.com/comment/41339146
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26337128

http://stackoverflow.com/q/26279431
type: Question
has comment: http://stackoverflow.com/comment/41232049
has body: Does anyone know of a way to do it from JavaScript without relying on browser version and just assuming that it works?
tagged with: javascript
has answer: http://stackoverflow.com/a/26280473
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/17119105
tagged with: asm.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41231601
has title: Is there a clever way to check from code whether asm.js is active or not?
has comment: http://stackoverflow.com/comment/41230847

http://stackoverflow.com/comment/41354303
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26346234
score: 0
has text: How can I get the last `i` of `id=slider+i`

http://stackoverflow.com/q/26316858
has comment: http://stackoverflow.com/comment/41299722
has answer: http://stackoverflow.com/a/26318264
has title: How to show validation errors in rails via AJAX?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26318264
score: 0
tagged with: ruby-on-rails-4
has body: How do you show the following errors that fail Rails validation using AJAX? I have the following code in controller flash[:notice] = 'Please correct the errors below and try again.' format.html { render :action =&gt; :new } format.js end Added to view :remote =&gt; true And then in create.js.erb I check the flash, but how do I show Rails errors that are shown when not using AJAX? or do I have to write validations from scratch here? &lt;% if flash.present? %&gt; &lt;% end %&gt;
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/26258502
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41192213
score: 0
has comment: http://stackoverflow.com/comment/41213430
type: UnansweredQuestion
has title: Responsive image lightbox
tagged with: css
has comment: http://stackoverflow.com/comment/41225574
tagged with: responsive-design
has answer: http://stackoverflow.com/a/79256207
has body: I am trying to create a responsive photogalery. I've solved responsive thumbnails (they load the right image according to screen size and devicePixelRatio). But I also want a responsive lightbox for them. I hope there must be a suitable library... The main problem is how to load only the correct image size. For example, on my 480*320 mobile phone, it is pointless to load 2Mpx images. However, on a 17" screen, it is basically what I want. I hope this is simple, but I haven't found a suitable lightbox library. Well, lightboxing a HTML would be a solution, but it seems to be rarely supported. The Magnifier Popup supports it, but it seems to be aimed for some different purposes and I can't make it working for photogallery.
type: Question
tagged with: lightbox

http://stackoverflow.com/q/26302278
score: 1
accepted answer: http://stackoverflow.com/a/26302527
has answer: http://stackoverflow.com/a/26302536
linked to: http://stackoverflow.com/q/9379855
has body: I'm sorry the title is so vague, I wasn't sure the best way to describe this in a short title. My friend has been helping me develop this simple site for myself. It's to play relaxing sounds of nature. Here is the code my friend did, now I would ask him but he is away on a bike ride across Britain and will be gone for quite some time.. $(function() { var forest = document.getElementById("forest"); var dusk = document.getElementById("dusk"); var water = document.getElementById("water"); var storm = document.getElementById("storm"); var playing = ""; var muted = false; $('#mute').on('click', function(e) { $('.icon').toggleClass("off"); e.preventDefault(); }); $("#mute").click(function() { if(!muted) { forest.volume = 0; dusk.volume = 0; water.volume = 0; storm.volume = 0; muted = true; } else { forest.volume = 1; dusk.volume = 1; water.volume = 1; storm.volume = 1; muted = false; } }); $('.sound').click(function() { switch($(this).find("audio").prop("id")) { case "forest": if(playing == "forest") { fade(forest); return; } $('#panda').fadeTo('slow', 0.1, function() { $(this).css('background-image', 'url(images/forest.jpg)'); }).fadeTo('slow', 1.4); playing = "forest"; fade(forest); break; case "dusk": if(playing == "dusk") { fade(dusk); return; } $('#panda').fadeTo('slow', 0.1, function() { $(this).css('background-image', 'url(images/dusk.jpg)'); }).fadeTo('slow', 1.4); playing = "dusk"; fade(dusk); break; case "water": if(playing == "water") { fade(water); return; } $('#panda').fadeTo('slow', 0.1, function() { $(this).css('background-image', 'url(images/water.jpg)'); }).fadeTo('slow', 1.4); playing = "water"; fade(water); break; case "storm": if(playing == "storm") { fade(storm); return; } $('#panda').fadeTo('slow', 0.1, function() { $(this).css('background-image', 'url(images/rain.jpg)'); }).fadeTo('slow', 1.4); playing = "storm"; fade(storm); break; } console.log(playing); }); I 'think' and I say that mainly as I'm a designer, but this is the bit of concern. $(this)…
answer count: 2
has title: jQuery .css background-image preload
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: preload
tagged with: css
has answer: http://stackoverflow.com/a/26302527
has comment: http://stackoverflow.com/comment/41273259
has comment: http://stackoverflow.com/comment/41273381
tagged with: background-image
upvote count: 1
has comment: http://stackoverflow.com/comment/41273138
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26302536

http://stackoverflow.com/q/26292358
answer count: 1
type: UnansweredQuestion
has body: I want to create form for my user with two inputs area, the form will generate encrypt text that i can use it in javascript like user inter them in input form fields. For example i have this html code john123/52544888822 i want to make this john123/52544888822 encrypted and receive orgin text in javascript function. HTML code: Javascript code: $('.form').change("input", function() { var form_user = $('.user').val(), form_password = $('.form .url').val(), form_button = $('.form .password'); form_button.click(function() { $('.code').html('[' + form_user + '][' + form_password + ']'); }); });
tagged with: javascript
tagged with: jquery
type: Question
has title: Use crypto.js to create text form generator
score: 0
has answer: http://stackoverflow.com/a/26292499

http://stackoverflow.com/comment/41266153
type: QuestionComment
has text: `inactive` are hidden always or only before click? and after click they are still `inactive`?
type: Comment
comment on: http://stackoverflow.com/q/26298585
score: 0

multi-device-hybrid-apps
tag name: multi-device-hybrid-apps
type: Tag
tags question: http://stackoverflow.com/q/26286306

http://stackoverflow.com/comment/41185929
score: 0
type: QuestionComment
has text: Thanks.. That makes sense. I was able to solve it.
type: Comment
comment on: http://stackoverflow.com/q/26252049

http://stackoverflow.com/a/26334455
answers question: http://stackoverflow.com/q/26334062
has body: all of your functions work correctly as tested by the link you've provided. When the page loads it successfully retrieves the data (if any) from the local storage and displays on the page. However, the global array variable accountsArray is populated with data retrieved from the local storage. You need to repopulate the global array otherwise when you call saveAccountData it will save whatever the array holds which indeed overrides whatever you had in the local storage. To fix it, simply add add this code block... $(function(){ var data = localStorage.getItem("accountsArray"); if(data != null) accountsArray = JSON.parse(localStorage.getItem("accountsArray")); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26334062
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/26198583
answer count: 0
type: UnansweredQuestion
has title: How can I dynamically create a slug when form is submitted to database?
linked to: http://stackoverflow.com/q/26196318
has comment: http://stackoverflow.com/comment/41081783
tagged with: php
has comment: http://stackoverflow.com/comment/41083082
tagged with: forms
type: Question
has body: How can I dynamically create a slug from an input field when form is submitted to a database? I want the user to be able to type the title of the blog in the input field, and when the form is submitted, the title will be turned into a slug and submitted to one field in the database and the slug will go into another field. Thus, the blog still maintains its original title and the slug can be used as part of the url/link from the list of blogs. A perfect example of this is how Stackoverflow does this. When you ask a question, the question is turned into a slug without me having to type the slug myself. And when you click the link, the post still has the question I asked. . Example: How do I get clean URLS for only 2 variables? Thanks in advance for any help provided
has comment: http://stackoverflow.com/comment/41082461
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41083079
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26219858
has comment: http://stackoverflow.com/comment/41121673
tagged with: javascript
has comment: http://stackoverflow.com/comment/41121545
has comment: http://stackoverflow.com/comment/41121347
favorite count: 0
has answer: http://stackoverflow.com/a/26219916
possible better answer: http://stackoverflow.com/a/26219910
has comment: http://stackoverflow.com/comment/41121474
accepted answer: http://stackoverflow.com/a/26219916
answer count: 3
has comment: http://stackoverflow.com/comment/41121476
has body: If we have the following code ok dd I can apply a name attribute directly with the following code car.setAttribute('name', 'bmw'); However what if I want to use a variable in the place of car. var z = 'car'; z.setAttribute('name', 'bmw'); This doesn't work. Or harder still, what about using both? var z = 'r'; ca + z.setAttribute('name', 'bmw'); Also doesn't work. Is this possible?
has comment: http://stackoverflow.com/comment/41121322
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/1441532
upvote count: 0
has comment: http://stackoverflow.com/comment/41121290
has answer: http://stackoverflow.com/a/26219910
type: Question
has comment: http://stackoverflow.com/comment/41121279
has answer: http://stackoverflow.com/a/26219917
score: -1
linked to: http://stackoverflow.com/q/1441532
has comment: http://stackoverflow.com/comment/41121554
has title: Using variable as value in object assignment - JavaScript
downvote count: 1

http://stackoverflow.com/comment/41079580
has text: Could you please put that in a jsFiddle so we can play with it?
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26197427

http://stackoverflow.com/a/47790275
has comment: http://stackoverflow.com/comment/82541901
downvote count: 2
has body: if (charCode &gt; 47 &amp;&amp; charCode &lt; 58) { document.getElementById("error").innerHTML = "*Please Enter Your Name Only"; document.getElementById("fullname").focus(); document.getElementById("fullname").style.borderColor = 'red'; return false; } else { document.getElementById("error").innerHTML = ""; document.getElementById("fullname").style.borderColor = ''; return true; }
has comment: http://stackoverflow.com/comment/82541946
answers question: http://stackoverflow.com/q/26211225
type: Answer
upvote count: 0
score: -2

http://stackoverflow.com/a/26220619
has body: UPDATED: Do the whole thing on keyup here's a simple example that you can use: DEMO $('#text').keyup(function(){ $('#result').html($('#text').val()); var splittedText=$('#result').html().split(/\s/); var lastWord=splittedText[splittedText.length-1]; $('#result').html($('#result').html().replace(lastWord,'&lt;span&gt;'+lastWord+'&lt;/span&gt;')); $('#result').children('span').css('color',$('#color').val()); }); you need to write a sentence in the first input and a hexa-deciaml color in the second one.(including the # at the beginning)
has comment: http://stackoverflow.com/comment/41124326
score: 1
answers question: http://stackoverflow.com/q/26219871
has comment: http://stackoverflow.com/comment/41123288
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41120519
type: Comment
score: 1
type: AnswerComment
has text: Well, it works, but what is the point to overcomplicate the task and to destroy array?
comment on: http://stackoverflow.com/a/26219435

http://stackoverflow.com/comment/41206706
type: Comment
has text: Hi, I want to clarify that I don't have an ajax call ... my page is loaded from the codebehind, so is there anyway I can use this code that way. Thanks in advance.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26264898

http://stackoverflow.com/q/26288563
tagged with: dojo
type: UnansweredQuestion
has title: layout dijits within dojo custom widgets
type: Question
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26289276
has body: I've got a number of tools to build that are accessed by clicking a dijit/Tree on the main htm page. My plan was to make each of the tools a custom widget. The problem I'm having is that some of these tools have some pretty long forms that would require accordions/and or tab containers. Since _WidgetsInTemplateMixin doesnt support layout widgets as children I'm trying to find some way to work around. I would like to keep using dojo because its built into some of the functionality of the tools(esri maps). Can accordions and tab containers be achieved using some existing css library? Thanks

http://stackoverflow.com/q/26331532
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41327058
score: 1
downvote count: 3
linked to: http://stackoverflow.com/q/16522648
type: Question
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/26331551
tagged with: javascript
tagged with: variables
possible better answer: http://stackoverflow.com/a/26331552
has body: This works: $('.sameDiv').css('width', '25%'); But this doesn't: var squaresize = 25; $('.sameDiv').css('width', 'squaresize%'); Also, I've tried it with the percent symbol as part of the variable and that doesn't help.
has comment: http://stackoverflow.com/comment/41776046
favorite count: 0
has answer: http://stackoverflow.com/a/26331552
has title: Why isn't my JavaScript variable working?
has answer: http://stackoverflow.com/a/26331551
has comment: http://stackoverflow.com/comment/41326981

http://stackoverflow.com/a/26349557
answers question: http://stackoverflow.com/q/26349474
has body: var values = {}; $.each($('#myForm').serializeArray(), function(i, field) { values[field.name] = field.value; }); This way your value array will have all the fields in your form 'myForm'
score: 0
type: Answer

http://stackoverflow.com/comment/41313048
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26323682
has text: What are you talking about? `var fn = function(arg){ console.log(arg) }; foo.then(fn)` where do you see an object?

http://stackoverflow.com/q/26220873
has title: How WebBrowser control in .net handles ObjectForScripting
score: 2
downvote count: 0
tagged with: javascript
tagged with: winforms
answer count: 1
has body: As far as I know we can call C# function from Javascript, that is loaded inside a WebBrowser control, following code shows how I usually do it. Form1.cs public partial class Form1 : Form{ private WebBrowser webBrowser1; public ApplicationWindow(){ InitializeComponent(); WebBrowser webBrowser1 = new WebBrowser(); //some code follows webBrowser1.ObjectForScripting = new ScriptManager(); this.webBrowser1.Url = new Uri("file:///d:/ui/application.html"); } } } ScriptManager.cs namespace WindowsFormsApplication10 { [ComVisible(true)] public class ScriptManager{ public string GetAllDomains(){ string result=null; //does something; return result; } } } application.html The questions that intrigues me are why we need ComVisible to be true for class whose object we are going to use as objectForScripting? How Javascript object window.external has the same methods as in objectForScripting? How they handle cross language type conversion?
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/54863778
tagged with: c#
type: Question

http://stackoverflow.com/comment/41327512
type: QuestionComment
has text: the first is more formal (standard) while I remembered that some old version of some old browser does not support the second.
comment on: http://stackoverflow.com/q/26331906
score: 0
type: Comment

http://stackoverflow.com/q/26308709
upvote count: 3
has comment: http://stackoverflow.com/comment/41303614
accepted answer: http://stackoverflow.com/a/26318994
has comment: http://stackoverflow.com/comment/41303046
has comment: http://stackoverflow.com/comment/41295540
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41298581
has answer: http://stackoverflow.com/a/26318994
has comment: http://stackoverflow.com/comment/41302512
type: Question
type: AnsweredQuestion
score: 3
has title: onaddstream never called after re-negotiation
has body: I'm creating a test video chat app with WebRTC. I have two peers connected successfully. I would like to add a way for a user to "re-connect" (disconnect and connect with another user. For testing purposes the "other" user is the same user as before). So, when a button is selected this code is called: send(userId, toUserId, {disconnect: "true"}); pc.removeStream(localStream); pc.close(); pc = new PeerConnection(servers, options); remoteVideo.src = ""; In the above code, using the signaling method, one message is sent to the other user to alert them to disconnect. Then, the local stream is removed from the peer connection, the connection is closed, new PeerConnection is created, and the remote video is set to blank while the other video is being loaded. After that I have some code that finds another user to connect to (the same user for testing cases) and proceed to negotiate (follows the same code that worked before for the negotiation). Using logging, it seems that every step is reached (offer/answer/icecandidate). The problem is that the onaddstream listener is never reached. Yes, pc.addStream() is called before an offer is sent. I am using a variable which contains the stream (localStream) so I won't have to ask for permission again. I'm not sure if that is the problem or not. My question: why is onaddstream not being called? EDIT: Here's a little more code. The method that is called when the button is clicked: function restart(){ send(userId, toUserId, {disconnect: "true"}); pc.removeStream(localStream); pc.close(); pc = new PeerConnection(servers, options); remoteVideo.src = ""; $.ajax({ url: "http://localhost:8080/UserInterface/rs/message/creds/" + '#{sessionHandler.username}', type: "GET", success: function(data){ data = JSON.parse(data); if (data != null){ toUserId = data.toUserId; activeUser = data.activeUser; activeUser = JSON.parse(activeUser); } pc.addStream(localStream); sendOffer(); } }); } In the above code, the localStream variable is obtained when t…
tagged with: firefox
tagged with: webrtc
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41300786
favorite count: 0

http://stackoverflow.com/comment/41262887
type: Comment
comment on: http://stackoverflow.com/a/26296777
has text: Hm not, that's probably correct, actually. If `k['mid']` == 1, it would match 31, 21, 11, 10 etc..
score: 0
type: AnswerComment

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/26349317
type: Tag
tags question: http://stackoverflow.com/q/26256872

http://stackoverflow.com/comment/41378556
type: AnswerComment
score: 0
has text: Thank you! I had forgotten that for the template I should take the html string and insert that into the template!
type: Comment
comment on: http://stackoverflow.com/a/26352309

http://stackoverflow.com/q/26225663
type: Question
tagged with: for-loop
has body: So, I have this computer function... console.log(counter); AND console.log(que.length); just print on the console non stop(well over 100K times so far)... why is that? what am I doing wrong here?... Basically this code is supposed to make the computer play and animation turnEvent function each 250 milli seconds. And this setInterval "looping" should stop when counter = length of array que. initially counter is = 0; tried changing it to 2. Had zero effect. This is the for loop calling the computer function just in case you need that: for (var i = rects.length - 1; i &gt;= 0; i--) { console.log("for loop - adding box to que."); if (collides([rects[i]], g.x, g.y)) { console.log("X og Y hnit computer:"); console.log("X-hnit: " + g.x); console.log("Y-hnit: " + g.y); que.push([rects[i]]); console.log(que.length); computer(); } }; Down below is the computer function which has the console log problem. function computer(){ var counter = 2; var i = setInterval(function(){ // do your thing if (containsObject(que, rects)) { turnEvent([que[counter-2]].x, [que[counter-2]].y) counter++ }; console.log(counter); console.log(que.length); if(counter == que.length) { userTurn++; computerTurn++; userRight = false; //resets for next round. clearInterval(i); user();//it's the users turn. } }, 250); }
has title: Non stop console logs, I am having issues with setInterval and for loops
has comment: http://stackoverflow.com/comment/41134027
has comment: http://stackoverflow.com/comment/41134159
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41134032
tagged with: setinterval
has comment: http://stackoverflow.com/comment/41133922
has comment: http://stackoverflow.com/comment/41149234
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41132609
has comment: http://stackoverflow.com/comment/41142769

http://stackoverflow.com/comment/41343880
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26340773
has text: Ahhh, that makes a lot of sense. Thanks for the help!
type: AnswerComment

http://stackoverflow.com/q/26316294
has body: I want to make a function to create a new DataTable. If a table already exists, I would like my function destroy the existing table and create the new one. I did this: $.ajax().done(function(response){ Init_DT(response['cols'], response['data']); }); function Init_DT(cols, data){ if($('#mytable tr').length &gt; 0){ table.destroy(); } var table = $('#mytable').DataTable({ "data": data, "columns": cols }); } This function works well to initiate my first table but I get "Cannot read property 'destroy' of undefined" on subsequent calls.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26316495
accepted answer: http://stackoverflow.com/a/26316495
score: 1
has comment: http://stackoverflow.com/comment/41298870
has comment: http://stackoverflow.com/comment/41298637
has comment: http://stackoverflow.com/comment/41298983
has comment: http://stackoverflow.com/comment/41299027
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41298853
favorite count: 0
tagged with: ajax
tagged with: datatables
has comment: http://stackoverflow.com/comment/41298761
has title: DataTables "Cannot read property 'destroy' of undefined"
downvote count: 0
has comment: http://stackoverflow.com/comment/41299060
type: Question

http://stackoverflow.com/q/26240476
score: 0
answer count: 1
tagged with: cookies
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26240601
has body: I'm using Jquery.cookies plugin but I can't seem to find the information i'm looking for. I have the cookie object which contains keys and values for cookies that are set on the page. Want I need to do is loop through the object and check to see if a value exists inside the object and if it does log it to the console. $.cookie().each(function() { if (index == ratingsID) { console.log(index) } }); With the above code I get an error that says undefined is not a function. Can anyone point me in the right direction? Thanks
tagged with: javascript
tagged with: jquery
type: Question
has title: Checking for a value inside jQuery cookie object

http://stackoverflow.com/a/50787360
upvote count: 1
has body: Thanks to the OP for posting this, as this problem caused me much puzzlement over a couple of days. Actually my issue was slightly different because the same page was showing this behavior, so a page-related ID would not solve the problem. However, along the same lines as the first responder, I use a random number as part of the popup ID, which solves the problem in a similar manner.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26241843
type: Answer

http://stackoverflow.com/q/26220717
downvote count: 0
tagged with: file-upload
favorite count: 0
type: UnansweredQuestion
has title: Issue with ajax file upload (Node.js, express, jQuery)
tagged with: node.js
score: 1
upvote count: 1
has body: I am struggling to get a file upload script working. I am using a node/express backend with jQuery firing off the ajax request. Markup: &lt;input id="audio" type="file" name="audio"&gt; Front end JS: var formData = new FormData(); formData.append("audio", e.data.audio, 'testname'); $.ajax({ url: 'api/upload', data: formData, cache: false, contentType: false, processData: false, type: 'POST', success: function(data){ alert(data); } }); using a custom written module that executes the following and places it into e.data.audio if(has('fileReader')){ return this.$input[0].files[0] || ''; } When i select as small audio file to upload and submit, e.data.audio has the following value at the point it is set into the ajax function argument object: Lack of SO streetcred means I need to put images on imgur https://i.sstatic.net/dAjfb.png After the request is sent I am using the files property of the request object (req.files) to get access to the file, in order to save it. exports.upload = function(){ return function(req, res){ console.log(req.files); if (req.files &amp;&amp; req.files.audio){ var file = req.files.audio; fs.readFile(file.path, function(err, data){ if (err){ res.send(err); } var newPath = __dirname + 'public/audio'; fs.writeFile(newPath, data, function(err){ if (err){ res.send(err); }else{ res.send(true); } }); }) }else{ } } }; However the issue is that the path always seems to be the clients local path. Lack of SO streetcred means I need to put images on imgur https://i.sstatic.net/fMvZn.png Ive done a fair amount of googling and cant seem to find anything along the same lines. I am obviously just missing something basic and need someone to point me in the correct direction.
type: Question
has answer: http://stackoverflow.com/a/26220970
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1

http://stackoverflow.com/a/26237949
type: Answer
answers question: http://stackoverflow.com/q/26226454
has comment: http://stackoverflow.com/comment/116244721
has comment: http://stackoverflow.com/comment/41351665
score: 0
has comment: http://stackoverflow.com/comment/80934800
has body: One solution that seems to work is to pass bindEvents = false in the .blockUI call as an option (along with msg, etc. See http://fiddle.tinymce.com/bzeaab/17 for how original fiddle (http://fiddle.tinymce.com/bzeaab/16) was amended to allow the plug in to work. My concern is that this approach unbinds everything in the blockUI overlay, not just tinymce plugins, so may be too overreaching. Please comment or post a different answer if you have better advice than this. I won't accept this as the answer until others have a chance to weigh in. Thanks!

http://stackoverflow.com/a/26257733
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26257447
downvote count: 0
has body: You can still wrap radio and spans with javascript: $('.list input:radio').each(function() { $(this).parent().wrapInner(' '); }); Note: .list is the way to select ul, adjust selector to your needs. $('.list input:radio').each(function() { $(this).parent().wrapInner(' ') }); Appartement Appartement

http://stackoverflow.com/comment/41278986
has text: Is [this](http://stackoverflow.com/questions/5035547/pass-javascript-array-php) wha you are looking for ?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26305265
type: Comment

http://stackoverflow.com/a/26245874
has body: Use this inside the click function: $(".link").click(function(){ var linkValue = $(this).text(); alert(linkValue); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26245865
answers question: http://stackoverflow.com/q/26245865
score: 3
type: Answer
upvote count: 3

http://stackoverflow.com/comment/41337601
comment on: http://stackoverflow.com/q/26335594
type: Comment
type: QuestionComment
score: 1
has text: `contentType: "application/json; charset=utf-8"` is nonsense. You are making a GET request. There is no request body to describe the content-typeo f.

http://stackoverflow.com/a/26228388
upvote count: 2
answers question: http://stackoverflow.com/q/26228304
has comment: http://stackoverflow.com/comment/41137872
type: Answer
has comment: http://stackoverflow.com/comment/41137763
has body: I suggest you put those inputs in a form and then use $('form').serialize() to send them all to the server at once...just in case you wish to do it a little faster and you want to avoid repeated calls to the server... unless if you REALLY have to send them one by one, then you could loop making several calls to the server which could SLOW your system if you happen to have many input fields Something like this makes a single call to the server: &lt;form&gt; &lt;input name='input_1' /&gt; . ... ... ... ... ... &lt;input name='input_1000' /&gt; &lt;/form&gt; jQuery: var myForm = $('form') $.post( 'someurl.php', //The link to your .php file with a $_POST { data: myForm.serialize() //Serialize the form with its 1000 input fields }, function (result) { ///Handle Errors and others here. console.log(result); })
score: 2
has comment: http://stackoverflow.com/comment/41138089
downvote count: 0
has comment: http://stackoverflow.com/comment/41137782
has comment: http://stackoverflow.com/comment/41137951
has comment: http://stackoverflow.com/comment/41137733

http://stackoverflow.com/comment/41152374
comment on: http://stackoverflow.com/a/26229574
has text: For easier solution put `sleep(2)` after `page.click_link('Add sales opportunity')`
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/102193614
has text: @RayCoder log and check the value of arrayvar, looks like it is not array.
score: 1
comment on: http://stackoverflow.com/a/37002941
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26331032
has comment: http://stackoverflow.com/comment/41326876
has title: How to convert this javascript code to jquery?
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41326982
has answer: http://stackoverflow.com/a/26331060
accepted answer: http://stackoverflow.com/a/26331060
type: Question
linked to: http://stackoverflow.com/q/6378680
has body: How to convert this javascript code to jquery ? var ddlArray= new Array(); var ddl = document.getElementById('ddl'); for (i = 0; i &lt; ddl.options.length; i++) { ddlArray[i] = ddl .options[i].value; } I think one can convert ddl = document.getElementById('ddl'); to ddl = $('#ddl'); but what can be done to the loop ?
tagged with: javascript
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41327011
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41326946

http://stackoverflow.com/a/26311398
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26311374
downvote count: 0
has body: $("#menu").css({"paddingLeft": $('ol').width()});

http://stackoverflow.com/q/26275534
type: Question
tagged with: firebase
tagged with: javascript
has title: Angularfire bindTo for subobjects
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41233700
tagged with: angularfire
favorite count: 0
has comment: http://stackoverflow.com/comment/41229839
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41234469
has comment: http://stackoverflow.com/comment/41234146
has body: I have a structure for userdatas under $rootScope.myUserData, like: $rootScope.myUserData.basicData, $rootScope.myUserData.AC, for trying to optimize the queries through Firebase. The problem is that if I want to bind them nicely under $rootScope.myUserData - subObjects, I cant do this: $rootScope.myUserData.basicData = $firebase( new Firebase(resourceURL) ).$asObject(); $rootScope.myUserData.basicData.$bindTo($rootScope.myUserData, "basicData"); For example this should work fine: $rootScope.basicData = $firebase( new Firebase( resourceURL ) $rootScope.basicData.$bindTo($rootScope, "basicData"); If I understand correctly, you have to bind it straight to rootScope and can't bind it to e.g. $rootScope.myUserData.basicData. Is there any way around this problem, with using the structure I have now with $rootScope.myUserData subobjects or is the only solution to change the structure i.e. $rootScope.myUserData_basicData?
answer count: 0
upvote count: 2

http://stackoverflow.com/q/26200267
type: Question
downvote count: 0
has title: Extending AngularJS plugins
favorite count: 0
tagged with: extending
tagged with: angularjs
tagged with: plugins
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: For a project I had to add custom behavior to UI Bootstrap's Datepicker. I had to add new key-value pairs to the datepickerConfig constant, had to do some simple changes in the DatepickerController, add a new directive and change some templates. Everything works fine, but now I would like to extract my changes, to leave the original UI Bootstrap source untouched, so it can be updated by Bower. Changing the templates were straightforward, as I could simply add/overwrite files in the template cache with .run from any other module. .run(['$templateCache', function($templateCache) { //... }]) But when I try to change the config constant or add a new directive from an external file to the UI Bootstrap Datepicker module, everything breaks: angular.module('ui.bootstrap.datepicker') .constant('datepickerConfig', { //... }) .directive('myNewDirective', { //... }) I tried to extract the whole complete module into an external file, and load it after UI bootstrap, but it didn't work either. What is the proper Angular way of doing this?
tagged with: javascript
tagged with: angular-ui-bootstrap

http://stackoverflow.com/comment/41250390
type: QuestionComment
has text: Nope, didn't fix the problem of the backbone view not loading.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26289600

http://stackoverflow.com/comment/41224320
type: QuestionComment
comment on: http://stackoverflow.com/q/26274282
has text: where is your prepareGridContainer() function? Is it a plugin-function declared on JQuery? Then this.container.prepareGridContainer should probably be container.prepareGridContainer(). "this" references the caller object, and may vary (for example when triggered through an event).
score: 0
type: Comment

http://stackoverflow.com/q/26286071
has comment: http://stackoverflow.com/comment/41243684
downvote count: 4
answer count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/41243856
accepted answer: http://stackoverflow.com/a/26286166
has comment: http://stackoverflow.com/comment/41243651
has title: Regular expression stop after first match
favorite count: 0
has answer: http://stackoverflow.com/a/26286280
linked to: http://stackoverflow.com/q/12993629
score: -4
has body: So I have the following pattern work sleep work eat I need a regular expression that finds only the first word work and not all of them, I've never understood regular expressions. L.E: I'm using JavaScript and I want to match the word work not the first word whatever that word is
tagged with: regex
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26286170
has comment: http://stackoverflow.com/comment/41243846
has answer: http://stackoverflow.com/a/26286170
has comment: http://stackoverflow.com/comment/41243750
has answer: http://stackoverflow.com/a/26286166
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/12993629

http://stackoverflow.com/a/26231258
downvote count: 0
has body: You are correctly loading jQuery into the background page. If you were to use $(document).ready() in its code, it would work. The problem is, when you use executeScript, the code you specify does not execute in the same context as background.js. A brand new JS context is created, attached to the tab in question, and that context does not have jQuery in it (even if the tab's context itself has it, by the way, see isolated context). Furthermore, you're calling executeScript wrong. Its arguments are: integer (optional) tabId object details function (optional) callback You are calling it with two objects; it doesn't work like that. So, to fix, you will need to inject jQuery first in that execution context, and then your code. You need to chain 2 calls to ensure they execute in the correct order. chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.executeScript( tab.id, { file: 'jquery-2.1.1.js' }, function() { chrome.tabs.executeScript( tab.id, { code: '$( document ).ready(function() { console.log( "This works now" ); });' } ); } ); });
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41177738
accepted answer of: http://stackoverflow.com/q/26230446
answers question: http://stackoverflow.com/q/26230446
type: AcceptedAnswer

http://stackoverflow.com/a/26349131
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26336921
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26336921
has body: If you want to check all elements starting from selection.getStartElement() down to editor.editable(), then you can use the dom.elementPath. var elementPath = editor.elementPath(); var answerElement = elementPath.contains( function( el ) { return el.hasAttribute( 'answer' ); } ); If, on the other hand, you want to traverse the DOM tree in DFS order (source order), then you will want to use the dom.walker: var range = sel.getRanges()[ 0 ], walker = new CKEDITOR.dom.walker( range ), node; while ( ( node = walker.next() ) ) { // .. do something } Depending on a case you may want to do dozen of other things, so I can't describe all of them. There's many methods for in the dom.range class, dom.element or dom.iterator.

http://stackoverflow.com/a/26346452
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26346314
answers question: http://stackoverflow.com/q/26346314
has comment: http://stackoverflow.com/comment/41354187
has comment: http://stackoverflow.com/comment/41354260
has body: It seems that you are using text-shadow property, try with this css code: tag{ text-shadow:none; }

http://stackoverflow.com/comment/49314970
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/29441486
has text: Awesome, this does exactly, what limiting the upload to one file via `maxFiles` should do (but doesn't do correctly).

http://stackoverflow.com/comment/53485409
comment on: http://stackoverflow.com/q/26304245
has text: There are definitely other solutions than doing JSONP requests to solve the CORS issues in IE8/9
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26216976
possible better answer: http://stackoverflow.com/a/26217046
accepted answer: http://stackoverflow.com/a/26217022
has title: change class of current button element
has answer: http://stackoverflow.com/a/26217046
has answer: http://stackoverflow.com/a/26217101
downvote count: 0
has answer: http://stackoverflow.com/a/26216994
score: 1
tagged with: jquery
favorite count: 0
has body: My Html ELEMENT 1 ELEMENT 2 ELEMENT 3 My Css .button { background-color: #fff; color:#000; } .buttonactive { background-color: #000; color:#fff; } My jQuery function change() { $(this).addClass("buttonactive"); } I want to change the current button to the class buttonactive...
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/26217022
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/26249976
answers question: http://stackoverflow.com/q/26249958
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41177646
has comment: http://stackoverflow.com/comment/41177694
has body: You need to set position css property to body in order to work left. body{ position:relative; } REF : http://api.jquery.com/animate/
has comment: http://stackoverflow.com/comment/41177720
has comment: http://stackoverflow.com/comment/41177539
has comment: http://stackoverflow.com/comment/41177705
score: 2
has comment: http://stackoverflow.com/comment/41177602
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26249958

http://stackoverflow.com/a/26242773
has body: Try this instead : document.location.href = 'tel:a number'
type: Answer
answers question: http://stackoverflow.com/q/26242400
score: 0

http://stackoverflow.com/q/26328348
possible better answer: http://stackoverflow.com/a/26329468
has answer: http://stackoverflow.com/a/26329468
linked to: http://stackoverflow.com/q/7310521
has answer: http://stackoverflow.com/a/26329645
tagged with: node.js
score: 0
has title: Node.js Server Crash Handling
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26329645
has comment: http://stackoverflow.com/comment/41322360
tagged with: javascript
has body: Is there any way i can do some database updation things whenever my node.js server crashes or stopped. Like try{}catch(){}finally(){} in JAVA. I am a bit newbie here. Is there any events will node emit before it going shutdown. If so i can write my function there. I have scenario,if i stop the server manually,i need to update some fields in the database. The same is for Unhandled crashes also. i here about domain in Node.js. But i have no idea how to monitor a whole server using domain.
answer count: 2
tagged with: node.js-domains

http://stackoverflow.com/a/41454518
has body: This issue is a bit stale, so I thought I'd add a more up-to-date answer: CMUSphinx is great if you have something powerful enough to run it, but if you are on an embedded device like the Pi or the CHIP it can be quite slow. One alternative is Sonus which has offline hotword detection and then uses Google Cloud Speech for streaming results.
has comment: http://stackoverflow.com/comment/105386191
downvote count: 0
answers question: http://stackoverflow.com/q/26257873
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/q/26249138
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26249534
has title: How to use videojs with a jekyll powered site
tagged with: http://stackoverflow.com/tag/html
tagged with: jekyll
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26249534
tagged with: video-player
tagged with: html5-video
has body: Trying to create a custom skinned video player on this page. http://turbosaurusrex.github.io/keets/ I'd like to hide every element except the play button. I've linked video.js and the css file but it doesn't seem like it's working? I threw the cdn right after the body tag: &lt;link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"&gt; &lt;script src="http://vjs.zencdn.net/c/video.js"&gt;&lt;/script&gt; The video player returns the browser's native player. No change I make to the css does anything. Is this a jekyll thing I've overlooked, am I stupid or what? I don't know. P
answer count: 1

http://stackoverflow.com/a/26196124
score: 1
answers question: http://stackoverflow.com/q/26195847
accepted answer of: http://stackoverflow.com/q/26195847
type: AcceptedAnswer
downvote count: 0
has body: I can't see why your JS would work as it is, since you're not modifying your #dynamic class, but just a variable (dynamic). For me the corrected snippet works like a charm. function $I(id) { return document.getElementById(id); } var dynamic = $I('dynamic').className; var main = $I('main_wrapper').className; function toggleDynamic() { if($I('dynamic').className === "") { $I('dynamic').className = "displayed"; main = ""; } else { $I('dynamic').className = ""; main = "displayed"; } } .displayed{ opacity: 1 !important; pointer-events: auto !important; transition: opacity 1s ease-in .5s !important; } #main_wrapper{ max-width: 800px; opacity: 0; pointer-events: none; transition: opacity 1s linear; } #dynamic{ position: fixed; display: block; opacity: 0; pointer-events: none; max-width: 800px; transition: opacity 1s linear; } //Some content here //Dynamically generated (AJAX) content here //the below anchor skips the CSS transition somehow! Cancel //This anchor works exactly as intended Dynamic
type: Answer
upvote count: 1

http://stackoverflow.com/a/26211195
score: 7
has comment: http://stackoverflow.com/comment/122026103
accepted answer of: http://stackoverflow.com/q/26210487
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41105321
downvote count: 0
has body: To remove all commands do var allCommands = editor.commands.byName; editor.commands.removeCommands(allCommands) // now you can add commands as you wish allCommands.findnext.bindKey = {win: "Ctrl-H", mac: "Cmd-H"} editor.commands.addCommand(allCommands.findnext) But if you want to only remove particular binding, call editor.commands.bindKey("Cmd-G", null)
type: Answer
answers question: http://stackoverflow.com/q/26210487
upvote count: 7
has comment: http://stackoverflow.com/comment/85236475

http://stackoverflow.com/q/26337811
answer count: 3
accepted answer: http://stackoverflow.com/a/26339200
upvote count: 0
has comment: http://stackoverflow.com/comment/41338281
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41338312
has title: how to filter json object data?
has comment: http://stackoverflow.com/comment/41338385
has body: Input of Json Object: {"data":[ {"itemID":100,"Testcase1":"aaa","status":"Active"}, {"itemID":100,"Testcase1":"bbb","status":"No"}, {"itemID":100,"Testcase1":"ccc","status":"Active"}, {"itemID":101,"Testcase1":"zzz","status":"Active"} ]} Expected Output of Json Object: [{ "itemID":"100", "Testcase1":"aaa", "Testcase1":"bbb", "Testcase1":"ccc", "status":"Active", "status":"No", "status":"Active" }, { "itemID":"101", "Testcase1":"zzz", "status":"Active" }] anybody help me?
has comment: http://stackoverflow.com/comment/41338495
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41338322
has answer: http://stackoverflow.com/a/26337952
downvote count: 2
has comment: http://stackoverflow.com/comment/41338387
has answer: http://stackoverflow.com/a/26339200
possible better answer: http://stackoverflow.com/a/26337860
has answer: http://stackoverflow.com/a/26337860
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41338283

http://stackoverflow.com/q/26274854
tagged with: jquery
tagged with: ajax
has title: Ajax image upload refreshing the page on mobile
score: 0
tagged with: android
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26277131
linked to: http://stackoverflow.com/q/14274727
type: Question
has body: Hi I have a form that includes an Ajax image uploader, its working fine on desktop but when I try my mobile it causes the page to refresh after the image is selected and the image is lost (not to mention other bits of jquery I have set to run on complete of the upload). I have found this link Android browser refreshes page after selecting file via input element and although it provides an explanation I can see there is no solution offered. That post was more than a year ago and I havent found any other solutions online. There must be a workaround as I can see it working on other sites, e.g. http://www.putmeinthestory.com/ Code: &lt;form action="index.php?route=product/product/image_upload" onSubmit="return false" method="post" enctype="multipart/form-data" class="MyUploadForm"&gt; &lt;input name="FileInput" id="FileInput" type="file" /&gt;&lt;br /&gt; &lt;input type="submit" id="submit-btn" value="Upload File &amp;raquo;" /&gt; &lt;/form&gt; &lt;div id="output"&gt;&lt;/div&gt; Javascript: Im not sure if posting all the functions being called below is relevant to the issue. var options = { target: '#output', // target element(s) to be updated with server response beforeSubmit: beforeSubmit, // pre-submit callback success: afterSuccess, // post-submit callback uploadProgress: OnProgress, //upload progress callback resetForm: true // reset the form after successful submit }; jQuery('.MyUploadForm').submit(function() { $(this).ajaxSubmit(options); return false; });
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26279539
accepted answer: http://stackoverflow.com/a/26280624
tagged with: javascript
has comment: http://stackoverflow.com/comment/41231280
has body: As I'm learning javascript, I understand objects to be a collection of name/value pairs. For example, taken directly from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects An object is a collection of properties, and a property is an association between a name and a value. And I know that functions are also objects. For example, I can do: function myFunc() { return "I'm a function"; } myFunc.name = "Bob"; and myFunc.name will print "Bob". However, myFunc will print function myFunc() { return "I'm a function"; } which isn't a name/value pair; it's a function. Whereas if I did something like: var myObj = { prop1: "hello", prop2: "world" } myObj will print Object {prop1: "hello", prop2: "world"} So I'm a bit confused how to reconcile that functions are objects and objects are collections of name/value pairs, yet functions aren't collections of name/value pairs.
has comment: http://stackoverflow.com/comment/41231171
has comment: http://stackoverflow.com/comment/41231075
type: AnsweredQuestion
score: 1
favorite count: 0
has title: How are functions objects but not name/value pairs?
type: Question
has comment: http://stackoverflow.com/comment/41231814
has answer: http://stackoverflow.com/a/26280624
has comment: http://stackoverflow.com/comment/41231282
upvote count: 2
answer count: 1
downvote count: 1
tagged with: object
has comment: http://stackoverflow.com/comment/41231461
tagged with: function

http://stackoverflow.com/q/26233689
accepted answer: http://stackoverflow.com/a/26233824
answer count: 1
downvote count: 0
favorite count: 0
has body: Basically I have this HTML code : PARENT TEST 00 PARENT TEST 01 SubTest 011 SubTest 012 SubTest 012 PARENT TEST 02 SubTest 021 SubTest 022 PARENT TEST 02 SubTest1 By clicking on PARENT TEST I'd like it's content meaning (its SUB TEST ) to silde down and other to slide up. Here's what I've tried so far and didn't work: jQuery('.SubMenuParent a').click(function() { var Toggle = jQuery(this).closest('ul'); jQuery(this).not(Toggle).slideUp() jQuery(".SubMenu").each(function( index ) { if(jQuery(this).hasClass("in")){ jQuery(this).slideToggle(); // jQuery(this).slideUp(); } }); }); Any help with this? Much apprciated. JSFIDDLE DEMO
has comment: http://stackoverflow.com/comment/41146839
type: AnsweredQuestion
has title: Collapse close other when one is open jQuery
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26233824
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41172175
type: Comment
comment on: http://stackoverflow.com/q/26246971
type: QuestionComment
score: 3
has text: it's probably cuz you don't have the correct script tag ` `, remove that slash before the `=` sign

dailymotion-api
tags question: http://stackoverflow.com/q/26324693
type: Tag
tag name: dailymotion-api

http://stackoverflow.com/q/26324122
tagged with: javascript
score: 0
has body: I know, there are so many question like this, but I still haven't understand how to plot my json with D3. Well, this is the PHP: $sth = mysqli_query($con, "SELECT Time AS x, Value AS y FROM dati WHERE Data='2006-09-26' AND SensorType=6"); $rows = array(); while($r = mysqli_fetch_assoc($sth)) { $rows[] = $r; } echo json_encode($rows); this give me a json that I can see by an js alert: [{"x":"11:35:27","y":"500"},{"x":"11:40:40","y":"263"},{"x":"11:55:10","y":"440"},{"x":"12:11:34","y":"1063"},{"x":"12:16:48","y":"1065"},{"x":"12:22:01","y":"1121"}] and the fallows is my "wrong" json that has requested the json and made the alert: jQuery.ajax({ url: "json.php", type: "POST", async: false, success: function (data) { var obj = $.parseJSON(JSON.stringify(data)); alert(obj); } Now, if i try to plot obj with d3 (or whatever I guess) it doesn't work, I think that's because obj is NOT in the right format. is there anyone so kind to help me? My goal is to plot those value in an LineChart Thanks!
has title: Convert JSON made by PHP "json_encode", into array to plot those values with D3
tagged with: d3.js
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26324278
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26324278
answer count: 1

http://stackoverflow.com/comment/41318575
has text: Minor point, but there is no need to convert arguments to an array before stringifying it, JSON.stringify can handle arguments directly.
comment on: http://stackoverflow.com/q/26327171
score: 0
type: Comment
type: QuestionComment

google-chrome-extension
tags question: http://stackoverflow.com/q/26333764
tags question: http://stackoverflow.com/q/26250840
tags question: http://stackoverflow.com/q/26229882
tags question: http://stackoverflow.com/q/26215363
tags question: http://stackoverflow.com/q/26261499
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/26249133
tags question: http://stackoverflow.com/q/26328774
tags question: http://stackoverflow.com/q/26268761
tags question: http://stackoverflow.com/q/26273405
tags question: http://stackoverflow.com/q/26242682
tags question: http://stackoverflow.com/q/26321405
tags question: http://stackoverflow.com/q/26218934
tags question: http://stackoverflow.com/q/26221230
tags question: http://stackoverflow.com/q/26219872
tags question: http://stackoverflow.com/q/26319836
tags question: http://stackoverflow.com/q/26212994
tags question: http://stackoverflow.com/q/26281623
tags question: http://stackoverflow.com/q/26242405
tags question: http://stackoverflow.com/q/26300692
tags question: http://stackoverflow.com/q/26296181
tags question: http://stackoverflow.com/q/26272872
tags question: http://stackoverflow.com/q/26275082
type: Tag
tags question: http://stackoverflow.com/q/26245397
tags question: http://stackoverflow.com/q/26265879
tags question: http://stackoverflow.com/q/26321803
tags question: http://stackoverflow.com/q/26345111
tags question: http://stackoverflow.com/q/26302551
tags question: http://stackoverflow.com/q/26247514
tags question: http://stackoverflow.com/q/26240463
tags question: http://stackoverflow.com/q/26227683
tags question: http://stackoverflow.com/q/26245888
tags question: http://stackoverflow.com/q/26343007
tags question: http://stackoverflow.com/q/26328093
tags question: http://stackoverflow.com/q/26238516
tags question: http://stackoverflow.com/q/26287959
tags question: http://stackoverflow.com/q/26329907
tags question: http://stackoverflow.com/q/26230446
tags question: http://stackoverflow.com/q/26321114
tags question: http://stackoverflow.com/q/26196265
tags question: http://stackoverflow.com/q/26350747
tags question: http://stackoverflow.com/q/26224640
tags question: http://stackoverflow.com/q/26326099
tags question: http://stackoverflow.com/q/26226161
tags question: http://stackoverflow.com/q/26314783
tags question: http://stackoverflow.com/q/26324287
tags question: http://stackoverflow.com/q/26257436
tags question: http://stackoverflow.com/q/26239449
tags question: http://stackoverflow.com/q/26207371
tags question: http://stackoverflow.com/q/26286373
tags question: http://stackoverflow.com/q/26335530
tags question: http://stackoverflow.com/q/26335776
tags question: http://stackoverflow.com/q/26279971

http://stackoverflow.com/q/26268674
tagged with: javascript
has body: First post here on stack overflow... I've been playing around with the three.js based world editor called verold. It has some great features, but I've run into a problem with the scripting setup. I'm trying to implement a THREE.Sprite() and attach it as a component of an object. Here's what I've tried: Component.prototype.objectCreated = function() { // this.getThreeData() is available this.spriteimage.load({ load:_.bind(function() { this.createImageSprite(); }, this) }); }; Component.prototype.createImageSprite = function(){ //Load the spriteimage var map = this.spriteimage.threeData; var spriteMaterial = new THREE.SpriteMaterial( { map: map, color: "rgb(255,0,0)", fog: true, useScreenCoordinates: false} ); var mySprite = new THREE.Sprite( spriteMaterial ); mySprite.scale.set(1,1,1); mySprite.location.x = 0.5; mySprite.location.y = 0.5; mySprite.location.y = 0.5; scene.add(mySprite); }; The script has an attribute called spriteimage, which is a verold asset -> 2D texture. When this script is added as a component of the scene, the project runs, but you can't see a sprite at all. I've tried replicating this code in a regular three.js project with success. Can anybody offer a solution to this? thanks.
favorite count: 0
has title: How to get three.js sprite in Verold script
accepted answer: http://stackoverflow.com/a/26278602
upvote count: 2
tagged with: three.js
score: 2
type: AnsweredQuestion
tagged with: verold
type: Question
has answer: http://stackoverflow.com/a/26278602
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41153385
score: 0
comment on: http://stackoverflow.com/q/26236455
type: Comment
type: QuestionComment
has text: you mean you want to expand it one by one ?

http://stackoverflow.com/comment/41363129
type: QuestionComment
has text: Use mine. It's working fine
comment on: http://stackoverflow.com/q/26351435
score: 0
type: Comment

http://stackoverflow.com/comment/41246971
has text: Thanks, I will ask about this. I believe we can use JQuery. Will check into this asap.
type: Comment
comment on: http://stackoverflow.com/a/26287478
score: 0
type: AnswerComment

http://stackoverflow.com/a/26207437
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41105174
downvote count: 0
has body: Yes, you can always flatten a promise chain with Promise.all (shorthand through Promise.join in Bluebird) by using promises for the proxies they are. After all - promises abstract values, you can always unwrap a promise as late as you want and have other variables depend on it. Whether or not it's more readable is another debate: foo().then(function(a){ return bar(a).then(function(b){ return g(a,b); // "needed" to nest because I wanted `a` }); }); Can be written as: var a = foo(); var b = a.then(bar); Promise.join(a, b, function(a,b){ return g(a, b); // alternatively, res could have been `Promise.join(a,b, g)` }); So generally - you can always avoid nesting but a lot of time you might not want to. In your case, this can even be: function authenticate() { var userPass = Promise.all([ getUsername().then(getUser), getPassword()]); var passHash = userPass.get(0).get("passwordHash"); var newHash = userPass.get(1).then(hash); var equal = Promise.join(userHash, newHash, function(a, b){ return a !==b }); return equal.then(function(val){ if(!val) throw new Error("..."); }); } Flatter? Sure. Better? That's a whole other question. If you have a nested for loop, you might want to keep it a nested for loop and nest rather than hack around that option and use a single loop.
type: Answer
answers question: http://stackoverflow.com/q/26204865
accepted answer of: http://stackoverflow.com/q/26204865
upvote count: 10
score: 10
has comment: http://stackoverflow.com/comment/41105260

http://stackoverflow.com/q/26266578
upvote count: 9
has comment: http://stackoverflow.com/comment/41521375
has answer: http://stackoverflow.com/a/26277666
score: 9
has comment: http://stackoverflow.com/comment/41587326
has answer: http://stackoverflow.com/a/26461417
tagged with: highcharts
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has title: Improve performance of Highcharts line chart
has comment: http://stackoverflow.com/comment/41557924
has comment: http://stackoverflow.com/comment/41552845
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26272761
has body: I'm using Highcharts to create a zoomable line chart that has 1440 data points, here's a JSFiddle demo thereof. In Firefox, the performance of the chart is very sluggish, it takes several seconds to render, and there's a long delay between hovering over a datapoint and the tooltip appearing. On my page there are several such charts and their combined impact makes the page almost unusable. Are there any tricks/tips for improving the performance of charts that have relatively large data sets? I've appended the chart's JSON to the end of this post (with the data itself truncated). Incidentally, before I added the turboThreshold: 0 property the chart didn't render at all because the series has more than 1000 data points. According to the docs: When a series contains a data array that is longer than this, only one dimensional arrays of numbers, or two dimensional arrays with x and y values are allowed. Also, only the first point is tested, and the rest are assumed to be the same format. This saves expensive data checking and indexing in long series. Set it to 0 disable. Defaults to 1000. $(function () { $('#container').highcharts({ chart: { type: 'line', marginRight: 10, zoomType: 'x' }, xAxis: { type: 'datetime' }, yAxis: { labels: { formatter: function () { return currencySymbol + this.axis.defaultLabelFormatter.call(this); } }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, tooltip: { formatter: function () { return Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '&lt;br/&gt;' + currencySymbol + Highcharts.numberFormat(this.y, 2); } }, legend: { enabled: false }, credits: { enabled: false }, plotOptions: { series: { states: { hover: { lineWidthPlus: 0 } }, lineWidth: 1, marker: { enabled: false, radius: 3 } } }, series: [{ data: [{"y":93,"x":1412722800000},{"y":54,"x":1412722860000}], turboThreshold: 0 }] }); }); Update I've updated the demo to include all suggestions I've received so far. Disabling animations helped a bit, but the page is still very sl…
has comment: http://stackoverflow.com/comment/41598700
type: Question
tagged with: performance

identifier
tag name: identifier
tags question: http://stackoverflow.com/q/26297211
type: Tag

http://stackoverflow.com/a/26277488
score: 3
downvote count: 0
type: Answer
has body: You're not required to use module.exports in a module. If in your second file (gulp/tasks/browserSync) you were to do this: var localValue = "bar"; globalValue = "foo"; // and we never touch module.exports Then node will create 1 local value which is not exported and 1 value in the global namespace, but that shouldn't be surprising. If you were to do this in gulpfile.js: var baz = requireDir('./gulp/tasks', { recurse: true }); Then baz would be: { ... "browserSync": {}, // the default value of ... // `module.exports` is an object ( {} ) } And when you do this in one of your require()'d files: var gulp = require("gulp"); Then require will return a cached response, because it has already loaded /node_modules/gulp/ before in your main file. So yes, since you're not making global values (everything is prefixed with var), everything is kept contained within the task files themselves.
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26276770
has comment: http://stackoverflow.com/comment/41237092
has comment: http://stackoverflow.com/comment/41234523
answers question: http://stackoverflow.com/q/26276770
type: AcceptedAnswer

http://stackoverflow.com/comment/41202437
has text: Please see the answer I just posted, tested and working nicely.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26259370
type: AnswerComment

http://stackoverflow.com/comment/41283938
score: 0
type: Comment
type: QuestionComment
has text: The iframe was too short: http://jsfiddle.net/uorvvdd6/1/
comment on: http://stackoverflow.com/q/26307836

http://stackoverflow.com/q/26211030
tagged with: php
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3423394
accepted answer: http://stackoverflow.com/a/26211719
has body: My requirement is sorting objects based on the price.Based on the cash, objects should be sorted. Below is the sample data which i consoled and got and showing below. By means of consoling full_sky.sort(test); i am getting below data. 0: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 44499 total_surcharge: 885 total_tax: 1414 __proto__: Object length: 1 1: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 2299 total_surcharge: 885 total_tax: 1414 __proto__: Object length: 1 2: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 3399 total_surcharge: 885 total_tax: 1414 __proto__: Object length: 1 Output should be something like this 1: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 2299 total_surcharge: 885 total_tax: 1414 __proto__: Object length: 1 2: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 3399 total_surcharge: 885 total_tax: 1414 __proto__: Object length: 1 0: Object id: 1 test: Array[1] 0: Object fuldata: "xyz" pat: "xyz" img: "6E.gif" nos: "0 - stop" show_price: 1 sour: "BLR" tickettype: "e" __proto__: Object length: 1 __proto__: Array[0] price: Array[1] 0: Object cash: 44499 total_surcharge: 885 total_tax: 1414 __proto__: Object le…
type: Question
has answer: http://stackoverflow.com/a/26211477
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26211141
answer count: 3
has comment: http://stackoverflow.com/comment/41104961
has comment: http://stackoverflow.com/comment/41104895
linked to: http://stackoverflow.com/q/14208651
possible better answer: http://stackoverflow.com/a/26211141
has title: sort object by price using jquery
has answer: http://stackoverflow.com/a/26211719

http://stackoverflow.com/comment/41242677
score: 2
comment on: http://stackoverflow.com/q/26285330
has text: I think the character is a [Left-to-right mark](http://en.wikipedia.org/wiki/Left-to-right_mark) upon further inspection, in case anyone is interested... And here's an explanation of what's going on: http://stackoverflow.com/q/25574963/497356
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26302532
type: AnsweredQuestion
type: Question
tagged with: jquery-mobile
tagged with: javascript
score: 0
has body: I have a google map/marker application where I want to use the marker id in a mysql query in order to extract the data relating to the marker in a listview when the marker is clicked. The variable is assigned when the marker is clicked and I am using ajax to transfer the value through to a php file for the variable to be used in the mysql query. JS function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); var site_id = marker.get("id"); $.ajax({ url: 'getoffer.php', type: "POST", data: { site: site_id}, success: getoffers }); }); } On success I've called the getoffers function which populates the listview with the database values. var output1 = ''; function getoffers() { $.post( "getoffer.php?getjson", function( data ) { var data = JSON.parse(data); console.log(data); $.each(data, function(index, value){ output1 += '&lt;li data-id='+ value.offer_id +'&gt;&lt;a href="#""&gt;' + value.offer_title + '&lt;/a&gt;&lt;/li&gt;'; }); $('#offerlist').html(output1).listview().listview('refresh'); }); } PHP &lt;?php $site = $_POST['site_id']; require("dbconnect.php"); try { $DBH = new PDO("mysql:host=$server;dbname=$database;charset=utf8", $username, $password, array(PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET NAMES 'utf8'")); } catch (PDOException $e) { print "Error!: " . $e-&gt;getMessage() . "&lt;br/&gt;"; die(); } $STH = $DBH-&gt;prepare("SELECT * FROM Offer WHERE site_id='$site'"); $STH-&gt;execute(); $arr = $STH-&gt;fetchAll(); echo json_encode($arr); die(); When I run the application there are no errors but the listview is blank. When I remove the ajax code and the where clause from sql the code returns all the values in that table so I know that it works regarding the db connection and the output to listview. I must be going wrong with the variable passing in ajax or if I'm calling the code incorrectly. Any advice is greatly appreciated. Thank you
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26302596
accepted answer: http://stackoverflow.com/a/26302596
has comment: http://stackoverflow.com/comment/41273635
tagged with: php
has title: Using javascript variable in mysql query and populate listview

http://stackoverflow.com/comment/41305345
comment on: http://stackoverflow.com/a/26304720
type: AnswerComment
has text: Thanks! I'd like to do this without modifying markup, but it looks like this is impossible?
score: 0
type: Comment

http://stackoverflow.com/q/26196895
score: 1
type: Question
has title: Trying to make a to do list
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26197005
has body: Im new to javascript and coding in general, I'm trying to make a simple to do list but cant get the delete button to delete all the checkboxes, it will only delete the last checkbox made. Thanks guys http://jsfiddle.net/2L8y73ac/ var task = document.getElementById('textinput'); function ObjectTask() { self = this; self.init = function() { self.itemText=document.createTextNode(task.value); self.checkbox = document.createElement("input"); self.checkbox.type = "checkbox"; self.checkbox.name = task.value; self.checkbox.id = "checkbox"; self.checkbox.value = "0"; self.checkbox.onclick = self.clickMe; self.listItem=document.createElement("li"); self.listItem.id = task.value; self.listItem.appendChild(self.itemText); self.listItem.appendChild(self.checkbox); self.deleteCheckBox = document.getElementById('deleteBtn'); self.deleteCheckBox.onclick = self.deleteMe; document.getElementById('place').appendChild(self.listItem); } self.clickMe = function() { if (self.checkbox.value === "0") { self.checkbox.value = "1"; console.log("1"); }else { self.checkbox.value = "0"; console.log("0"); } } self.deleteMe = function(){ if (self.checkbox.value == "1"){ var parent = self.listItem.parentNode; parent.removeChild(self.listItem); } } } function taskadd() { var taskNew = new ObjectTask(); taskNew.init(); }
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41077141
type: Comment
comment on: http://stackoverflow.com/q/26195958
score: 0
has text: You have to use "document.getElementsByClassName". You used 'element' instead of 'elements'. document.getElementsByClassName will give you an array of dom objects matching with the classname.
type: QuestionComment

http://stackoverflow.com/a/26201450
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41094235
has comment: http://stackoverflow.com/comment/41094535
score: 1
has body: If you want to fire complete callback function when the click event is fired, just move the call inside: ;(function ($, window) { $.fn.coolBox = function (options) { console.log("calls to opens"); var settings = { complete: false, beforeStart: false, Background: "#333", Opacity: "0.8", Padding: "10px", Height: "auto", Width: "auto", OverlayClose: true, EscClose: true, Zindex: "99991", Border: "2px", BorderColor: "black", PopUp: "fixed" }; var o = {}; $.extend(o, settings, options); //is this not for event handling before starting my plugin to change DOM? if (typeof o.beforeStart == 'function') { o.beforeStart.call(this); // brings the scope to the callback } return this.each(function () { var link = $(this); link.click(function (event) { var clBox = document.createElement('div'); clBox.setAttribute("id", "clBoxWrapper"); document.body.appendChild(clBox); $clBoxWrapper = $("#clBoxWrapper"); $clBoxWrapper.wrap($("&lt;div id='clBoxOuterWrapper'&gt;&lt;/div&gt;")); oBox = document.getElementById("clBoxOuterWrapper"); oBox.style.width = o.Width; oBox.style.height = o.Height; if (o.PopUp == "fixed") { oBox.style.position = "fixed"; } else { oBox.style.position = "absolute"; } oBox.style.zIndex = o.Zindex + 1; var olBox = document.createElement('div'); olBox.setAttribute("id", "clBoxOverlay"); olBox.style.width = "100%"; olBox.style.height = "100%"; olBox.style.position = "fixed"; olBox.style.zIndex = o.Zindex; olBox.style.opacity = o.Opacity; olBox.style.backgroundColor = o.Background; olBox.style.top = "0px"; olBox.style.left = "0px"; document.body.appendChild(olBox); $wrapContent = link.attr("href"); //alert($wrapContent); if ($wrapContent.indexOf("#") == 0) { $wrapContainer = $($wrapContent).html(); //alert($wrapContainer); $oBoxWrapper = $("#clBoxOuterWrapper"); $clBoxOverlay = $("#clBoxOverlay"); $clBoxOverlay.css({ "height": $(document).innerHeight(), "width": $(document).innerWidth(), }); if ($oBoxWrapper.length) { $clBoxWrapper.html($wrapContainer); if (o.PopUp ==…
has comment: http://stackoverflow.com/comment/41094329
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41094900
accepted answer of: http://stackoverflow.com/q/26197541
answers question: http://stackoverflow.com/q/26197541

http://stackoverflow.com/a/26243341
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26227685
has body: Thank you, but they are in different domains. After reading some other postings here, I decided to try using an overlay with CSS Pointer Events set to none, and it worked. For the benefit of anyone wanting to try this, the main declarations are... In the overlay: z-index: 100; In the IFrame: position: relative; top: -123px; left: 0; pointer-events: none; In other words, the overlay's z-index must be higher than the IFrame. The IFrame must be positioned absolutely, or relative to the overlay. You must set pointer-events to none.

redundancy
tags question: http://stackoverflow.com/q/26242007
type: Tag
tag name: redundancy

http://stackoverflow.com/comment/41178478
type: Comment
comment on: http://stackoverflow.com/a/26250415
score: 1
has text: @user3086182: if it was the way you thought it was, it would make it more difficult to reason about code. To understand what happens in a specific assignment, you'd first have to trace back where the variable's current value comes from.
type: AnswerComment

http://stackoverflow.com/comment/41313423
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26324366
has text: @Nico I am asking Murplyx. as i think it is not a good practice.

http://stackoverflow.com/a/26231676
score: 1
upvote count: 1
has body: You should use jQuery to this with method mouseover() and mouseout(), The rotate attribute doesn't let your picture horizontally. Here my JSfiddle. http://jsfiddle.net/gLj8n9s6/ CSS #main { width: 300px; height: 200px; overflow: hidden; } #img { width:300px; height:200px; } HTML &lt;div id="main"&gt; &lt;img id="img" src="http://s13.postimg.org/m3yqyd7zb/windows_xp_bliss_wide.jpg" /&gt; &lt;/div&gt; jQuery $('#main').mouseover(function() { $(this).animate({width : '200px'}); }); $('#main').mouseout(function() { $(this).animate({width : '300px'}); }); Or KISS by doing this in pure CSS without the animate method in jQuery
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26230833

http://stackoverflow.com/comment/41273473
type: Comment
type: AnswerComment
has text: There is nothing in the console logs when I interact with the popup, using both the SayHi function and my own function. I can use getElementById to find my button, no problem. I'm not really sure where to go from there, just beginning to learn :/
comment on: http://stackoverflow.com/a/26301748
score: 0

http://stackoverflow.com/q/26276697
linked to: http://stackoverflow.com/q/21413864
has comment: http://stackoverflow.com/comment/41226628
has title: updating 2 objects with each other as subobjects - Maximum call stack size exceeded
answer count: 1
tagged with: node.js
has body: I have two objects, childPost and parentPost. I want to store the childPost as Subelement to parentPost and the other way around, but no matter what I try I always run into: RangeError: Maximum call stack size exceeded There are many threads on this topic already on stackoverflow, but none seem to have the exact problem I'm having. My code (left out unnecessary code like error handling): async.parallel([ function () { originalPost.subPosts.push(post); originalPost.save(function (err) { }); }, function () { post.originalPost.push(originalPost); post.save(function (err, post) { }); } ], sendResponse(res, 201, post)); What I tried beside the above solution: same code without async lib setImmediate(), nextTick(), setTimeout() left out the post.originalPost.push(originalPost); - this works, but ofc it doesn't save the sub element in my childpost I use: node.js v0.11.14-pre mongoose express mongodb v2.4.9 edit: my data model: var postSchema = new mongoose.Schema({ sharedPosts: [subPostSchema], originalPost: [subPostSchema], // ...- }); my subPostSchema looks just like my postSchema (unfortunately I couldn't do a sharedPosts: [postSchema] without getting an error -> so I copied my Schema. Seems wrong to me, but was the only way I could get it working so far)
tagged with: mongodb
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41226330
has answer: http://stackoverflow.com/a/26277615
tagged with: mongoose
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/41226417
has comment: http://stackoverflow.com/comment/41225915
type: Question
has comment: http://stackoverflow.com/comment/41227235
accepted answer: http://stackoverflow.com/a/26277615
score: 0

http://stackoverflow.com/comment/41265548
score: 0
type: Comment
type: QuestionComment
has text: No need to edit it to say it's been solved - if one of the answers has helped you fix your problem, you can accept it using the tick. If more than one was useful, feel free to vote up both of them and pick one to choose as the "most helpful".
comment on: http://stackoverflow.com/q/26297770

http://stackoverflow.com/q/26254123
downvote count: 1
has title: Uncaught TypeError: Illegal invocation in Javascript (geolocation)
type: Question
has answer: http://stackoverflow.com/a/26254242
accepted answer: http://stackoverflow.com/a/26254242
tagged with: javascript
score: -1
has body: I am getting the Javascript error "Uncaught TypeError: Illegal invocation" when running the code var nativeGeoloation = window.navigator.geolocation.getCurrentPosition; nativeGeoloation(function (){ alert("ok")}); I have tried calling the code in the context of the window, but get the same error: nativeGeoloation.call(window,function (){ alert("ok")}) The background of this question is that I am trying to access the native version of the geolocation function that has been overwritten by another javascript library (cordova)
upvote count: 0
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: cordova
tagged with: geolocation

http://stackoverflow.com/comment/41141828
has text: Which error do you get?
comment on: http://stackoverflow.com/q/26230694
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41191794
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26258266
has text: whether the forms are submitted using ajax?
type: Comment

http://stackoverflow.com/comment/41181993
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26252212
type: QuestionComment
has text: That's normal, DOM is constructed on the fly by angularjs... the only way to view the source is by using the dev tools like chrome debug / firebug etc ... Why do you want to see the source ? SEO concerns ?

http://stackoverflow.com/q/26281928
favorite count: 0
has comment: http://stackoverflow.com/comment/41235654
has answer: http://stackoverflow.com/a/26282377
type: Question
has answer: http://stackoverflow.com/a/26281951
tagged with: regex
possible better answer: http://stackoverflow.com/a/26282006
has answer: http://stackoverflow.com/a/26282006
accepted answer: http://stackoverflow.com/a/26281951
upvote count: 3
has body: I'm trying to validate a javascript string against 0.5 incrementals. So for exmaple.. var number = 1 //true var number = 1.2 //false var number = 1.5 //true var number = 2.8 //false var number = 4 //true var number = 0.5 //true var number = 10.4 //false I'm wondering if someone can help me get started with something like this. Would perhaps regex be involved? function validateNumber(value){ //Do validation } Thank you for reading.
tagged with: javascript
has answer: http://stackoverflow.com/a/26281999
has title: How to validate number against 0.5 incremental using Javascript
answer count: 4
type: AnsweredQuestion
score: 3
downvote count: 0

http://stackoverflow.com/comment/41083583
type: QuestionComment
score: 0
has text: Way to little info to answer your question.
comment on: http://stackoverflow.com/q/26199557
type: Comment

http://stackoverflow.com/comment/41347137
has text: Be aware that will disable all click handlers for that selector, that were registered with 'on'. Of course, if that is the only one then no problem.
comment on: http://stackoverflow.com/q/26342482
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/30160323
has comment: http://stackoverflow.com/comment/82352164
accepted answer of: http://stackoverflow.com/q/26350291
answers question: http://stackoverflow.com/q/26350291
score: 5
upvote count: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Wow! no one answered this question for 6 months? You need to use csvtojson plugin to convert csv file to json and get the protractor test to read from the json file. It is better to integrate it with gulp so gulp will regenerate the json file for any changes made to the csv file Sample code: var gulp = require('gulp'); var convert = require('gulp-convert'); var rename = require('gulp-rename'); var watch = require('gulp-watch'); gulp.task('convertCsv', function() { console.log('converting'); gulp.src('./TestData/*.csv') .pipe(convert({from: 'csv', to:'json'})) .pipe(rename({extname: '.json'})) .pipe(gulp.dest('./TestData/json/')); }); gulp.task('csv', function () { console.log('watching'); gulp.watch('./TestData/*.csv', ['convertCsv']); }); To use the data: describe('LoginPage.', function() { var loginPage = require('../PageObjects/LoginPage.js'); var loginData = require('../TestData/json/loginData.json'); loginData.forEach(function (data) { it(data.description, function () { loginPage.usernameField.sendKeys(data.username); loginPage.passwordField.sendKeys(data.password); loginPage.loginButton.click(); }); }); });

http://stackoverflow.com/comment/41183535
comment on: http://stackoverflow.com/q/26253085
score: 0
type: Comment
type: QuestionComment
has text: it doesn't make sense to me when a static resource takes > 10s, furthermore 1.3min

http://stackoverflow.com/comment/41239134
type: Comment
type: QuestionComment
has text: What code causes that error to be thrown
comment on: http://stackoverflow.com/q/26283721
score: 0

http://stackoverflow.com/q/26261982
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41199000
score: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/26262953
downvote count: 1
has body: Is there an easy way to detect and decode all encoded characters in any url coming to my node app ? can it be done with a middleware that fetch and decode symbols like &amp; ?
type: Question
tagged with: javascript
answer count: 1
tagged with: express
favorite count: 0
has answer: http://stackoverflow.com/a/26262953
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
has title: Decoding &amp; from all incoming requests to my node js app

http://stackoverflow.com/a/26256128
upvote count: 1
downvote count: 0
score: 1
has body: That's normal, DOM is constructed on the fly by angularjs... the only way to view the source is by using the dev tools like chrome debug / firebug etc If you have some SEO concernrs, you'll need a way to let google parse your content. So you'll need to build your pages server sides and not clientside. For that you can for example use see https://prerender.io/ for example, that will preprocess your angular pages serverside See also How to make a SPA SEO crawlable? EDIT: Google seems to also execute javascript : http://ng-learn.org/2014/05/SEO-Google-crawl-JavaScript/ &amp; http://googlewebmastercentral.blogspot.fr/2014/05/understanding-web-pages-better.html
type: Answer
answers question: http://stackoverflow.com/q/26252212

http://stackoverflow.com/comment/41319839
type: Comment
has text: Note `in` operator also searches in the prototype, which could be bad is another script polluted `Object.prototype`. Using `cache.hasOwnProperty(key)` would be safer.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26327171

http://stackoverflow.com/comment/41089968
type: Comment
comment on: http://stackoverflow.com/q/26203224
type: QuestionComment
has text: if you want the keydown event to only fire once, why not use $(document).one('keydown', function() {....}) ?
score: 0

http://stackoverflow.com/q/26322858
has comment: http://stackoverflow.com/comment/41310548
answer count: 1
accepted answer: http://stackoverflow.com/a/26323359
has comment: http://stackoverflow.com/comment/41311062
score: 0
has comment: http://stackoverflow.com/comment/41310459
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41310468
type: Question
has comment: http://stackoverflow.com/comment/41310867
has answer: http://stackoverflow.com/a/26323359
has comment: http://stackoverflow.com/comment/41310474
has comment: http://stackoverflow.com/comment/41310586
has title: Animated javascript without jQuery?
tagged with: javascript
has body: So I wrote a very simple html/js script to be used in OBS (Open Broadcaster Software): http://8wayrun.tv/scripts/sf4.html setTimeout(function() { $("#file1").show('slide', {direction: 'left'}, 1500); $("#file2").show('slide', {direction: 'right'}, 1500); setTimeout(function() { $('#vs').fadeIn({queue: false, duration: 500}); $('#vs').animate({ width: "300", top: "160", left: "490" }, 500); }, 1500); }, 1000); The problem with this is that jQuery and jQuery-UI I gigantic libraries. Loading up half a meg of libraries in OBS causes some severe performance issues. As you can see, I am doing some pretty simple stuff. I was wondering if someone could help me get this function running without the use of any external libraries. I need it to run as smooth as possible as I broadcast in 60fps.
has comment: http://stackoverflow.com/comment/41310794

http://stackoverflow.com/q/26260081
has answer: http://stackoverflow.com/a/26261927
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41195649
has body: I need to set the width of an HTML element at runtime from my controller in AngularJS. My controller is defined within my directive. I know that I need to set the width of the first ul element within the directive. Currently, I have the following: var list = $element.find('ul'); $element(list[0]).css('width', '300px')); However, when I try this, I get an error that says: TypeError: object is not a function What am I doing wrong? How do I set the width of an HTML element at runtime in AngularJS? Thank you!
score: 1
accepted answer: http://stackoverflow.com/a/26261927
type: Question
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26260219
has answer: http://stackoverflow.com/a/26260421
has answer: http://stackoverflow.com/a/26260219
answer count: 3
favorite count: 0
tagged with: angularjs
upvote count: 1
has title: Set Width of HTML element at runtime in AngularJS

http://stackoverflow.com/q/26277054
has title: history.pushstate jquery back button not loading prev content
upvote count: 2
type: UnansweredQuestion
score: 2
answer count: 0
has body: I am trying to implement history.pushstate with jQuery as described This is the following code I have: container = $(".loadContent"); currentItem = null; $(".list-group a").each(function (index) { var item = $(this); if (item.hasClass("active")) { currentItem = item; } item.on("click", function(e) { e.preventDefault(); history.pushState({}, '', $(this).attr("href")); $(".heightDiv").css("height", divheight); if (currentItem == item) return; $(".content").empty(); $(".loading").css("height", divheight).show(); url = this.href + " .content"; if (currentItem) currentItem.removeClass("active"); currentItem = item.addClass("active"); container.load(url, function(){$(".loading").hide();}); return false; }); }); loadPage = function(href) { container.load(href + " .content"); }; $(window).on("popstate", function(e) { if (e.originalEvent.state !== null) { loadPage(location.href); } }); The address bar it is picking up the correct address, however when I hit the back button, the address bar gets back correctly but the previous content it is not loaded
type: Question
tagged with: javascript
tagged with: jquery
tagged with: browser-history
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26324642
type: Question
tagged with: math
has comment: http://stackoverflow.com/comment/41331141
has body: When I use SetLookAt in from the matrix library used in the book "WebGL Programing Guide?, then is it necessary to multiply the normals by the transpose inverse matrix of the viewmatrix before lighting calculations occur, even when the viewmatrix only contains the transformation applied by the SetLookAt method and no other transformations?
score: 0
has comment: http://stackoverflow.com/comment/41326974
has answer: http://stackoverflow.com/a/26345076
tagged with: 3d
answer count: 1
tagged with: javascript
has title: Does SetLookAt requires the normals to be multiplied by the inverse transponse matrix?
type: UnansweredQuestion

http://stackoverflow.com/comment/41124546
has text: Well that part is a little weird; what browser is involved? There's no reason that the same JavaScript would be have differently when served from a different place except for things like Internet Explorer "security zones" or whatever they call it.
score: 1
comment on: http://stackoverflow.com/q/26221438
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26303744
has comment: http://stackoverflow.com/comment/41281618
has answer: http://stackoverflow.com/a/26304629
has comment: http://stackoverflow.com/comment/41276542
tagged with: http://stackoverflow.com/tag/html
has title: Want to arrange css divs in a proper way
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26304596
has comment: http://stackoverflow.com/comment/41297925
has answer: http://stackoverflow.com/a/26304035
has comment: http://stackoverflow.com/comment/41277039
tagged with: css
has answer: http://stackoverflow.com/a/26304688
has comment: http://stackoverflow.com/comment/41276452
has comment: http://stackoverflow.com/comment/41276938
tagged with: css-float
upvote count: 1
has comment: http://stackoverflow.com/comment/41280524
has comment: http://stackoverflow.com/comment/41294055
has answer: http://stackoverflow.com/a/26303844
has body: Please, Please answer / help me. I have three divs with CSS and it is generated dynamically. And I call them wincontainer, smalldiv and largediv. wincontainer is a container of smalldiv and largediv as we can see in the image. properties of divs As we can see we have 2 largedivs and 4 smalldivs which is dynamically generated yet Question: I want to arrange small and large div in a proper way. As like this picture. fig (1). but they are coming like as fig (2) As i said I cannot create sub wrappers because they are dynamically and very important serial wise generated...if i make the subwrapper then it cant be in serial wise Note: I can not make another special div to contain smalldiv or largediv to separate it, because that small and large div is in a serial wise so we cant put them in a special container and they are dynamic. In JSFIDDLE -> http://jsfiddle.net/jwy3c3n5/ when you delete the upper most smalldiv then it will work fine but when you add smalldiv on top it goes mad.. i want to fix it and make it proper way at unlimited div a div will either be largediv or smalldiv, there will could be a variable number of each and can appear in any order. All largediv and smalldiv are contained within wincontainer. Additional markup is not allowed.
has comment: http://stackoverflow.com/comment/41276511
has comment: http://stackoverflow.com/comment/41280791
has comment: http://stackoverflow.com/comment/41276897
downvote count: 0
has comment: http://stackoverflow.com/comment/41281602
answer count: 5
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery

http://stackoverflow.com/q/26284331
downvote count: 0
tagged with: javascript
tagged with: string
favorite count: 0
has comment: http://stackoverflow.com/comment/41240343
linked to: http://stackoverflow.com/q/1732348
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41240587
tagged with: regex
score: 1
has comment: http://stackoverflow.com/comment/41241246
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41243205
upvote count: 1
has comment: http://stackoverflow.com/comment/41240992
has body: I'm been scratching my head on this one for a while now and am hoping there's a solution out there somewhere.. I have some HTML strings similar to this: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut lobortis luctus leo, non porta nisi euismod ut. Nulla tristique scelerisque fringilla.' I need to use JavaScript to truncate/split the text after a certain number of characters, not counting the HTML in the links, but still rendering the links in the resulting text. So for example, if I'm truncating it at 20 characters then I'd want the following to be displayed, but with the 'Lorem ipsum' text still linked: Lorem ipsum dolor si If I just use str.substring(0,20) then the HTML characters in the string are also displayed so I get: L Which just renders as a hyper-linked L: L Does anyone have any suggestions for me? I tried doing a search but couldn't find an appropriate answer. If it helps I have both the raw non-HTML text and the full HTML text (with links) available that I can use in the JS. I don't want to just use the raw text though as it then won't render any of the links. For example, if I split the text at 200 characters then I'd want all of the links to still be rendered in the HTML, but for only 200 characters of actual on-screen text to be displayed to the user. Hopefully that makes sense. Many thanks in advance for any help! John EDIT: To clarify what I'm trying to accomplish; I have a post (text string) which has links in it. I want to count the characters of the text excluding the HTML characters in the links. I then want to truncate the text to still include the HTML links, but only show X number of characters to the user. For example; 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut lobortis luctus leo, non porta nisi euismod ut. Nulla tristique scelerisque fringilla.' When truncated to 40 characters would be displayed as: 'Lorem ipsum dolor sit amet, consectetur adi' So it includes the links but only shows 40 characters of text to…
has comment: http://stackoverflow.com/comment/41246340
has comment: http://stackoverflow.com/comment/41240324
has answer: http://stackoverflow.com/a/26284412
tagged with: substring
has comment: http://stackoverflow.com/comment/41240436
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41250653
has comment: http://stackoverflow.com/comment/41240677
has title: Splitting a string with JavaScript but ignoring the HTML characters in it
has answer: http://stackoverflow.com/a/26284559

http://stackoverflow.com/q/26305251
has body: is this possible with AngularJS Resource? /api/client/:id/jobs (get all the jobs from this client) /api/client/:id/job/:jobId (get the job form this client) My Factory: .factory('Client', ['$resource', 'Api', function ($resource, Api) { var Client = $resource(Api.url() + 'client/:id/', { id: '@id' }, { 'update' : { method: 'PUT', isArray: false } } ); return Client; } ]); Thanks!
tagged with: database
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26390017
has answer: http://stackoverflow.com/a/26405811
tagged with: angularjs
type: Question
has title: AngularJS Resource with relation between tables
answer count: 1
score: 0
tagged with: angularjs-resource

http://stackoverflow.com/q/26259412
answer count: 2
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26259515
has comment: http://stackoverflow.com/comment/41194269
has title: Get all Elements touching a rectangle
score: 3
has answer: http://stackoverflow.com/a/26259894
has comment: http://stackoverflow.com/comment/131437932
upvote count: 3
has body: I need to get all elements whose bounding rectangle intersects some arbitrary rectangle of my choosing. I'm not aware of a way to do this natively, and my best solution so far is to call document.elementFromPoint on a representative sample of points inside the rectangle, which is far from perfect, as it could miss elements. Running it on every point in the rectangle would be a performance nightmare, and therefore is not an option. Even if that was feasible, I don't think it would catch elements with width: 0; height: 0, although that's not a huge concern for me. I have ideas on how to minimize false negatives using the many-points method, but is there a real solution?
type: Question
has comment: http://stackoverflow.com/comment/41194687
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41194131

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/26316858
tags question: http://stackoverflow.com/q/26222210
tags question: http://stackoverflow.com/q/26262372
tags question: http://stackoverflow.com/q/26262718
tags question: http://stackoverflow.com/q/26196928
tags question: http://stackoverflow.com/q/26300768
tags question: http://stackoverflow.com/q/26221438
tags question: http://stackoverflow.com/q/26341153
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/26278950
tags question: http://stackoverflow.com/q/26268382
tags question: http://stackoverflow.com/q/26334869

http://stackoverflow.com/comment/41352125
type: Comment
comment on: http://stackoverflow.com/a/26344911
has text: From your questions, it's not really clear what you're asking. You can access elements after rendering using a directive that checks when the `ng-repeat` is over, and then operates on elements. Start from here: http://plnkr.co/edit/AQcfmUphHqBZ2phyB3X9?p=preview
type: AnswerComment
score: 0

http://stackoverflow.com/a/26324127
has comment: http://stackoverflow.com/comment/41312895
upvote count: 2
type: Answer
has body: You wrote doccument instead of document in your $(doccument).ready.
answers question: http://stackoverflow.com/q/26324064
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41312910

http://stackoverflow.com/q/26240124
tagged with: firefox
answer count: 1
tagged with: url
downvote count: 0
favorite count: 0
has title: Revisited - Modify URL Before TOP LEVEL Page Loading in Firefox
linked to: http://stackoverflow.com/q/5205672
tagged with: windows
accepted answer: http://stackoverflow.com/a/26247052
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42156003
score: 1
upvote count: 1
type: Question
has body: I wanted to know how to modify the URL of a page when it loads, using a Firefox plugin. I was directed to advice such as the following. Specifically, when a user goes to "https://www.google.com" through the address bar, I wanted to redirect to "https://www.google.co.uk". For my specific purposes, the above solution almost works, but it redirects too many URLs. One problem that I have found with this is as follows: While I can redirect every time, I sometimes redirect when I don't want to. For instance, it seems that in Windows, I not only redirect when the current tab's URL is regular Google, but I also redirect whenever some query that a page makes contains the above link (e.g. a news article). Is there any way to use Mozilla's observer framework to redirect by checking the current tab's URL ONLY? If not, is there some alternate solution that still uses Mozilla's Add-on SDK? Edit: Below is my buggy source code. var myObserver = { register: function() { var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.addObserver(this, TOPIC_MODIFY_REQUEST, false); }, //observe function to capture the changed event observe : function(aSubject, aTopic, aData) { if (TOPIC_MODIFY_REQUEST == aTopic ) { var url; aSubject.QueryInterface(Components.interfaces.nsIHttpChannel); url = aSubject.URI.spec; url = encodeURIComponent(url); if (url.indexOf("google.nl") !=-1 || url.indexOf("hl%3Dnl") !=-1 || url.indexOf("google.com%2Fnl") !=-1 || url == "https%3A%2F%2Fwww.google.com" || url == "https%3A%2F%2Fwww.google.com%2Fncr" || url == "https%3A%2F%2Fwww.google.com%2F%3Fgws_rd%3Dssl") { aSubject.cancel(Components.results.NS_BINDING_ABORTED); loadURL("https://www.google.co.uk/"); } } } function loadURL(url) { // Set the browser window's location to the incoming URL window._content.document.location = url; // Make sure that we get the focus window.content.focus(); }
tagged with: javascript
has answer: http://stackoverflow.com/a/26247052
tagged with: firefox-addon

http://stackoverflow.com/comment/41096614
type: Comment
type: QuestionComment
has text: What have you tried with History api? https://developer.mozilla.org/en-US/docs/Web/API/Window.history
comment on: http://stackoverflow.com/q/26206630
score: 0

http://stackoverflow.com/a/26307211
has comment: http://stackoverflow.com/comment/41283397
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26263213
has comment: http://stackoverflow.com/comment/41286554
has comment: http://stackoverflow.com/comment/41283353
has body: App.Template needs to belong to a App.Portfolo: App.Portfolio = DS.Model.extend({ color: DS.attr('string'), template: DS.belongsTo('template') }); App.Template = DS.Model.extend({ title: DS.attr('string'), portfolio: DS.belongsTo('portfolio'), portfolios: DS.hasMany('template') }); See here for a fixed version of Cyril Fluck's jsbin

http://stackoverflow.com/comment/41241807
has text: Thanks Jordonias this makes sense and asks to authenticate before it routes you to "/dat". However, now when I authenticate and then go to '/dat' it tries to serve up a static html file instead of the file tree...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26284902
type: Comment

http://stackoverflow.com/q/26282695
favorite count: 0
has comment: http://stackoverflow.com/comment/41250336
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26333842
tagged with: checkbox
has body: I'm having an issue with a checkbox input in my Knockout code that updates the viewmodel correctly, but does not update until the div surrounding it disappears and re-appears. We're using Knockout 3.2.0, currently. Here's a subset of the relevant HTML: &lt;!-- ko foreach: objects --&gt; &lt;!-- ko if: isType(typeCodes.INPUT) --&gt; &lt;!-- ko if: selected --&gt; &lt;div data-bind="fadeVisible: $root.isState(uiState.IDLE)" id="typeInputContainer"&gt; &lt;!-- ko foreach: $root.types --&gt; &lt;div class="checkbox patientType"&gt; &lt;input type="checkbox" data-bind="attr: {id: 'checkPt' + $data.patientTypeValue() }, checked: $data.visible" /&gt; &lt;/div&gt; &lt;!-- /ko --&gt; &lt;/div&gt; &lt;!-- /ko --&gt; &lt;!-- /ko --&gt; &lt;!-- /ko --&gt; And here's a subset of the viewmodel: function PatientType(name, value, color) { var self = this; self.typeName = ko.observable(name); self.visible = ko.observable(true); //Disposal self.isDisposed = false; self.dispose = function() { self.color().dispose(); self.isDisposed = true; }; } Apologies for the drastic reduction, but the surrounding code in each case is highly verbose and not particularly related to the problem. When I step through the code at the highest level on the call stack, a JQuery function for event handling (below), clicking the checkbox will cause this to be called around five or six times, and at each point after the first, the checkbox has changed to correctly reflect the updated viewmodel. However, after that "thread" of execution has finished, the checkbox immediately reverts to its previous state. Only when the div is removed (by deselecting the object referenced at the top line of the HTML) and re-added (by re-selecting it) does the checkbox correctly reflect the viewmodel. Initially, I thought the UI change was halted by a number of subscriptions assigned to various changes caused by this update in the viewmodel, but I found that the problem persisted when these subscriptions were temporarily removed…
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41252622
has comment: http://stackoverflow.com/comment/41260523
tagged with: knockout.js
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41243899
answer count: 1
downvote count: 0
tagged with: jquery
has title: Knockout checkbox not updating visually

http://stackoverflow.com/comment/41320731
type: AnswerComment
type: Comment
has text: @Timothy Herry Susanto, you can do the validation in html, you don't need the validationForm function, did you got it ?
comment on: http://stackoverflow.com/a/26321889
score: 0

http://stackoverflow.com/q/26252050
tagged with: mixins
answer count: 1
tagged with: javascript
has title: Javascript OOP framework
has body: I am wondering if the following code I have put together is the best way to define wrapper function for creating classes in js. Does anyone have a better example willing to share as I thought of this as a first attempt. What am I missing if anything? j = { context : {} }; j.namepsace = (function(){ var createnamespace = function(parent, remainder){ if(remainder.length === 0){ return; } parent[remainder[0]] = parent[remainder[0]] || {}; return createnamespace(parent[remainder[0]], remainder.splice(1)); }; return { define : function(ns){ createnamespace(j.context, ns.split('.')); } } }()); j.class = (function(){ return { construct : function(namespace, name, ctor){ namespace[name] = ctor; }, ctor : function(namespace, name, ctor, prototype){ for (var property in prototype) { if (prototype.hasOwnProperty(property)) { ctor.prototype[property] = prototype[property]; } } namespace[name] = ctor; } } }()); j.mixin = (function(){ return { with : function(object, objectliteral){ for (var prototype in objectliteral) { if (objectliteral.hasOwnProperty(prototype)) { object[prototype] = objectliteral[prototype]; } } }, toDefintion : function(classdefinition, mixin){ var objectliteral = mixin(); for (var property in objectliteral) { if (objectliteral.hasOwnProperty(property)) { classdefinition.prototype[property] = objectliteral[property]; } } } }; }()); j.namepsace.define('application.section'); j.class.construct(j.context.application.section,'printNameMixin', function(){ return { printName : function(){ console.log(this.name); } }; }); j.class.construct(j.context.application.section,'person',function(name, address, age){ return { name : name, address : address, age : age }; }); j.class.ctor(j.context.application.section,'customer',function(name){ this.name = name; }, { name : 'unregistered client' }); j.mixin.toDefintion(j.context.application.section.customer, j.context.application.section.printNameMixin ); var person = j.context.application.section.person('Blair Davidson','23 T…
score: 0
tagged with: module
has comment: http://stackoverflow.com/comment/41181721
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27803493
tagged with: oop
has comment: http://stackoverflow.com/comment/41182993
type: Question
tagged with: frameworks

http://stackoverflow.com/comment/41188012
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26254910
score: 0
has text: does $id actually have a value? What happens if you just echo "DELETE FROM members WHERE id='".$id."'"? Also, add a die() function to check for errors: mysqli_query($con,"DELETE FROM members WHERE id='".$id."'") or die(mysqli_error($con)); AND remove the header() too, just in case you miss out on warnings or errors

http://stackoverflow.com/q/26310743
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41288795
score: 0
has comment: http://stackoverflow.com/comment/41289429
has answer: http://stackoverflow.com/a/26310761
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26310761
has comment: http://stackoverflow.com/comment/41289334
has comment: http://stackoverflow.com/comment/41288830
has comment: http://stackoverflow.com/comment/41289564
has comment: http://stackoverflow.com/comment/41288803
type: AnsweredQuestion
has title: Call function in variable object using onclick?
tagged with: onclick
has comment: http://stackoverflow.com/comment/41288801
has comment: http://stackoverflow.com/comment/41288744
has comment: http://stackoverflow.com/comment/41289587
has comment: http://stackoverflow.com/comment/41289224
type: Question
has body: Okay so here is my problem my javascript is so, var example = { meep: function() { alert("This alert or function does not happen using onclick D:"); } } Looks fine right? Okay so now when I do this, &lt;button onclick="example.meep()"&gt;&lt;/button&gt; It does not work and returns "Uncaught TypeError: undefined is not a function" I can also do the function "example.meep()" in console and it works. I've tried it with and without ending parentheses.
has comment: http://stackoverflow.com/comment/41288810

http://stackoverflow.com/a/26297520
has body: Ok, I found my problem was I was trying to call toDataURL() on my jQuery object rather than my canvas element. To fix this I used .get(0). Full code below: function generate(){ html2canvas($('#b2_1'), { onrendered: function(canvas) { canvas.setAttribute("id", "canvas"); document.body.appendChild(canvas); } });//this all works, the canvas appears as expected var myCanvas = $(document).find('#canvas'); myCanvas.css("margin-left", "50px"); var myImg = myCanvas.get(0).toDataURL();//have to get the canvas element from the jquery object }
accepted answer of: http://stackoverflow.com/q/26284123
downvote count: 0
score: 16
has comment: http://stackoverflow.com/comment/45974029
type: AcceptedAnswer
upvote count: 16
type: Answer
has comment: http://stackoverflow.com/comment/45980014
answers question: http://stackoverflow.com/q/26284123

http://stackoverflow.com/a/26337193
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: I found out that it happens due a conflict because more than one jQuery version is being loaded. Therefore I need to use jQuery.noConflict() to solve it: $('#andersonTest').click(function () { $2 = jQuery.noConflict( true ); console.log("modal button clicked"); $2('#AndersonModal').modal('show'); });
answers question: http://stackoverflow.com/q/26298624
accepted answer of: http://stackoverflow.com/q/26298624

http://stackoverflow.com/a/26328616
has body: You can filter the properties you'll need and ignore the others, then send the correct object to its destination, like this: Object.defineProperty(Object.prototype, 'filter', { value: function(keys) { var res = {}; for (i=0; i &lt; keys.length; i++) { if (this.hasOwnProperty(keys[i])) res[keys[i]] = this[keys[i]]; } return res; } }); var myObject = { key1: 1, // use now key2: 2, // use now key3: "some string", // use at destination key4: function(a) { // use now return a+1 }, key5: [1,2,3] // use at destination } var objectToSend = myObject.filter(['key3', 'key5']); // now objectToSend contains only key3 and key5 console.log(objectToSend); &gt; Object {key3: "some string", key5: [1, 2, 3]} So in your case you will do: var myObject = getOptions(), objectToSend = myObject.filter(['color', 'fn']), objectToUseNow = myObject.filter(['num', 'str', 'data']);
has comment: http://stackoverflow.com/comment/41321382
score: 0
has comment: http://stackoverflow.com/comment/41321441
answers question: http://stackoverflow.com/q/26328439
type: Answer

http://stackoverflow.com/a/26234163
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26233909
type: Answer
upvote count: 1
has body: I don't believe this is possible. If you need to make the price secure then you need to process it on the back end.

http://stackoverflow.com/q/26319745
favorite count: 0
upvote count: 2
tagged with: google-chrome
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26319757
has body: I'm trying to make an extremely simple chrome extension that alerts something when you click a button, but it's not working. I'm getting the following error: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Can anyone help? This is what I have right now: popup.html &lt;html&gt; &lt;body&gt; &lt;input type = "button" id = "the_button" value = "My button" onclick = "sayHi()"&gt;&lt;/input&gt; &lt;/body&gt; &lt;script&gt; src = "popup.js" &lt;/script&gt; &lt;/html&gt; popup.js function sayHi() { alert("hi") } manifest.json { "manifest_version": 2, "name": "Test", "description": "Test Extension", "version": "1.0", "icons": { "48": "icon.png" }, "permissions": [ "http://*/*", "https://*/*" ], "content_scripts": [{ "matches": ["http://*/*", "http://*/*"], "js": ["jquery.js", "popup.js"] }], "browser_action": { "default_title": "This is a test", "default_icon": "icon.png", "default_popup": "popup.html" } }
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26319771
possible better answer: http://stackoverflow.com/a/26319757
accepted answer: http://stackoverflow.com/a/26319771
tagged with: http://stackoverflow.com/tag/html
has title: What's wrong with this simple chrome extension?

http://stackoverflow.com/comment/41267537
type: AnswerComment
comment on: http://stackoverflow.com/a/26299360
has text: If i'm right buttons don't submit... Only inputs with a submit type
type: Comment
score: 0

http://stackoverflow.com/a/26276116
has comment: http://stackoverflow.com/comment/41225816
score: 0
type: Answer
has body: Very likely you have the wrong this. Since your function is not a part of a class this doesn't seem to make sense here. More about this: https://www.youtube.com/watch?v=tvocUcbCupA&amp;hd=1
answers question: http://stackoverflow.com/q/26274282

http://stackoverflow.com/comment/41268367
type: QuestionComment
score: 0
type: Comment
has text: Since Android 4.4 (with -webkit-prefix): https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API
comment on: http://stackoverflow.com/q/26299702

http://stackoverflow.com/comment/41163449
score: 1
has text: Just FYI `{}` is an empty *object*, not an empty array.
comment on: http://stackoverflow.com/q/26242362
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26515431
downvote count: 0
type: Answer
has body: No correct way for now. Chrome/V8 (as most other browsers) does not yet properly support subclassing of builtins -- in part because it potentially is quite complicated to implement, and in part because the precise semantics are still wildly in flux, and have just been overthrown at the latest ES6 meeting, with no final resolution yet (as of October 2014).
answers question: http://stackoverflow.com/q/26255775
score: 1
upvote count: 1

http://stackoverflow.com/comment/41487058
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26306414
has text: Is nesting the routes an option?
score: 0

http://stackoverflow.com/q/26284243
score: 0
accepted answer: http://stackoverflow.com/a/26284326
has comment: http://stackoverflow.com/comment/41246266
has title: Hide element with jQuery
has comment: http://stackoverflow.com/comment/41244954
linked to: http://stackoverflow.com/q/26286623
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41240128
has comment: http://stackoverflow.com/comment/41240150
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26284264
has answer: http://stackoverflow.com/a/26284326
favorite count: 0
has answer: http://stackoverflow.com/a/26284264
type: Question
has body: This is my HTML: Prev 0 Elgin Street 1 Elgin Street 2 Elgin Street 3 Elgin Street 4 Elgin Street 5 Elgin Street 6 Elgin Street 7 Elgin Street 8 Elgin Street 9 Elgin Street Next I have active and passive classes as you see. When I click next, I want to hide the active button which is the first one this case and then show the next one. How can I do that with jQuery? This is the code to get the current element: var current = $('.active', this); However, current.hide() does not work why?
upvote count: 2
downvote count: 2
answer count: 2

http://stackoverflow.com/q/26289649
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26289691
has body: I've spent hour working on this so I'm going to be frustrated when it turns out it's just a single quote in the wrong place or something. I'm making a basic HTML page to test a basic validate form input. If I drop the return false at the start of the validateForm() function, it works as expected. However, if it's within the validation loop (as below) it doesn't work and the form submits. (hello.php just outputs hello world). All of the diagnostic alerts that are in here run as expected... including the one right before the return-false. (when I leave an input blank). I feel like I'm missing something very obvious, but can't figure out what it is. <?php echo <<<END Test END; ?>
accepted answer: http://stackoverflow.com/a/26289778
type: AnsweredQuestion
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/26289778
score: 0
has answer: http://stackoverflow.com/a/26289691
answer count: 2
has title: Return false ignored by onsubmit
tagged with: javascript

http://stackoverflow.com/a/26324071
has body: While @Barmar solution will work, i think the best way its to just use promises.. and since you are using jQuery already this is pretty easy. See below: var SomeClass = function() { this.someMethod = function() { return $.ajax({ method: 'GET', url: 'http://example.com' }); }; }; And then you do something like this: var someVariable = new SomeClass(); someVariable.someMethod().then(function(returnedValue){ console.log(JSON.parse(returnedValue)); }); I believe that promises is the way to go and since they will be included in ES6... its better to familiarise yourself with the concept.
type: Answer
answers question: http://stackoverflow.com/q/26323886
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/26237730
has body: Generate the JS Page INSIDE A DIV in the Home page and work widh "visibility: collapse" to show or hide .if you use JQuery use ("#div").hide() and .show() That should be a lot easier and solve your problem
downvote count: 0
upvote count: 1
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26237583

http://stackoverflow.com/q/26348514
score: -5
has body: I am a beginner in javascript and i am building a json code for a website.The problem is that error messages are shown for style but i have used style in the code.Error message is:` 1:Bad template.json: Expecting property name: line 24 column 2 (char 530) 2:we encountered the following error at the top level of template.json (property style is missing.) The name is json file is template.json and i have used two images also.No variable is used but i have created a space for future use. { "id": "first-123", "name": "Get Paid", "mobile": true, "notes": "Initial import; first pass.", "syntax": 4, "version": 1.00, "style": { "replacements": [ { "type": "color", "name": "Background Color", "find": "#FFFFFE" } ] }, "elements": [ { "type": "image-link", "id": "img/34769901.jpg", "name": "Example 7 Image Link", "data": { "max-width": 1340 }, { "type": "image-link", "id": "img/34769901.jpg", "name": "Example 7 Image Link", "data": { "max-width": 1340 }, } ], "variables": {} }
has answer: http://stackoverflow.com/a/26348556
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26348538
has comment: http://stackoverflow.com/comment/41357939
downvote count: 5
tagged with: javascript
answer count: 2
upvote count: 0
has title: Error shown in json
favorite count: 0
has answer: http://stackoverflow.com/a/26348538
possible better answer: http://stackoverflow.com/a/26348556
type: AnsweredQuestion

http://stackoverflow.com/comment/41100872
type: AnswerComment
has text: Please don't post "try this" answers. They don't explain what the problem is or how "this" fixes it, so they don't help anyone in the future.
type: Comment
comment on: http://stackoverflow.com/a/26208738
score: 0

http://stackoverflow.com/q/26332838
tagged with: javascript
favorite count: 0
tagged with: three.js
possible better answer: http://stackoverflow.com/a/26337853
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26362556
tagged with: verold
type: Question
has body: I'm trying to use verold to animate 3d models in a script. However, I'm having trouble understanding the corret usage of the verold API components. I have a model loaded to my scene, and a script attached as an attribute of that model. I also have a keyframe animation attribute, which is set up to not auto play. My goal here is to be able to start a particular animation when the user clicks a button. I can see the model object when I use the following code PlayAnimation.prototype.init = function() { // this.veroldEntity is available here but the Three.JS data isn't loaded yet cObject = this.veroldEntity; }; But I'm unsure of how to use the playanimation(loop,startTime,save,fn) function. So my questions are: 1. Is this the correct way to start an animation in a script? 2. If so, could someone show me the proper way to use this, i.e what are the save and fn parameters? Thanks in advance...
has title: Add animation to verold model object
has answer: http://stackoverflow.com/a/26362556
has answer: http://stackoverflow.com/a/26337853
upvote count: 2
answer count: 2
downvote count: 0

position
tags question: http://stackoverflow.com/q/26315518
tags question: http://stackoverflow.com/q/26301703
type: Tag
tags question: http://stackoverflow.com/q/26222137
tags question: http://stackoverflow.com/q/26348111
tag name: position

http://stackoverflow.com/a/26290252
downvote count: 0
answers question: http://stackoverflow.com/q/26290203
type: Answer
upvote count: 1
has body: If you'd like to "click" the next button, then you can do that programatically with JS. var nextbutton = document.getElementsByClassName('next'); nextbutton.click(); Getting element by class like that only works on post-IE8 browsers.
has comment: http://stackoverflow.com/comment/41251945
score: 1
has comment: http://stackoverflow.com/comment/41252041

http://stackoverflow.com/a/26247423
score: 0
has body: almost there: color: transparent;
answers question: http://stackoverflow.com/q/26246930
has comment: http://stackoverflow.com/comment/41175637
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41173224

http://stackoverflow.com/comment/41156859
has text: Ah, but then its not javascript at all, the <?php SOME CODE HERE ?> means that its serverside code, once your webpage is rendered on your server and sent to your clients browser the code inside the <? ?> have already been executed. But i am happy to hear that you solved it.
type: Comment
comment on: http://stackoverflow.com/a/26236017
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41287280
type: Comment
comment on: http://stackoverflow.com/q/26308630
has text: @Barmar correct, however I would consider an OOP style in JS implying mutation of the object the methods are attached to, whereas a function calling style can modify the passed in object or return a new data structure.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/111794691
comment on: http://stackoverflow.com/a/57360319
type: AnswerComment
has text: It works for PrintScreen, but when the user press Win+PrintScreen (for directly writting the image to a file in C:\Users\user\Pictures\Screenshots) it doesnt work anymore.
type: Comment
score: 3

http://stackoverflow.com/q/26341071
score: 1
has body: I have an issue that I need to resolve, and am new to AngularJS. I've spent the night looking over videos, the official docs, and Googling as much as I can, to no avail. Essentially what I have is some nested data in my controller, something like: function SomeController($scope) { $scope.someArray = [ { type: 'Dog', name: 'Sarah', children: [ { type: 'Dog', name: 'Henry', children: [ { type: 'Dog', name: 'Bob', children: [] } . . . ] } . . . ] } . . . ]; } Hypothetically, these could be nested infinitely deep. In reality, they rarely if ever go further than 2-3 levels deep. All the same, I'd like to write my code to handle this scenario, however rare it may be. The way that this should work for the example above is: three select boxes, with the first option in each select box being something to the effect of "Select Something". Only the first select box should be enabled initially. Once something has been selected (in this example, our only choice is Sarah), then the second select box should be filled with Sarah's children and should be enabled. You can probably see how this proceeds. Just to recap: Select boxes at the root level should be pre-filled and enabled Select boxes under the root level should be filled and enabled only once a selection has been made in its "parent" select box This could hypothetically be infinitely deep I have more or less accepted defeat at this point, after spending hours tinkering with it, I just cannot wrap my head around how to do this in AngularJS. All I have been able to get going was the root level. All of the other behavior is just a complete mystery to me. Do I need to use jQuery or something similar to fill the boxes? How do I access the array in my method to fill? Does AngularJS provide a good set of features that would ease my pain in any capacity? I'd really appreciate some ideas and/or a point in the right direction. EDIT: To make this even more complex (to me, anyway) is that the "type" is significant. In other words, if th…
type: Question
has title: Complex nested array to select boxes with AngularJS
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: angularjs
tagged with: dom-manipulation
answer count: 0
linked to: http://stackoverflow.com/q/25413071
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41344320
has comment: http://stackoverflow.com/comment/41344551
has comment: http://stackoverflow.com/comment/41345508

http://stackoverflow.com/q/26288187
accepted answer: http://stackoverflow.com/a/26320400
type: Question
tagged with: javascript
score: 0
has title: Downloading zip file using JS window.open _self without "useless window"
answer count: 1
has body: Following information from this page where the issue of the "useless empty window" is discussed, I'm trying to create a script that starts the download of a zip file: The above starts the download correctly but the page is then completely blank, no content visible. I can see the entire source is loaded but not displayed. How can I use js to start the download asynchronously while loading page content, without a "useless window"?
tagged with: download
has comment: http://stackoverflow.com/comment/41304552
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26320400

http://stackoverflow.com/comment/41192277
type: Comment
type: QuestionComment
has text: Are you submitting to an iframe?
comment on: http://stackoverflow.com/q/26258266
score: 0

http://stackoverflow.com/q/26246862
has title: Target div in parent of parent of parent
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to target an image in the parent of the parent of the parent of my button. Tried : $(event.target).parents().eq(2).$("img").css( "opacity", .3 ); $(event.target).parent().parent().parent().$("img").css( "opacity", .3 ); $(event.target).parent().parent().parent("img").css( "opacity", .3 ); Edit: just realized it's the parent of the parent but, even modified accordingly, the code below still doesn't function. here is the HTML: Read more js: $( "button.page3" ).click(function(event) { $(event.target).parents().eq(1).$("img").css( "opacity", .3 ); //doesnt work $(event.target).closest("img").css( "opacity", .3 ); //neither }
answer count: 1
has comment: http://stackoverflow.com/comment/41172010
score: -3
has answer: http://stackoverflow.com/a/26246963
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/41172029
type: Question
upvote count: 0
accepted answer: http://stackoverflow.com/a/26246963
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26337473
accepted answer: http://stackoverflow.com/a/26337601
has comment: http://stackoverflow.com/comment/41338069
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26337548
has body: I'm trying to toggle some css whilst I hover over a div. Normally I would use 'toggleclass' but the new background color doesn't seem to overwrite the existing class so I resorted to the method below. The issue is how to toggle the css off after the hover. $('#menu_first_home').hover(function(){ $(this).css({ 'border': '10px solid rgba(186, 0, 0, 0.2)' }); $('.search-box').css({ 'background-color': 'rgba(186, 0, 0, 0.5)', 'color': 'rgba(186, 0, 0, 0.5)' }); });
has comment: http://stackoverflow.com/comment/41337811
has answer: http://stackoverflow.com/a/26337881
has comment: http://stackoverflow.com/comment/41338573
type: Question
has title: toggle css without using toggleclass
possible better answer: http://stackoverflow.com/a/26337548
has answer: http://stackoverflow.com/a/26337601
tagged with: javascript
has comment: http://stackoverflow.com/comment/41338096
has comment: http://stackoverflow.com/comment/41337732
score: 0
answer count: 3
tagged with: jquery

http://stackoverflow.com/a/26264621
has body: Well, first off, until ES6 becomes widely supported, you won't able to use arrays as object keys, so you would have to then include some other level of indirection to store things properly, perhaps something like: { 'animal~barks': 'dog', 'animal~purrs': 'cat', ... } That really makes coding with this harder. You also would increase your memory consumption, presumably with large collections by repeating, e.g., 'animal'. So I think there are several strikes against this.
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26264159
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41204983
answers question: http://stackoverflow.com/q/26264159

http://stackoverflow.com/a/26316715
answers question: http://stackoverflow.com/q/26316536
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Just for the record: your code can be reduced to (function() { document.querySelector("#loop").innerHTML = ["Bob ", "Alice ", "Ceaser ", "David"].sort().join(" "); }()) &lt;p id="loop"&gt;&lt;/p&gt;

http://stackoverflow.com/q/26195256
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41094525
tagged with: canvas
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/41075794
has comment: http://stackoverflow.com/comment/41075910
upvote count: 1
has title: nodeJS draw image into a canvas (not working)
has comment: http://stackoverflow.com/comment/41076198
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I try to make a game with nodeJS in Back-end and AngularJS in Front-End but i have some problems. I use express to configure routes in NodeJS and ngRoute in AngularJS. Each page have a view and a controller. I have a page who just has a "canvas" into its view and a controller to manage the canvas (this code is an example, it's not my final code) : gameView.html : &lt;canvas id="gameCanvas" width="500" height="500"&gt;&lt;/canvas&gt; gameCtrl.js : app.controller('gameCtrl', function($scope) { var canvas = document.getElementById("gameCanvas"); var ctx = canvas.getContext("2d"); var img = new Image(); img.onload = function() { ctx.drawImage(img, 10, 10); } img.src = 'image.png'; }); The problem is that in Google Chrome and only with NodeJS (i already tried with Apache), after X refresh, the drawImage doesn't work. I already have disabled the GPU acceleration of Chrome or used the "document.createElement("img")". But nothing work. In NodeJS, i have defined a public folder like that : app.use(express.static(__dirname + '/public')); And the image, html and js files are in the public folder. So, i don't know why it doesn't work. If you have any idea thanks to give me a feedback. (I am sorry for my english, i am french) EDIT : I have created a workspace at Cloud9 website. To test : https://testcanvas-c9-lludol.c9.io/ To see the code : https://ide.c9.io/lludol/testcanvas Like you can see, it works ! I even have tried to reproduce the route system in this workspace. So, do you think it's my server who have a problem ? Or do you think there is a problem my nodeJS configuration ? I found a solution : Instead of creating an image with "new Image()", i can store the base64 encoded of the image and display it directly with "drawImage".
tagged with: node.js
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/41112849
comment on: http://stackoverflow.com/a/26215583
type: AnswerComment
score: 0
type: Comment
has text: sorry but does not work the dynamically added image does not execute

http://stackoverflow.com/a/26287930
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26287849
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41247687
has body: Your selector is wrong. You try to select a html element called adviceBodyNavbarHeader. What you want to do is this: $('#adviceBodyNavbarHeader').text(sessionStorage.getItem("catTitle")); Hope it helps. Edited my post due to late brain inactivity.
accepted answer of: http://stackoverflow.com/q/26287849
type: AcceptedAnswer

http://stackoverflow.com/comment/41337787
has text: In which browser you are trying to do this?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26337344

http://stackoverflow.com/a/26348804
accepted answer of: http://stackoverflow.com/q/26259646
answers question: http://stackoverflow.com/q/26259646
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41358485
has body: Fixed by adding parseInt() when using the values that was gathered from $location, i.e: $scope[param] = isset(urlParams[param]) ? parseInt(urlParams[param]) : 0;
type: Answer

http://stackoverflow.com/q/26275033
score: 0
answer count: 1
tagged with: include
has title: import CSS and JS from the same GAS project into Spreadsheet HtmlOutput
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26276036
type: Question
has body: I'm following this tutorial, I'm trying to import into a GAS Html file a CSS and a JS file, both within the same project. The tutorial works fine as a web app, what I want to do now is to show an HtmlOutput on the associated spreadsheet, with the same content. I tried to create the HtmlOutput on the Spreadsheet as follows: function test(request){ var html = HtmlService.createHtmlOutputFromFile('Page'); ss.show(html); } and I'm getting this result (as you can see the getContent and the include are not working as expected): These are the html, css and gs documents: Code.gs //--- this function is called onclick on a Spreadsheet custom menu function test(request){ var html = HtmlService.createHtmlOutputFromFile('Page'); ss.show(html); } function include(filename){ return HtmlService.createHtmlOutputFromFile(filename).getContent(); } Page.html <?!= getContent("Stylesheet.html"); ?> Welcome test <?! include('Javascript'); ?> Stylesheet.html Javascript.html Am I missing something? Thanks in advance, best regards
tagged with: google-sheets
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26276036
tagged with: google-apps-script

http://stackoverflow.com/comment/41102995
comment on: http://stackoverflow.com/q/26209956
type: Comment
type: QuestionComment
score: 0
has text: 9999999999 gives me 9999 in $_POST=)

http://stackoverflow.com/a/26204439
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26204406
has comment: http://stackoverflow.com/comment/41092164
answers question: http://stackoverflow.com/q/26204406
has comment: http://stackoverflow.com/comment/41096542
has comment: http://stackoverflow.com/comment/41092528
has comment: http://stackoverflow.com/comment/41092132
has body: The problem is that the element is added later and doesn't exist when the dom is loaded. Therefore the click event has to be delegated from an already existing element, e.g. like this: $(document).on("click", "#remove", function(){ alert($(this).index() ); }); Instead of $(document) every other static parent element can be used for event delegation, just as example. Update for the comments: as mentioned, $(document) only as example. I'd also prefer to use $("#form1") here like mithunsatheesh suggested. And for reference: https://api.jquery.com/on/#on-events-selector-data-handler, section "Direct and delegated events": "Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the call to .on()." Update for the correct index: you'll get the correct index using e.g. $("#form1").on("click", ".remove", function(){ alert($(".remove").index($(this))); }); with the adjustment to use remove as class instead of id for the remove-button. IDs have to be unique, so classes are a better solution. index() starts counting with 0, so you'll get 0 for the first one. As working example: Fiddle
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41092085
score: 6
type: Answer
has comment: http://stackoverflow.com/comment/41092073

http://stackoverflow.com/comment/41309370
has text: @user26409021 Added a fiddle. I think sliding on click works through Shopify liquid code, so I couldn't add that to the fiddle. But I think it shows how the menu looks when the submenu is displayed, and that's what I'd like to change. So maybe it's still helpful...?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26320382

http://stackoverflow.com/comment/41347308
score: 0
type: Comment
has text: @LcLk: that's an interesting way to look at the problem;
type: QuestionComment
comment on: http://stackoverflow.com/q/26342512

http://stackoverflow.com/comment/41331127
type: AnswerComment
type: Comment
has text: You should probably escape the inner double quotes.
comment on: http://stackoverflow.com/a/26333371
score: 0

http://stackoverflow.com/comment/41247112
comment on: http://stackoverflow.com/q/26287197
type: Comment
type: QuestionComment
score: 0
has text: You should never, EVER, set `async` to false. Ever. It will block any interaction with your page until the resource returns whether that takes 5 ms or 5 min.

http://stackoverflow.com/a/26248875
has comment: http://stackoverflow.com/comment/41176895
answers question: http://stackoverflow.com/q/26248688
has comment: http://stackoverflow.com/comment/41176765
accepted answer of: http://stackoverflow.com/q/26248688
has comment: http://stackoverflow.com/comment/41177180
has comment: http://stackoverflow.com/comment/41176649
has comment: http://stackoverflow.com/comment/41176832
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41176783
has comment: http://stackoverflow.com/comment/41176802
has comment: http://stackoverflow.com/comment/41176621
score: 0
has comment: http://stackoverflow.com/comment/41176153
type: Answer
has body: It's probably not working for you because in your click function, you just change the visibility of the adjoining second column that contains the URL. You however first need to hide the URL that was last visible. One work around could be: $(function() { //Hide the second column as soon as the document loads //Although you shouldn't require this since your css already does it $( "td.iframe-link" ).css('visibility', 'hidden'); //The click functions that toggles the visibility of the adjacent element $('.img-parent').click(function(){ //Assuming the class for the adjoining td i.e the second column is iframe-link //Hide all such elements first $( "td.iframe-link" ).css('visibility', 'hidden'); //Display the relevant element $(this).next('td').css('visibility', 'visible'); }); }); Hope this gets you started in the right direction.
has comment: http://stackoverflow.com/comment/41176684

http://stackoverflow.com/comment/41324052
type: Comment
score: 1
has text: On the moment of call `$(".logo")` you div with `.logo` does not exit. That is why you have to run this code when DOM is loaded or below the part of the page with needed div. `tried it. Did not work` show it.
comment on: http://stackoverflow.com/q/26330035
type: QuestionComment

http://stackoverflow.com/q/26271308
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41216992
has comment: http://stackoverflow.com/comment/41216598
has title: How to use same tokeninput for multiple fields
tagged with: jquery-tokeninput
has comment: http://stackoverflow.com/comment/41217537
type: Question
has body: I have a table in which a column(say names) consists of text field. I need same tokeninput for all the rows. I need the above token input for multiple fields . EX : say i have a table with a filed called Names. So i need for all the Name filed in each i want to use Same token input Below is the Html I am able to use for one text field, but i need it same for all the rows Demo link: http://codepen.io/jakestuts/full/IBmja
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26330097

http://stackoverflow.com/comment/41119048
comment on: http://stackoverflow.com/a/26197360
has text: Ok, I too am confused about the "1 <= 1 and 1 <= 2 result in different answers" part. It should not matter. From a different angle, grasping at straws here, can you try not nesting the second onsuccess function (defining as nested)? Can you try using bind instead? Or using 'this' instead of event.target? Maybe it is a basic JS issue with nested funcs?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26327010
has comment: http://stackoverflow.com/comment/41318274
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/26268272
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has title: How to make divs near eachother to have the same height with twitter bootstrap
has answer: http://stackoverflow.com/a/26327068
has comment: http://stackoverflow.com/comment/41318228
has body: I have a page with a variable numbers of child divs, that depending on screen resolution they come 4 in a row (desktop), 3 in a row (tablet) or 2 in a row (on smartphones). But their content differ. How could I make divs that are in a line, have the same height? I have an example here asdfas asdfas asdfas asdfas asdfas asdfas asdfas asdfas asdfas asdfas
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41318148
has answer: http://stackoverflow.com/a/26327054
has comment: http://stackoverflow.com/comment/41318372
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26327212
favorite count: 0

http://stackoverflow.com/a/26302311
type: Answer
has body: In addition, You write in C#, so if you generate simple ASP.NET page and see how a dynamic page is being generated. It's not JSP/Java but It have the same concept of dynamic pages.
answers question: http://stackoverflow.com/q/26302134
score: 0

http://stackoverflow.com/q/26268775
type: AnsweredQuestion
type: Question
has title: High Chart line single data set but multiple color, not gradient color
tagged with: highcharts
tagged with: javascript
score: 0
tagged with: colors
answer count: 1
accepted answer: http://stackoverflow.com/a/26277018
has answer: http://stackoverflow.com/a/26277018
has body: Using latest High Chart, I want to have a single line with red color when the line is below some y-value and green otherwise (See picture http://oi60.tinypic.com/1t0ftu.jpg). Currently this is achieved by concatenating green and red lines (ie. 2 data sets) like this: series: [{ color: 'red', data: [{x:1,y:3} , {x:2, y:2}] }, { color: 'green', data: [{x:2, y:2}, {x:3, y:1}] }] However, this introduces issues and I have to use 1 data set (ie. single series). Can someone show me how to achieve this? Thank you.

http://stackoverflow.com/comment/41248813
comment on: http://stackoverflow.com/q/26288261
has text: what you are saying makes no sense "i dont want them next to each other but between each other". please try to explain
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26335026
tagged with: meteor
has comment: http://stackoverflow.com/comment/41333753
has comment: http://stackoverflow.com/comment/41333518
has answer: http://stackoverflow.com/a/26335317
tagged with: rss
has comment: http://stackoverflow.com/comment/41334429
type: UnansweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26335514
score: 0
answer count: 2
has body: Sorry for my english. I'm beginner JS developer. I need help with Meteor. I try to write rss aggregator. Can you tell me why this code not work correctly for me? rssContent is always undefined. But if I try console.log(result.content) inside HTTP.call I see the rss data. I need to pass rssContent in another function in this file to parsing XML, but I have trouble with HTTP.call server.js code: var rssSources = ['http://news.yandex.ru/auto.rss'], parsedRss = []; var rssContent; for (var i = 0; i &lt; rssSources.length; i++) { HTTP.call('GET', rssSources[i], function(error, result) { try { rssContent = result.content; } catch (e) { console.log(e); } } ); } console.log(rssContent);
has title: Meteor HTTP.call on server side correct using?

http://stackoverflow.com/q/26212235
has comment: http://stackoverflow.com/comment/41108622
tagged with: google-maps
downvote count: 0
tagged with: javascript
has title: Angular JS (bootstrap UI), google maps not showing corectly
has body: I am trying to add google map in twitter modal, only first time map are loaded, from second time map are not loaded into modal. This is my directive. appDirectives.directive('mapDirection', function () { return { restrict: 'A', template: '&lt;div id="gdirection"&gt;&lt;/div&gt;', replace: true, link: function postLink(scope, element, attrs) { var map, directionsService, directionsDisplay; var initMap = function () { directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer({ draggable: false, suppressMarkers: true }); var mapOptions = { center: new google.maps.LatLng(51.511966, -0.119563), zoom: 11, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(element[0], mapOptions); directionsDisplay.setMap(map); }; initMap(); } }; }); Resolved by adding this piece of code google.maps.event.addListenerOnce(map, 'idle', function(){ google.maps.event.trigger(map, 'resize'); map.setCenter(51.511966, -0.119563); });
favorite count: 0
tagged with: angularjs
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/q/26321442
tagged with: internet-explorer-8
tagged with: javascript
has body: I need the trim() function in IE8 but it's only available in IE9. How do I add it myself to IE8? I've heard of shimming or something similar but how does it work? I'm currently writing this code: var trim = String.trim || function (str) { return x.replace(/^\s+|\s+$/gm,''); } But then I need to replace all str_variable.trim() with trim(str_variable). How else can I write trim function and add it to String?
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41308092
tagged with: trim
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41308104
has answer: http://stackoverflow.com/a/26321487
has title: How to add missing JavaScript functions to all Strings in IE8?
linked to: http://stackoverflow.com/q/8392035
type: Question

http://stackoverflow.com/comment/50965449
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/31492263
has text: I'm sorry to, I only noticed that I wrote amd instead of and >_<.
score: 0

http://stackoverflow.com/comment/41096688
comment on: http://stackoverflow.com/a/26206189
score: 0
type: AnswerComment
has text: Thanks so much! This was so helpful to me.
type: Comment

http://stackoverflow.com/q/26248474
has answer: http://stackoverflow.com/a/26248528
tagged with: javascript
has title: LearnYouNode: Callback Keeps Returning True for Err
has answer: http://stackoverflow.com/a/26248526
score: 0
answer count: 2
tagged with: http-get
possible better answer: http://stackoverflow.com/a/26248528
accepted answer: http://stackoverflow.com/a/26248526
tagged with: node.js
type: AnsweredQuestion
has body: This is for the Node.js course on LearnYouNode. This challenge was: Juggling Async Here is my code: var http = require('http') var concat = require('concat-stream') var urlHolder = []; /* function printResults() { for(var i = 0; i &lt; 3; i++) console.log(urlHolder[i]); return; }*/ function getURL(index) { http.get(process.argv[2], function(err, response) { if(err) return console.error(err); /* response.pipe(concat(function (err, data) { if(err) return console.error(index); urlHolder.push(data.toString()); if(index === 4) { printResults(); } }))*/ }) } getURL(9) //The 9 I'm putting as the parameter is random. It is just to pass to the function /* for(var index = 2; index &lt; 5; index++){ getURL(index); }*/ And here is what I'm inputting into the command line: node juggleAsync.js http://www.google.com I've commented large chunks of the code in an attempt to debug why it was returning err as true. At first, I thought it had something to do with my loop of calling getURL on the arguments I'm giving at the command line. Even after commenting them out, I am still receiving err as true. I've also tried passing in different sites as an argument - nada. Hopefully someone can help me debug the distilled version of this code. Any help would be appreciated. Thanks! Also, for i've included the error below. it is EXTREMELY long and I have no idea what to include and not include. All i understand is, this is what it spit out. It exceeds the character limit, so i emitted half the body. node juggleAsync.js http://www.google.com { _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: responseOnEnd] },…
type: Question

http://stackoverflow.com/a/26474291
answers question: http://stackoverflow.com/q/26208427
score: 4
has comment: http://stackoverflow.com/comment/44771380
type: Answer
upvote count: 4
downvote count: 0
has body: It seems that I had very similar problem (and googled your question trying to find solution). I had not seen error provided by you, anyway post here my implemetation, maybe it helps you. First of all you need to load both js script with treceur runtime. Like this: Note that you must specify that your scripts is module-s in type attribute. Than you have to load init module: That implemetation works well for mine. I use 0.2.9 version of grunt-traceur and 0.0.72 version of treceur runtime. Hope this helps you.

http://stackoverflow.com/q/26240689
has comment: http://stackoverflow.com/comment/41160263
score: 0
type: Question
tagged with: javascript
tagged with: controller
has title: How to divide 1 angular controller to some files?
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has body: I'd started to create small app and now it becomes more huge and huge each new day. I need to divide 1 controller to some files? I have this now: angular.module('myApp.controllers', []) .controller('Ctrl1', ['$scope', '$http', function($scope, $http) { // some logic $scope.fooBar1 = function() {}; // some more foo's $scope.fooBarN = function() {}; $scope.booBar1 = function() {}; $scope.booBar2 = function() {}; // ...... $scope.booBarN = function() {}; $scope.mooBar1 = function() {}; /* etc */ }]) Also, I have html file, where I use this controller Ctrl1. So, I have 1 controller, 1 html and some "parts" in it. Each part contain some logic and some foo's. Now, I think, it is better to put boo part to boo.js, foo part to foo.js, moo to moo.js etc. I need: 1 controller divided on some files (with same $scope) to divide hard logic, 1 html file, where I will use scope from all of these files. Also, I found this: How to create separate AngularJS controller files?. In answer to this question some says how to separate some controllers to some files, I don't need this, so I need another solution.
linked to: http://stackoverflow.com/q/20087627
has answer: http://stackoverflow.com/a/26241328

http://stackoverflow.com/a/26269543
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: A Quick solution! you can include all your script inside your module XML files as normal script. for this method you can use the description tag of XML file like this &lt;description&gt; &lt;![CDATA[ &lt;script type="text/javascript"&gt; //Your javascript code(s) &lt;/script&gt; ]]&gt; &lt;/description&gt; This method work fine for Joomla version but its not a professional method. If you prefer more standard way you have to use param from php file or here Hope its helps..
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26262926
accepted answer of: http://stackoverflow.com/q/26262926

http://stackoverflow.com/q/26257318
type: Question
has answer: http://stackoverflow.com/a/26257929
answer count: 2
has comment: http://stackoverflow.com/comment/41190134
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41190506
has body: I'm doing a schoolproject, trying to do an list of things you need to buy. The problem is, i can't write more than one time and add to the list, and i can't figure out why. (It's nowhere near done.) (i have to diffrent javascript files) Inköpslista Inköp function laggtill(cool, namnVara) { var vara = document.createElement("li"); vara.innerText = namnVara; cool.appendChild(vara); } var button = document.getElementById("knapp"); button.onclick = function() { var skriva = document.getElementById("skriva") var namnVara = skriva.value; if(!namnVara|| namnVara =="" || namnVara == " " ){ return false; } laggtill(document.getElementById("listaavvara"), namnVara); }; javascrpit 2: function klickaKnapp(x){ var skrivrutan = document.getElementById(x), maxH="100px"; if(skrivrutan.style.height == maxH){ skrivrutan.style.height = "0px"; } else { skrivrutan.style.height = maxH; } } HOPEFULLY YOU KNOW WHAT I MEAN! (my pictures are not here)
favorite count: 0
type: UnansweredQuestion
tagged with: input
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26257491
has title: Javascript/html, can't write twice in a input

http://stackoverflow.com/a/26221658
answers question: http://stackoverflow.com/q/26221607
type: Answer
score: 3
downvote count: 0
has body: do like console.log(item.$["cdr-id"]);
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26221607
has comment: http://stackoverflow.com/comment/41125642

http://stackoverflow.com/a/26217022
type: Answer
has comment: http://stackoverflow.com/comment/41115978
accepted answer of: http://stackoverflow.com/q/26216976
upvote count: 3
has comment: http://stackoverflow.com/comment/41116305
score: 3
has comment: http://stackoverflow.com/comment/41115880
has body: Change the buttons to (removing the inline event handler): ELEMENT 2 And the jQuery to: $('div.button').click(function(){ $(this).addClass("buttonactive"); }) jsFiddle example
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41115705
has comment: http://stackoverflow.com/comment/41115979
answers question: http://stackoverflow.com/q/26216976

http://stackoverflow.com/comment/41273397
comment on: http://stackoverflow.com/q/26302164
type: Comment
has text: Are you doing a `for..in` over an array? You shouldn't do that (at least not without a `.hasOwnProperty()` call).
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41343188
type: AnswerComment
has text: I expect the error because like you said the error is the **first argument** so it should return "null" and the **second argument** should return the results of the query if the function was successful. This is not what happens though, no matter what I name the first argument it will return the result of my query.
type: Comment
comment on: http://stackoverflow.com/a/26279652
score: 0

http://stackoverflow.com/q/26208992
tagged with: http://stackoverflow.com/tag/html
has body: I want to make the input field read only on the base of other input field value, for example, &lt;form action=""&gt; &lt;input type="radio" name="sex" value="male"&gt;Male&lt;br&gt; &lt;input type="radio" name="sex" value="female"&gt;Female &lt;br/&gt; Age: &lt;input type="text" name="age"&gt;&lt;br&gt; &lt;/form&gt; If someone choose Female, then the age input should become read only, means that it should be fade out then no value can be entered. Is this possible, and how?
tagged with: php
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41100982
possible better answer: http://stackoverflow.com/a/26209080
linked to: http://stackoverflow.com/q/11369942
type: Question
has title: Making input field read only on the value of other input fields
has comment: http://stackoverflow.com/comment/41100946
has comment: http://stackoverflow.com/comment/41100988
has comment: http://stackoverflow.com/comment/41100991
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26209345
answer count: 3
has answer: http://stackoverflow.com/a/26209080
downvote count: 0
has answer: http://stackoverflow.com/a/26209233
accepted answer: http://stackoverflow.com/a/26209233
favorite count: 0
upvote count: 2

http://stackoverflow.com/comment/41214616
score: 0
type: Comment
has text: You mean `In javascript`, not `In jquery` don't you?
type: AnswerComment
comment on: http://stackoverflow.com/a/26270183

http://stackoverflow.com/a/26317146
has comment: http://stackoverflow.com/comment/41351717
answers question: http://stackoverflow.com/q/26301681
has comment: http://stackoverflow.com/comment/41420417
upvote count: 13
has comment: http://stackoverflow.com/comment/41400525
has comment: http://stackoverflow.com/comment/44669926
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44662647
has body: Like Leopard's Scripting Bridge before it, JXA intentionally breaks all sorts of stuff that works perfectly in AppleScript. Here is the translation of your original AppleScript command to JXA syntax: //tell application "System Events" to name of items in folder "/usr" Application('System Events').folders.byName('/usr').items.name() The AS version works perfectly, but the JXA equivalent just throws a completely meaningless Error -1700: Can't convert types. JXA does seem to work if you write diskItems instead of items: Application('System Events').folders.byName('/usr').diskItems.name() // --&gt; ["bin", "lib", "libexec", "local", "sbin", "share", "standalone", "X11", "X11R6"] which suggests JXA indulges in much the same internal "cleverness" that causes SB to break on so many apps. (Note that I found numerous such design defects in earlier testing, but gave up reporting them once it was clear the AS devs only cared about imposing their own personal ideology and prejudices on everyone else, crippled capabilities and broken compatibility be damned.) For comparison, here's the JavaScriptOSA (JOSA) prototype I quickly put together for the JXA developers' reference some months back (they promptly ignored it, natch): app('System Events').folders.named('/usr').items.name() // -&gt; ["bin", "lib", "libexec", "local", "sbin", "share", "standalone", "X11", "X11R6"] (While not fully finished or tested, JOSA still works a damn sight better than JXA, is better documented, and even includes an auto-translation tool for converting AS commands to JS syntax. Unfortunately, because Apple have legacied or deprecated the AEM, CM, PM, and OSA Carbon APIs, I cannot recommend it for production use; it's purely there for comparison purposes.) Similarly: set myPath to POSIX file "/usr" tell application "System Events" to name of every disk item of folder named myPath --&gt; {"bin", "lib", "libexec", "local", "sbin", "share", "standalone", "X11", "X11R6"} myPath = Path('/usr') Application('Sy…
type: Answer
score: 13
has comment: http://stackoverflow.com/comment/41426433
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26301681
has comment: http://stackoverflow.com/comment/114274067

http://stackoverflow.com/q/26345030
tagged with: jquery
has body: I know you can check for useragents with javascript, but can you also check to see if plugins have been blocked from operating on your page? The page in question loads the Sibelius Scorch Plugin, and it loads properly for Firefox, Safari, and IE... but Chrome automatically blocks the plugin, and continues to do so until you have selected "Continue to Block" or "Allow this Plugin" Since some of the users of this site don't read at all, I would like to add a styled status message that alerts the user "HEY, can't see the plugin working? Click ALLOW in the upper right hand corner of your Chrome browser". Like I said, this error only occurs in Chrome, other browsers automatically allow the plugin to execute. Thank you very much in advance.
has title: Plugin Permission Javascript check
score: 0
tagged with: user-agent
tagged with: plugins
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/41351818
has comment: http://stackoverflow.com/comment/41353077
tagged with: javascript

http://stackoverflow.com/a/26223791
type: Answer
has comment: http://stackoverflow.com/comment/41141085
has comment: http://stackoverflow.com/comment/41130611
upvote count: 3
has comment: http://stackoverflow.com/comment/41129652
answers question: http://stackoverflow.com/q/26223339
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41130543
has body: Solution #1 is basically equivalent to #2, except it's shorter code and you don't have to worry about the backpressure details. If your server is blocking other clients while writing the data, there's something wrong elsewhere.

http://stackoverflow.com/a/26299534
has body: I think you would need to have a look at the same origin policy.Javascript only calls a window or an iframe only if the policy is accepted. You may need to use Postmessage API instead. Please have a look here.
has comment: http://stackoverflow.com/comment/41272949
score: 0
answers question: http://stackoverflow.com/q/26299439
type: Answer

http://stackoverflow.com/comment/41157084
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26239048
has text: Do you need to handle the `submit` event, or can you handle the `click` event for the buttons in which case `this` would refer to the clicked button?

http://stackoverflow.com/q/26326777
has comment: http://stackoverflow.com/comment/41317707
has comment: http://stackoverflow.com/comment/41317797
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/41317877
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41317906
has comment: http://stackoverflow.com/comment/41317887
accepted answer: http://stackoverflow.com/a/26326962
has comment: http://stackoverflow.com/comment/41317795
tagged with: javascript
linked to: http://stackoverflow.com/q/4935632
tagged with: jquery
has comment: http://stackoverflow.com/comment/41317937
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41317675
has title: Create JavaScript array out of HTML
type: Question
has comment: http://stackoverflow.com/comment/41317744
has answer: http://stackoverflow.com/a/26326962
has body: I am iterating over an array to display some data, and at the same time creating another array which will be used to create JSON and then assign it to a JavaScript variable. <?php $otherStuff=array(); foreach($myArray AS $row) { echo(" {$row['firstname']} {$row['firstname']} "); $otherStuff[$row['id']]=$row['otherStuff']; } echo(' '); ?> This just doesn't seem like a very clean way to do this task. Instead I am wondering if it would be better to create some hidden HTML, and then clientside parse it to create the desired JavaScript variable. Is doing so possible? Is it a good idea, or should I do something else? If possible, how? Thank you

http://stackoverflow.com/a/26351529
has comment: http://stackoverflow.com/comment/41363615
type: Answer
has comment: http://stackoverflow.com/comment/41364499
has comment: http://stackoverflow.com/comment/41364290
has comment: http://stackoverflow.com/comment/41364543
answers question: http://stackoverflow.com/q/26351335
has body: Sorry, I misunderstood. If the a href attribute is set like so: Download You can use in the javascript: str.setAttribute("href", res); EDIT: Ok I got it. Sorry about this strenuous exercise. Here's what you should write: {$value.file_name} Download
score: 0
accepted answer of: http://stackoverflow.com/q/26351335
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41363336
has comment: http://stackoverflow.com/comment/41363678
has comment: http://stackoverflow.com/comment/41363316
has comment: http://stackoverflow.com/comment/41364338

http://stackoverflow.com/a/26318045
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26311838
has body: Use Firebase. If you're using Firebase as your main datastore I would strongly advice against directly talking to your Node backend. Having to connect your Angular app to your Node script would require a lot of needless overhead that Firebase helps reduce. If you want to setup a connection to your backend you would have to expose and endpoint for your Angular app to talk to you. You would also have to use AJAX or some web socket implementation to send the data. This doesn't make sense since Firebase is already handling your data transport. For doing any backend type tasks, like sending an email, you can hook up a listener and that will help you fire off those emails whenever you indicate something has updated. In your app it could look like this: $scope.ref = $firebase(new Firebase('&lt;your-firebase&gt;/emailsToSend')); $scope.updateOnClick = function() { var email = // get this somehow $scope.ref.$push(email); }; Then on your Node JS server var ref = new Firebase('&lt;your-firebase&gt;/emailsToSend'); // this is a dummy object for the example only var emailClient = new EmailClient(); ref.on('child_added', function(snap) { var emailToSend = snap.val(); // send email emailClient.send(email, function afterSend() { // if you can hook into when the email has sent // delete the data afterwards snap.ref().remove(); }); }); For services like sending emails you might want to look into Zapier. They hook into Firebase and handle these events for you.
type: AcceptedAnswer
score: 8
upvote count: 8
answers question: http://stackoverflow.com/q/26311838
type: Answer

http://stackoverflow.com/comment/41076619
has text: Tip: If you are unfamiliar with a specific method, read its documentation on MDN first: https://developer.mozilla.org/en-US/docs/Web/API/document.write. Or even search for it on SO: https://stackoverflow.com/questions/13741584/what-does-document-write-do
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26195623
type: Comment

http://stackoverflow.com/comment/41150509
score: 2
has text: @torazaburo There is no reason why any one should not learn any kind of pattern in Javascript. Whether he should use it or not matters though.
comment on: http://stackoverflow.com/q/26235513
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26274278
has title: Reference javascript file inside typescript
type: UnansweredQuestion
answer count: 4
tagged with: reference
upvote count: 36
downvote count: 0
has answer: http://stackoverflow.com/a/26275242
has answer: http://stackoverflow.com/a/26505153
favorite count: 0
has body: I would like to use a javascript function inside a typescript file. How can I reference the javascript file containing that function inside typescript file? I tried &lt;reference path="../libs/myjsfile.js" /&gt; this brings an error while building like: Cannot resolve referenced file: ../libs/myjsfile.js
type: Question
tagged with: typescript
has answer: http://stackoverflow.com/a/26276069
score: 36
tagged with: javascript
has answer: http://stackoverflow.com/a/32505641

http://stackoverflow.com/comment/41188852
type: QuestionComment
type: Comment
score: 1
has text: How do you know which timezone the restaurant is in? Or the user?
comment on: http://stackoverflow.com/q/26256571

http://stackoverflow.com/a/26296690
score: 6
has comment: http://stackoverflow.com/comment/41263073
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26296181
answers question: http://stackoverflow.com/q/26296181
has comment: http://stackoverflow.com/comment/41263009
type: AcceptedAnswer
has body: You're trying to send messages from the background page to the content script. From the official documentation, you're using this code snippet to send messages from the background page: chrome.runtime.sendMessage({greeting: "hello"}, function(response) { console.log(response.farewell); }); However, the docs clearly mention that the code mentioned above is to send a message from a content script. This is the reason why you probably get the error: Error in event handler for (unknown): Cannot read property 'farewell' of undefined Stack trace: TypeError: Cannot read property 'farewell' of undefined What you want to achieve is sending a request from the extension (background page) to a content script which requires you to specify the tab in which the content script is present: chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) { console.log(response.farewell); }); }); I hope this clarifies things and gets you started in the right direction.
type: Answer
has comment: http://stackoverflow.com/comment/41262734
downvote count: 0

http://stackoverflow.com/a/26323376
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26195965
score: 0
type: Answer
has body: I found a way to solve this by calling the scroller: var app = new kendo.mobile.Application(); app.scroller(); even without doing anything it updates the height of the application and solves the problem
accepted answer of: http://stackoverflow.com/q/26195965

http://stackoverflow.com/a/26273120
score: 0
answers question: http://stackoverflow.com/q/26272965
type: Answer
upvote count: 1
downvote count: 1
has body: You can share value from one controller to another with using of "shared service" FirstController: function FirstCtrl($scope, mySharedService) { $scope.passData(params){ mySharedService.setValues(params); } } SharedService: angular.module("yourAppName", []).factory("mySharedService", function($rootScope){ var mySharedService = {}; mySharedService.values = {}; mySharedService.setValues = function(params){ mySharedService.values = params; $rootScope.$broadcast('dataPassed'); } return mySharedService; }); SecondController: function SecondController($scope, mySharedService) { $scope.$on('dataPassed', function () { $scope.newItems = mySharedService.values; }); }

http://stackoverflow.com/comment/41218945
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26271993
score: 0
has text: can you copy the url to the w3cschools site (function reference)?

http://stackoverflow.com/q/26199314
tagged with: kurento
type: Question
score: 7
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26203517
has title: Kurento WebRTC not recording
answer count: 1
downvote count: 0
tagged with: webrtc
has answer: http://stackoverflow.com/a/26203517
has body: I'm trying to record video using the Kurento Media Server with nodejs. I've been running hello-world example here. I connected a recorderEndpoint to the webrtcEndpoint and was able to get the whole thing running but I receive this error message on the server: 0:37:59.122469563 7003 0xaf5500 ERROR KurentoMediaPipelineImpl /build/buildd/kms-core-5.0.3/src/server/implementation/objects/MediaPipelineImpl.cpp:32:busMessage: Error on bus: error message: 0x7f11c0330ea0, time 99:99:99.999999999, seq-num 514729, element 'kmsrecorderendpoint10', GstMessageError, gerror=(GError)NULL, debug=(string)"/build/buildd/kms-elements-5.0.3/src/gst-plugins/kmsrecorderendpoint.c(876):\ sink_required_cb\ ():\ /GstPipeline:pipeline8/KmsRecorderEndpoint:kmsrecorderendpoint10"; I don't think its recording properly, but I'm not sure what's wrong. I was able to run the original example so the server is fine. Code here: https://gist.github.com/poliu2s/2cd3fc2a5dc929062481
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
upvote count: 7

http://stackoverflow.com/a/26330553
score: 1
has body: You can't close three of javascript popups: alert(), prompt() and confirm() as they block JavaScript execution on page. Only user can close them or answer them.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26330390
type: Answer
accepted answer of: http://stackoverflow.com/q/26330390
upvote count: 1

http://stackoverflow.com/q/26264108
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8556673
has comment: http://stackoverflow.com/comment/41204260
type: Question
tagged with: dependency-injection
has body: I'm trying to use a setter injection in this example below, it works but I cannot yet find out how to achieve the same result without using eval(). var action = function(){}; action.prototype.create = function(type, name) { var action = eval("this."+type); action.create(name); }; action.prototype.review = { create: function(name){ console.log("hey "+name); } }; var bang = new action(); bang.create('review','john'); I'm running this on nodejs v0.10
accepted answer: http://stackoverflow.com/a/26264125
score: -2
tagged with: prototype
has answer: http://stackoverflow.com/a/26264125
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 3
has title: javascript setter injection without eval

http://stackoverflow.com/q/26296518
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41264811
has comment: http://stackoverflow.com/comment/41264288
type: Question
has body: I have used facebook graph api v2.0 for my .net application I inserted following javascript code: (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#version=v2.0&amp;xfbml=1&amp;appId=" + AppId; fjs.parentNode.insertBefore(js, fjs); } (document, 'script', 'facebook-jssdk')); For fb login I used following code: FB.login(function (response) { if (response.authResponse) { console.log('Welcome! Fetching your information.... '); //console.log(response); // dump complete info access_token = response.authResponse.accessToken; //get access token user_id = response.authResponse.userID; //get FB UID myMethod(); } else { //user hit cancel button console.log('User cancelled login or did not fully authorize.'); return false; } }, { scope: 'publish_stream,email' }); function myMethod() { FB.api('/me', function (response) { uid = response.id; username = response.username; email = response.email; gender = response.gender; fullname = response.name; firstname = response.first_name; lastname = response.last_name; link = response.link; //then i perform other operations }); } This code does bring out fb popup for login but the problem is many times the popup doesn't close and i don't get any response from api. this thing becomes worse in IE9, I have written meta tag for it but still no use. &lt;meta http-equiv="X-UA-Compatible" value="IE=9"&gt; Does anyone have any solution for it. it's too frustrating, I tried many things but doesn't work.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41262860
has comment: http://stackoverflow.com/comment/41262673
has comment: http://stackoverflow.com/comment/41263217
tagged with: facebook-graph-api
answer count: 0
type: UnansweredQuestion
tagged with: facebook
has title: Facebook popup not closing
has comment: http://stackoverflow.com/comment/41263881
has comment: http://stackoverflow.com/comment/41264243

http://stackoverflow.com/comment/41079086
type: AnswerComment
comment on: http://stackoverflow.com/a/26197061
type: Comment
has text: well that makes sense as to why they aren't showing on the basic jPlayer, it's an add-on. i'll take a look
score: 0

http://stackoverflow.com/q/26314685
tagged with: sdk
answer count: 1
has title: Facebook Javascript SDK - acces user information
tagged with: facebook
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26315226
accepted answer: http://stackoverflow.com/a/26315226
type: Question
has body: I am suing javascript sdk for my fb application. The problem I am facing is that I can't save the user information in a variable and than use it in my application where I need it. This is my code: &lt;script&gt; var userfb; FB.getLoginStatus(function(response) { if (response.status === 'connected') { FB.api('/me', function(response) { userfb = response; console.log (userfb); }); } }); $(document).ready(function() { $('.firstname input').val(userfb.first_name); }); &lt;/script&gt; This will return userfb.first_name as undefined because FB.api didn't finish yet, but if I write the last line like this, everything works fine. setTimeout(function(){$('.firstname input').val(userfb.first_name);}, 3000); Anyone knows how can I access userfb from anywhere in my application without putting setTimout?
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/26348613
tagged with: datatables
accepted answer: http://stackoverflow.com/a/29291478
score: 2
has title: Use dataTables or filter and paginate in Rails?
upvote count: 2
has body: I've like 6 or 7 controllers in which I've to show a list of elements in a table, that must be paginated and searchable. I've seen a Javascript library called dataTables that allows to do both things (and column-based sorting) without dealing with code. Is a best practice to do it in server-side (and unload the server from sending all the rows in the table) or use this plug-in (or something similar, that avoid send petitions to Rails for change page or do a search)? Note that the number of elements in every table shouldn't exceed 100...
tagged with: ruby-on-rails
type: Question
type: AnsweredQuestion
tagged with: performance
tagged with: pagination
has comment: http://stackoverflow.com/comment/41358398
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/29291478

http://stackoverflow.com/q/26255843
accepted answer: http://stackoverflow.com/a/26256275
answer count: 1
has title: Two angular app on same page - only one works at a time
has comment: http://stackoverflow.com/comment/41187398
tagged with: angularjs
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26256275
type: Question
tagged with: javascript
has body: I have two angular app blocks in a page. each one works individually , but when i try to run both only first one works. Remove Item Add Item Add Pallet Remove Pallet Remove Pallet Submit {{palletElement}} in this case only first app 'MyApp' works. Detailed Fiddle here
linked to: http://stackoverflow.com/q/12860595

http://stackoverflow.com/q/26275902
has body: I am trying to get a custom variable into some Event Tracking in a dynamic templating system. It uses information from the URL to use as the variable. There is nothing coming across into analytics with this script appended. Can anyone see anything wrong with it? jQuery(function iCatGaFunction() { jQuery('#catbanner').click(function () { var url = jQuery(location).attr('href'); // get the current url var iCat = url.substring(url.lastIndexOf('/') + 1); // Last index of the url icat reference _gaq.push(['_setCustomVar', 1, 'iCatBanner', iCat]); // GA snippet }); }); jQuery('#catbanner').find('a:first').attr('onClick', 'iCatGaFunction()'); // wrap first a href around &lt;img&gt; and call function onclick I followed the instructions here - perhaps something to do with scope? https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setCustomVar
tagged with: javascript
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41225541
type: UnansweredQuestion
tagged with: event-tracking
has title: Using custom variable in GA event tracking
has comment: http://stackoverflow.com/comment/41224602
answer count: 0
has comment: http://stackoverflow.com/comment/41225045
type: Question
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/41225176

http://stackoverflow.com/q/26278701
accepted answer: http://stackoverflow.com/a/26285068
answer count: 4
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/26260081
upvote count: 1
has comment: http://stackoverflow.com/comment/41230208
has body: I've been wrestling with the Bootstrap UI Typeahead control. I am trying to set the width of the drop down box at run time. The last SO question I asked dealt with setting the width of elements at runtime. While answered properly, the answer does not work in the context of the Typeahead directive for some reason. Currently, I am using the Typeahead control in my own directive, which is defined like this: .directive('myDirective', function () { return { restrict:'E', transclude: true, scope: { showLinks: '=?', query: '=' }, templateUrl: '/directives/my-directive.html', controller: function ($scope) { if (angular.isUndefined($scope.showLinks)) { $scope.showLinks = true; } $scope.getLocation = function(l) { var searchField = element.find('input'); var width = searchField[0].offsetWidth; var dropdown = $element.find('.dropdown-menu'); angular.element(dropdown[0]).css('width', (width + 'px')); }; } }; }); my-directive.html looks like this: &lt;div style="width:100%;"&gt; &lt;span&gt;{{showLinks}}&lt;/span&gt; &lt;!-- renders just fine --&gt; &lt;input type="text" autofocus autocomplete="off" class="form-control" ng-model="query" typeahead="option as option.Name for option in getLocation($viewValue)" typeahead-min-length="3" typeahead-template-url="location.html" /&gt; &lt;script type="text/ng-template" id="location.html"&gt; {{showLinks}} &lt;!-- Never renders --&gt; &lt;span bind-html-unsafe="match.label | typeaheadHighlight:query"&gt;&lt;/span&gt; &lt;/script&gt; &lt;/div&gt; How do I set the width of the dropdown menu that appears to be the same width as the textbox in my directive? My textbox is a different size on different screens. That's why I do not just hard-code a value.
type: Question
has title: Setting Width of Typeahead Drop Down in AngularJS project
linked to: http://stackoverflow.com/q/25116635
tagged with: javascript
has answer: http://stackoverflow.com/a/36034525
has answer: http://stackoverflow.com/a/51707637
has answer: http://stackoverflow.com/a/27721256
has answer: http://stackoverflow.com/a/26285068
downvote count: 0
has comment: http://stackoverflow.com/comment/41229532
favorite count: 0
possible better answer: http://stackoverflow.com/a/27721256
tagged with: angularjs

http://stackoverflow.com/comment/41250185
score: 0
type: Comment
type: QuestionComment
has text: You need to wait for the DOM to load before you can access its content. I suggest putting your ` `s at the bottom of the page (before the closing ` ` tag).
comment on: http://stackoverflow.com/q/26289499

http://stackoverflow.com/comment/41107113
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26212169
has text: I mean, the JS file, is it getting loaded? Please confirm by adding a screenshot of the console and the 200 ok status.
type: Comment

http://stackoverflow.com/a/26288514
has body: If I get you right, then you want to display two textBoxes when a button is clicked... You can make it pretty simple and take the document.write command. e.g.
type: Answer
answers question: http://stackoverflow.com/q/26288241
score: 0

http://stackoverflow.com/a/26318519
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41307807
upvote count: 30
answers question: http://stackoverflow.com/q/26317985
has body: React pools event objects for performance reasons. So it takes an event object from the pool, sets properties on it, calls your handler, and then sets all of the properties to null so it can be reused. This is mostly only a problem because the console lazily evaluates the object you log. You could do a shallow clone of the event object to make console.log work. For debugging purposes, console.shallowCloneLog = function(){ var typeString = Function.prototype.call.bind(Object.prototype.toString) console.log.apply(console, Array.prototype.map.call(arguments, function(x){ switch (typeString(x).slice(8, -1)) { case 'Number': case 'String': case 'Undefined': case 'Null': case 'Boolean': return x; case 'Array': return x.slice(); default: var out = Object.create(Object.getPrototypeOf(x)); out.constructor = x.constructor; for (var key in x) { out[key] = x[key]; } Object.defineProperty(out, 'constructor', {value: x.constructor}); return out; } })); } console.shallowCloneLog(e)
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26317985
score: 30

http://stackoverflow.com/comment/41320852
type: QuestionComment
has text: but what is a jquery code I would be use ?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26328222

http://stackoverflow.com/comment/41324280
type: Comment
type: QuestionComment
has text: well some pseudo code would help. Nobody can address performance improvements without some visible flow process
comment on: http://stackoverflow.com/q/26329807
score: 0

http://stackoverflow.com/comment/41128629
has text: Stack Snippets are underrated
score: 0
comment on: http://stackoverflow.com/a/26223492
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26284469
accepted answer of: http://stackoverflow.com/q/26281182
answers question: http://stackoverflow.com/q/26281182
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Here's a fiddle illustrating the standard syntax to use to accomplish this: Fiddle for basic Bootstrap 3 Navbar And the corresponding HTML: Toggle navigation
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41109974
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26213902
has text: The alert works fine for me. Appears on option select as expected.
score: 0

http://stackoverflow.com/comment/41168405
comment on: http://stackoverflow.com/q/26244871
has text: you have to print/display it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26196405
answers question: http://stackoverflow.com/q/26196042
score: 15
accepted answer of: http://stackoverflow.com/q/26196042
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41092113
has comment: http://stackoverflow.com/comment/41087534
type: Answer
upvote count: 15
downvote count: 0
has body: We have been developing some projects using the same approach. Not only I think it doesn't have any "side effect", but the solution is very elegant too. We usually create the backend in Node.js, and it is just an API server (not necessarily entirely REST-compliant). We then create another, separate web application for the frontend, written entirely in HTML5/JavaScript (with or without Angular.js). The API server never returns any HTML, just JSON! Not even an index structure. There are lots of benefits: The code is very clean and elegant. Communication between the frontend and the backend follow standardized methods. The server exposes some API's, and the client can use them freely. It makes it easier to have different teams for the frontend and the backend, and they can work quite freely without interfering with each other. Designers, which usually have limited coding skills, appreciate this too. The frontend is just a static HTML5 app, so it can (and we often did) easily be hosted on a CDN. This means that your servers will never have to worry about static contents at all, and their load is reduced, saving you money. Users are happier too, as CDNs are usually very fast for them. Some hints that I can give you based on our experience: The biggest issue is with authentication of users. It's not particularly complicated, but you may want to implement authentication using for example protocols like OAuth 2.0 for your internal use. So, the frontend app will act as a OAuth client, and obtains an auth token from the backend. You may also want to consider moving the authentication server (with OAuth) on another separate resource from the API server. If you host the webapp on a different hostname (e.g. a CDN) you may need to deal with CORS, and maybe JSONP. The language you write the backend in is not really important. We have done that in PHP (including Laravel), even though we got the best results with using Node.js. For Node.js, we published our boilerplate on GitHub, ba…
has comment: http://stackoverflow.com/comment/42912217

http://stackoverflow.com/comment/41248550
comment on: http://stackoverflow.com/q/26287844
type: Comment
type: QuestionComment
has text: The reason it is being renegotiated is for the case when you have more than one stream. You can just close the connection if you only have one media stream in the connection.
score: 1

http://stackoverflow.com/comment/41171607
type: QuestionComment
comment on: http://stackoverflow.com/q/26203295
score: 0
has text: Thanks. The performance on normal desktop browsers is OK. But the performance on iPad takes a couple of seconds which is annoying. The unblended pixel data is not the issue really. Its images I load on the fly but once they're cached they're pretty much ok. Its this blending (which I can't do beforehand because it depends on what the user does) that is the problem.
type: Comment

http://stackoverflow.com/a/26219921
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41656265
type: Answer
has body: I found the solution. basically in your model, you have to add autoPK:false But if you try to run sailsjs now you will get an error Error: Trying to create an association on a model that doesn't have a Primary Key. To fix that, you need to specify a different primary key for your table, in my case the user table. for example you can set the SSN to be the primary key. ssn: { type: "string", primaryKey: true } But notice now if you try to hit sailsjs with the old ID that will not work since the new PK now is different. Will not work : localhost:1337/user/id Will work: localhost:1337/user/ssn
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26219554
has comment: http://stackoverflow.com/comment/41649136
score: 1
answers question: http://stackoverflow.com/q/26219554

http://stackoverflow.com/a/26330896
has comment: http://stackoverflow.com/comment/41379867
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41425906
has comment: http://stackoverflow.com/comment/41391387
type: Answer
accepted answer of: http://stackoverflow.com/q/26322831
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41393036
answers question: http://stackoverflow.com/q/26322831
has body: The best place to look for documentation on how to do things is the API Documentation. It has documentation on each component and plugin and the options available for each. As almas shaikh implied, the setting which changes the colors of the sections of the bars in a stacked barchart is the seriesColors attribute. This is an array with the colors defined as text strings as you would provide for CSS, or a style. In the example from which you took the above image to get (working JSFiddle): You can add: //Define colors for the stacked bars: seriesColors: ["#FDF396", "#ABFD96", "#96A0FD"], The complete function call would be: $(document).ready(function(){ var s1 = [2, 6, 7, 10]; var s2 = [7, 5, 3, 4]; var s3 = [14, 9, 3, 8]; plot3 = $.jqplot('chart3', [s1, s2, s3], { //Define colors for the stacked bars: seriesColors: ["#FDF396", "#ABFD96", "#96A0FD"], // Tell the plot to stack the bars. stackSeries: true, captureRightClick: true, seriesDefaults:{ renderer:$.jqplot.BarRenderer, rendererOptions: { // Put a 30 pixel margin between bars. barMargin: 30, // Highlight bars when mouse button pressed. // Disables default highlighting on mouse over. highlightMouseDown: true }, pointLabels: {show: true} }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer }, yaxis: { // Don't pad out the bottom of the data range. By default, // axes scaled as if data extended 10% above and below the // actual range to prevent data points right on grid boundaries. // Don't want to do that here. padMin: 0 } }, legend: { show: true, location: 'e', placement: 'outside' } }); // Bind a listener to the "jqplotDataClick" event. Here, simply change // the text of the info3 element to show what series and ponit were // clicked along with the data for that point. $('#chart3').bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { $('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data); } ); }); Additional (point labels): The best place to look for documentatio…
has comment: http://stackoverflow.com/comment/41393046
has comment: http://stackoverflow.com/comment/41387260

http://stackoverflow.com/comment/41082514
score: 0
type: AnswerComment
type: Comment
has text: If you feel this answers your question feel free to "accept" it as the solution. If not, feel free to comment and I will do my best to further assist you.
comment on: http://stackoverflow.com/a/26198979

http://stackoverflow.com/comment/41094233
type: Comment
score: 0
has text: Sorry, I was out. Anyway, this is a standard thing - the doubling comes from the bottom border of the top element touching the top border of the bottom element, so instead of a 1px border, you have two 1px lines touching, creating a 2px border.
type: AnswerComment
comment on: http://stackoverflow.com/a/26203882

http://stackoverflow.com/comment/41124502
type: Comment
has text: @Kaiido This is based off the OP's original code. It is more how to color the last word vs how to get the content.
comment on: http://stackoverflow.com/a/26220305
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41229939
comment on: http://stackoverflow.com/a/26278746
type: AnswerComment
score: 0
type: Comment
has text: Look at what you typed. It has nothing to do with the space. The space is caused by the bug. It has to do to the quotes causing the attributes to be closed. The HTML is parsed and it sees `onclick="userTurn("` It does not magically read your mind and realize that the next couple of characters belongs with that attribute.

http://stackoverflow.com/q/26321495
tagged with: function
tagged with: javascript
has answer: http://stackoverflow.com/a/26321574
score: 0
accepted answer: http://stackoverflow.com/a/26321535
has answer: http://stackoverflow.com/a/26321546
has answer: http://stackoverflow.com/a/26321535
has comment: http://stackoverflow.com/comment/41308186
has comment: http://stackoverflow.com/comment/41308179
has title: Moving code inside a function is not working
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26321546
tagged with: nested-loops
has body: Any help will be very appreciated... I am trying to figure out how to nest loops inside of a function. If I input this into the console... var i, arr = [1, 2, 3, 4, 5, 6]; var remove = []; for (i = 0; i &lt; arr.length; i++) { if (Number(arr[i]) != i % 2) { remove.push(arr[i]); arr.splice(i, 1); } } console.log(remove); it returns with the desired array, removing all the even numbers from arr. But, if I wrap it in a function, it is undefined... var i, arr = [1, 2, 3, 4, 5, 6]; var remove = []; function reject() { for (i = 0; i &lt; arr.length; i++) { if (Number(arr[i]) != i % 2) { remove.push(arr[i]); arr.splice(i, 1); } } }; console.log(remove); What am I doing wrong?
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/41308141

http://stackoverflow.com/q/26338367
has answer: http://stackoverflow.com/a/26338463
accepted answer: http://stackoverflow.com/a/26338414
has title: Regex match until "&" or "|"
type: Question
tagged with: conditional-statements
has comment: http://stackoverflow.com/comment/41339377
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26338414
tagged with: regex
has body: I have the following string [Field1]='Field1Value'|[Field2]='Field2Value'&amp;[Field3]='Field3Value' and I want to get a regular expression match until either "&amp;" or "|" but I also want to include the "&amp;" or "|" in my matches. Meaning my string should create the following matches: 1. [Field1]='Field1Value' 2. | 3. [Field2]='Field2Value' 4. &amp; 5. [Field3]='Field3Value' I am using ([^&amp;^\|]*) right now but the problem is this returns: 1. [Field1]='Field1Value' 2. '' 3. [Field2]='Field2Value' 4. '' 5. [Field3]='Field3Value' 6. ''
possible better answer: http://stackoverflow.com/a/26338463
type: AnsweredQuestion

http://stackoverflow.com/comment/41356930
has text: @Newbie1234 Okay, but then please forget the `<?` and `?>` tags in your code, and the `echo` statement too, and change it to js. Then come back with some code that is replaceable.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26347630

http://stackoverflow.com/comment/41155269
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26238086
score: 2
has text: Don't. Seriously. If people want to use IE, especially modern IE. Let them. Use feature detection and progressive enhancement instead.

http://stackoverflow.com/comment/41458377
type: AnswerComment
has text: BTW in your case send to send to a printer also the virtual space of your page directly from js means you restrict all elements by a factor that allows all elements to be in a single-sheet. IMHO not a your taks but I don't know what you have to realize ;)
type: Comment
comment on: http://stackoverflow.com/a/26341840
score: 0

http://stackoverflow.com/comment/41227748
type: QuestionComment
comment on: http://stackoverflow.com/q/26277767
has text: In this case, `{}` will be interpreted as a block statement rather than an object literal.
score: 2
type: Comment

http://stackoverflow.com/q/26216026
tagged with: angularjs
tagged with: css
has comment: http://stackoverflow.com/comment/41113829
has comment: http://stackoverflow.com/comment/41114158
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41114044
upvote count: 1
has comment: http://stackoverflow.com/comment/41114306
has answer: http://stackoverflow.com/a/26216243
type: Question
has title: AngularJS IF Directive use columns
has comment: http://stackoverflow.com/comment/41113973
accepted answer: http://stackoverflow.com/a/26216243
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has body: I have a if directive (it works well). When I click on the NAME , it shows the image. But I would like the image in an other column: name: {{product.name}} HERE IS THE MOCKUP: http://hpics.li/7678189 When I click on the name, I have a picture that appears just right down. I would like the image displayed in Column2. Thanks for your help ! Carlos

http://stackoverflow.com/comment/41109302
score: 0
has text: @quentin I know the same question has been asked but,the answers were abstract and didn't help me solve my issue. Expecting a detailed procedure to solve this as i am new to javascript xml and ajax.
comment on: http://stackoverflow.com/q/26212764
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26268183
has comment: http://stackoverflow.com/comment/41211309
has body: Add this in your HTML before last tag. (Need you have a jquery) &lt;style&gt; .deadface { display:none !important; } &lt;/style&gt; &lt;script&gt; $(function() { $('.like-box').addClass('deadface'); }); &lt;/script&gt; Or this to completely remove &lt;script&gt; $(function() { $('div.like-box').remove(); }); &lt;/script&gt;
type: Answer
upvote count: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26268109
answers question: http://stackoverflow.com/q/26268109
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41245983
score: 0

http://stackoverflow.com/q/26323881
has body: i have php page that i want to run simple countdown 60 seconds in a certain area of my page (in the footer) because i have auto refresh code to refresh the page every 60 seconds so i want to show to users that 60, 59, 58, 57.... just a text rolling countdown until it refreshes so it will start again. easy and simple, no need for complete count down scripts as shown online in many sites... what i could think is a gif animated small icon, that can work but if possible not add an image is better, i just want normal size text as numbers running from 60 to 0 then looping again (even if no looping is fine... page will be refreshed anyway) what to do?
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26324166
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: adding simple countdown (as numbers) to my php script
has comment: http://stackoverflow.com/comment/41312446
favorite count: 0
tagged with: php
score: -1

http://stackoverflow.com/q/26350739
favorite count: 0
has comment: http://stackoverflow.com/comment/41400234
has title: Remove class isn't working with id #.parent?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41361868
has answer: http://stackoverflow.com/a/26350776
has answer: http://stackoverflow.com/a/26350758
downvote count: 1
type: Question
score: -1
has body: I'm trying to remove a class of an element that contains an with an href. I have the href retrieved, however how come I can't remove the class this way? script: ... $('#panel1').parent('li').removeClass('active'); //doesn't work.... ... html: ... Panel 1 Panel 2 Panel 3 Panel 4
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41440434
score: 0
type: AnswerComment
has text: @Bergi: This feedback made us realize that there was simply no reason for the boolean casts in the and/or functions. They're removed in HEAD and won't be in the next release.
comment on: http://stackoverflow.com/a/26326115
type: Comment

http://stackoverflow.com/a/26644928
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26288549
has body: Google Chrome 38.0.2125.111 doesn't implement anymore Array.prototype.values. This small test var myArray = new Array(); alert(myArray['values']); alert(myArray['anotherparameter']); returns undefined for both alert. However the method hasOwnProperty can be used to determine if the array has a property called values or not: var myArray = new Array(); alert(myArray.hasOwnProperty('values')); // alert false myArray['values'] = "Hello"; alert(myArray.hasOwnProperty('values')); // alert true this works for browsers implementing Array.prototype.values like Opera 25.0.1614.63

http://stackoverflow.com/comment/41266140
type: QuestionComment
has text: @maurycy: what you mean by `filer`?
comment on: http://stackoverflow.com/q/26298585
score: 0
type: Comment

http://stackoverflow.com/comment/41152435
type: Comment
type: QuestionComment
has text: I've tried different solutions of $.each(obj, function()). Inside the main $.each, there were more than 6 other loops and then i got confused. I think i have to use methods like hasOwnAttribute or find?
comment on: http://stackoverflow.com/q/26236600
score: 0

http://stackoverflow.com/comment/41363301
has text: Can you look in the inspector if the script is correctly loaded and if there is any error in the javascript console ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26351489
type: AnswerComment

pug
tags question: http://stackoverflow.com/q/26212367
tags question: http://stackoverflow.com/q/26336007
tags question: http://stackoverflow.com/q/26313573
tags question: http://stackoverflow.com/q/26288613
tags question: http://stackoverflow.com/q/26250758
tags question: http://stackoverflow.com/q/26326705
tag name: pug
type: Tag
tags question: http://stackoverflow.com/q/26198680
tags question: http://stackoverflow.com/q/26203729
tags question: http://stackoverflow.com/q/26240107

http://stackoverflow.com/q/26349487
type: Question
has title: Change a class parameter in javascript object
has answer: http://stackoverflow.com/a/26350910
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41359908
has body: I'm using this wonderful gem by Chris McCord, Sync My project is working fine, except for small issue relates to a position. In the coffeescript file of the gem I have class Sync.PartialCreator attributes: name: null resourceName: null authToken: null channel: null selector: null direction: 'append' refetch: false constructor: (attributes = {}) -&gt; @[key] = attributes[key] ? defaultValue for key, defaultValue of @attributes @$el = $("[data-sync-id='#{@selector}']") @adapter = Sync.adapter I need to change the direction from append to prepend. Is there any way to change this or I must fork the gem?
type: UnansweredQuestion
tagged with: coffeescript
tagged with: ruby-on-rails

http://stackoverflow.com/comment/41234691
has text: You never actually *use* the value of `id`. Did you mean to add it as the `id` attribute of `checkBox` or `span`?
score: 4
comment on: http://stackoverflow.com/q/26281482
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26267808
type: Question
has title: Advanced toggle function to show some items
score: -2
tagged with: javascript
tagged with: show-hide
tagged with: css-animations
answer count: 2
possible better answer: http://stackoverflow.com/a/26267904
upvote count: 0
has answer: http://stackoverflow.com/a/26329000
has answer: http://stackoverflow.com/a/26267904
favorite count: 0
accepted answer: http://stackoverflow.com/a/26329000
type: AnsweredQuestion
has body: Need an advanced javascript toggle function. (I have no experience with writing my own js and hope someone can help me). When clicking on an img then make an other div from height=0 to height=auto (animated). I have duplicated the code so the toggle need to show - hide only the childs/parent div and not troggle all divs with the 'i-more' class. I made a fiddle to show what I want to do: EXAMPLE IN FIDDLE HERE > HTML: Header here Text here text here text here text here text here text here text here... More text here more text more text more text more text more text more text more text more text more text here text here text here text here text here text here text here text here text here text here text here. More text here more text more text more text more text more text more text more text more text more text here text here text here text here text here text here text here text here text here text here text here. Show less More stuff like above here... A duplicate from above. when click on the i-btn-more only that text and thumb will be visible and not all divs with that same class. CSS: .i-more{height:0; overflow:hidden;} .i-holder{width:600px; margin:20px; position:relative;} .i-left img{display:block; margin-bottom:10px;} .i-left{float:left; width:200px; background:#fc1; min-height:130px; } .i-right{float:right; width:320px; padding:0 50px 10px 10px; background:#6d1; min-height:130px; } .i-btn-more{position:absolute; cursor:pointer; margin:-40px 0 0 330px;} .i-more{clear:both;} .clear{clear:both;}
downvote count: 2

http://stackoverflow.com/comment/41291390
type: QuestionComment
comment on: http://stackoverflow.com/q/26312260
has text: how do you check those? (very new sorry)
score: 0
type: Comment

http://stackoverflow.com/q/26323740
type: Question
has body: How do i stop the function from executing if the userChoice is null or a word apart from rock,paper or scissors. I've tried to use return but i couldn't get it to work. Any help is appreciated. Thanks JS Fiddle Link = http://jsfiddle.net/Renay/d9bea2ra/1/ var userChoice = prompt('Do you choose rock, paper or scissors?'); var compChoice = Math.random(); if (compChoice &lt;= 0.34) { compChoice = 'rock'; } else if (compChoice &lt;= 0.67) { compChoice = 'paper'; } else { compChoice = 'scissors'; } function compare() { if (userChoice == compChoice) { console.log( 'The result is a tie!'); } else if ((userChoice == 'rock' &amp;&amp; compChoice == 'scissors') || (userChoice == 'paper' &amp;&amp; compChoice == 'rock') || (userChoice == 'scissors' &amp;&amp; compChoice == 'paper') ) { console.log( 'You win!'); } else { console.log('You lose!'); } if (userChoice === null) { console.log('Please select an option'); } else if (userChoice !== 'rock'&amp;&amp;'paper'&amp;&amp;'scissors') { console.log('Please select rock, paper or scissors'); } } console.log('Your choice = ' + userChoice); console.log('Computer Choice = ' + compChoice); compare();
has answer: http://stackoverflow.com/a/26323790
accepted answer: http://stackoverflow.com/a/26323790
has answer: http://stackoverflow.com/a/26323751
has answer: http://stackoverflow.com/a/26323848
has comment: http://stackoverflow.com/comment/41312098
score: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26323797
has comment: http://stackoverflow.com/comment/41312140
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26323751
has title: Exiting out of a function in Javascript. Simple rock, paper, scissors game

http://stackoverflow.com/q/26280860
has comment: http://stackoverflow.com/comment/41235730
score: 0
has body: I am looking for a way to determine the neighbouring countries of a country using Javascript. So far I looked around the Google Maps Geocoding API where I could not find what I need. Unfortunately I can't figure out a way to achieve that without opening Google Maps and looking them up for any single country in the world, which I don't intend to. I was more thinking of a function that allows me to do something like getNeighbouringCountriesOf("DE"); //returns array like ["AT","NL","CZ", "..."] Please let me know if you know of something like that.
answer count: 0
type: UnansweredQuestion
has title: JS: Determining neighbouring countries
tagged with: maps
tagged with: geocoding
has comment: http://stackoverflow.com/comment/41234399
type: Question
tagged with: javascript

http://stackoverflow.com/q/26243739
type: Question
has body: My cloud log says that it cannot call the method "success" of undefined at query.first.success however i dont understand this because my console.log is showing up which is called inside of the success block. What is undefined in this code? var query = new Parse.Query("Messages"); query.first({ success: function(results, response){ console.log("The first object was retrieved"); body = (results.get("messageBody")); senderName = (results.get("senderName")); senderId = (results.get("senderId")); results.destroy({ success: function(results){ }, error: function(results, error){ } }); response.success(results); }, error: function(error){ response.error("Error"); } });
has comment: http://stackoverflow.com/comment/41166627
has comment: http://stackoverflow.com/comment/41166490
tagged with: javascript
has title: succes method keeps showing up undefined
tagged with: parse-cloud-code
score: 0
has comment: http://stackoverflow.com/comment/41166296
has comment: http://stackoverflow.com/comment/41166816
has comment: http://stackoverflow.com/comment/41166677
tagged with: parse-platform
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41250664
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26289746
has text: in this sense, it seems more like hack plus youre using javascript to invoke the animation anyway why not just use a library already loaded. there won't be any measurable performance differences in this scenerio.
type: AnswerComment

http://stackoverflow.com/a/26547787
has comment: http://stackoverflow.com/comment/41745710
downvote count: 0
score: 1
has body: the problem is that you have no 'Access-Control-Allow-Origin' You need to make a jsonp request so just modify your url adding &amp;callback=? and jQuery does the rest var url = "http://spreadsheets.google.com/feeds/list/1qPcO2SDbnyHcmxtbTb8DmG_f2_grEGIW1MaThSoFzFc/od6/public/values?alt=json&amp;callback=?"; This is the fiddle Regards!
has comment: http://stackoverflow.com/comment/41786581
has comment: http://stackoverflow.com/comment/41783474
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26303174
answers question: http://stackoverflow.com/q/26303174

http://stackoverflow.com/q/26311600
tagged with: javascript
score: 0
tagged with: node.js
has body: We have a Laravel project, however, some parts of the app do a lot of polling so we decided to introduce socket.io to the app. Laravel rests on Apache which listens on port 80 (we use jQuery and Bootstrap in the front end). Our local test hostname is test.localhost.com. The node server is just a server we created that listens on port 1000, with express and socket.io installed. In our Laravel page, we have the following include: &lt;script src="//localhost:1000/socket.io/socket.io.js"&gt;&lt;/script&gt;. As a test, we have the following code in our front end: &lt;script&gt; $(document).ready(function() { var socket = io(); $("#msg").keyup(function(event) { if (event.keyCode === 13) { socket.emit($("#msg").val()); $("#msg").val(''); } }); }); &lt;/script&gt; However, when I do try to send a message, nothing is received on the node side, but in the Chrome console I notice the following: GET http://test.localhost.com/socket.io?EIO=3&amp;transport=polling&amp;t=1413006253169-84 404 (Not Found) , with an error on line 2680 of socket.io.js. I open up the file and go to line 2680 and see xhr.send(this.data);. What's going on? Can I not mix the 2 code bases? And why is it trying to GET at test.localhost.com when in the import I'm using localhost:1000 (different host and different port)?
type: UnansweredQuestion
tagged with: php
tagged with: socket.io
type: Question
has answer: http://stackoverflow.com/a/26311659
answer count: 1
tagged with: websocket
has title: Mixing Laravel(PHP) with socket.io

http://stackoverflow.com/a/26318248
has body: you can get more than 2 values out of your php, there are some ways, i think the most popular though is with JSON. lets say in your php: $arr = array( "value_1"=&gt;46534, "value_2"=&gt;654 ); echo json_encode($arr); you will get the JSON object: {"value_1":46534,"value_2":"654"} and than you can use it like this in your promise $.ajax(...).success(function(data){ var value1 = data.value_1; var value2 = data.value_2; })
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26318044
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26318044

http://stackoverflow.com/comment/41184672
score: 0
type: AnswerComment
type: Comment
has text: I've tried it, but declaring $scope other than $resource in factory is impossible.
comment on: http://stackoverflow.com/a/26239720

http://stackoverflow.com/q/26262898
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41210024
has title: javascript stop onclick function propagation
has comment: http://stackoverflow.com/comment/41207573
score: 0
has body: I am developing an application in django, but I have a problem with JAVASCRIPT. By the way I am new in web development, I am beginninng to learn python an javascript. I have an html table rendered from django and I insert a drop down button in the first column of the table with this function function GetAllValues() { var tbl = document.getElementById("myTable"); for (var i = 1; i < tbl.rows.length; i++){ tbl.rows[i].cells[3].innerHTML = ' ' + tbl.rows[i].cells[3].innerHTML + ' Configura Recepcion de Archivos Carga de Archivos Detalle Conciliacion ' } Every button call a different function to redirect to another page with some forms. I use function like this to redirect to the forms: function configp(event){ var tbl = document.getElementById("myTable"); var rows = tbl.rows; var argu = ""; for (var i = 0; i < rows.length; i++){ rows[i].onclick = function(){ idpro = this.cells; argu = "?idprov="+idpro[0].innerHTML; window.location = "/config/"+argu; } } } the function take some values of the table and pass it as argument to the url. (why I am redirecting like this. Long history) My problem is the onclick propagation. I try putting return false before the last "}" in the configp() function and doesn't work. I try to stop the propagation using event.preventdefault() and e.stopPropagation() any of those method can stop the propagation. How can I stop the onclick propagation in the dropdown button Any advice THANKS IN ADVANCE UPDATE In simple words: when I click in the first option of the dropdown the function redirect me to the page that i want. if get back to the original page, no matters what option I clicked always redirect to the page where I was redirected to the page assigned to the first option. and the onclick event bubble in all the levels of the dropdown
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41209820
tagged with: http://stackoverflow.com/tag/html
tagged with: django
answer count: 0

http://stackoverflow.com/q/26200300
linked to: http://stackoverflow.com/q/500504
tagged with: arrays
downvote count: 0
score: 1
favorite count: 0
tagged with: multidimensional-array
type: Question
has answer: http://stackoverflow.com/a/26200359
upvote count: 1
answer count: 1
has title: JavaScript - how do i do the splice of a multidimensional array?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26200359
has body: How do i delete the 'test1' from db using the del function? var db = []; function add(input) { for(var key in db) { if(db[key][0]===input[0]) { return; } } db[db.length] = input; } function edit(input, upgrade) { for(var key in db) { if(db[key][0]===input) { db[key] = upgrade; } } } function del(input) { var index = db.indexOf(input); if (index !== -1) { db.splice(index, 1); } } add(['test1', 'online']); console.log(db); edit('test1', ['test1','offline']); console.log(db); del('test1'); // FAILED still shows old values console.log(db);
type: AnsweredQuestion

http://stackoverflow.com/a/26277875
answers question: http://stackoverflow.com/q/26276881
has comment: http://stackoverflow.com/comment/41228844
type: Answer
has body: When you're using type: POST, this will post it to the next site :-) The way i understand your question, you need the $category to be equal to the value of your select. I havent testet you script, but they way you do it: $category = 0; if(isset($_POST['event_filter'])){ $category = $_POST['event_filter']; } and then just a simple "SELECT * FROM {your category} WHERE {your_row_category} = $categori"
score: 0

http://stackoverflow.com/comment/41125366
type: Comment
type: QuestionComment
has text: Please delete this question since it was a typographical error in my part. Thanks.
comment on: http://stackoverflow.com/q/26221894
score: 0

http://stackoverflow.com/q/26335512
upvote count: 1
has comment: http://stackoverflow.com/comment/41340045
has comment: http://stackoverflow.com/comment/41334487
favorite count: 0
has body: I have developed a web application that contains a dashboard to display various reports and graphs based on user selections. The user is provided with checkboxes and radio buttons for operating on the reports as required. On selection of each checkbox and radio button, I am making an ajax call to display the report corresponding to the selections. The problem I am facing is when the user clicks on multiple checkboxes/radio button one by one in a series with a very small time gap (fraction of a second or a second), the requests are hit to the server in a series and the server responds to them in the same order. For example, if I have 2 radio buttons, one for pie chart and other for line graph, and the user clicks both of them in a series of small time gap, the server displays the pie chart first and within few milliseconds it is overwritten by the line graph. Is there a mechanism, which will enable me to override the latest request over all the earlier request? Notes: I do not want to hit the server continuously, at the same time, I do not want to provide a submit button (against the customer requirement). It would be great if I find a javascript/ajax mechanism that allows me to submit only the latest request to the server. I am using Java/J2EE Struts2 framework, javascript and ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26335821
tagged with: request
downvote count: 0
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/41334747
type: Question
tagged with: jakarta-ee
has comment: http://stackoverflow.com/comment/41336708
has answer: http://stackoverflow.com/a/26338986
tagged with: javascript
has title: Handling multiple requests from a same client in a series of small time frames
tagged with: ajax
answer count: 2
has comment: http://stackoverflow.com/comment/41336599

http://stackoverflow.com/a/65141137
score: 0
type: Answer
has body: you can use the confirm() to provide the cancel button. below is a simple example to use Cancel button click Me
answers question: http://stackoverflow.com/q/26281737

http://stackoverflow.com/comment/41331147
score: 0
has text: Okay @AAhad : i will try it out
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26333421

http://stackoverflow.com/comment/41357334
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26347914
has text: Please edit your answer to add an explanation of how your code works and how it solves the OP's problem. Many SO posters are newbies and will not understand the code you have posted.

http://stackoverflow.com/a/26418986
downvote count: 0
score: 1
has body: If I understand your questions correctly so That's one question. If not, what is the proper way to set up a basic call to an API in SailsJS? Service is quite right place for such case. And you can call your init method in config/bootstrap.js, or when user has log in or somewhere else. I need to wait until the token is retrieved before I can call an API method that requires it. Is this done via pubsub Yes, you can use pubsub, but it seems better to use promises. For example you can use this lib https://github.com/istavros/vowjs Can you use service calls inside of views? How? Does this even make sense? It seems like it might be useful for an API call. I think yes, but it seems you should not want it. It looks betted when templates works with controller passed data and nothing else. So use service in controller (or mb model) an then pass results to template.
upvote count: 1
answers question: http://stackoverflow.com/q/26289154
type: Answer
has comment: http://stackoverflow.com/comment/41502737

http://stackoverflow.com/comment/41198219
type: QuestionComment
has text: Cannot reproduce. Please make a minimal but complete example.
comment on: http://stackoverflow.com/q/26261499
score: 0
type: Comment

http://stackoverflow.com/comment/41206741
score: 6
has text: `=` should be `===` when doing a comparison... `=` will set the variable
comment on: http://stackoverflow.com/q/26265982
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41147212
comment on: http://stackoverflow.com/q/26233959
score: 0
type: Comment
type: QuestionComment
has text: Maybe you could use a loop on your array, store already done items in another by ID after checked if the item is not already in. Then do a merge function or google it.

http://stackoverflow.com/q/26276579
has body: In short: When I have a container and some inline-block divs, the container's width shrinks around the divs. But when the divs are too-long and therefore one of them goes to another line, the container width is rendered as 100%. In the picture the default behavior is the first one, whereas the desired behavior is the second one. Here is a fiddle with the example: http://jsfiddle.net/gzbx4upq/ See fiddle for desired results
favorite count: 0
has answer: http://stackoverflow.com/a/26277088
has title: Keep width of container that of the longest child
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41225596
tagged with: css
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26276963
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/41225825
tagged with: http://stackoverflow.com/tag/html
score: 1

http://stackoverflow.com/q/26234638
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/26234764
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26234760
answer count: 4
has title: Getting an array of JSON sub-objects and the angular way of looking for a match in an array.
downvote count: 0
has body: Question 1 Assume I am getting a JSON object scope.tagSet, which is in the following format. { Tags : [ {"TagID" : "ID1" , "TagName" : "Name1"}, {"TagID" : "ID2" , "TagName" : "Name2"}, {"TagID" : "ID3" , "TagName" : "Name3"} ] } Inside an angular directive I am making an array of all the values in TagName as follows. for(var i= 0; i &lt; scope.tagSet.Tags.length; i++){ scope.tagNames[i] = scope.tagSet.Tags[i].TagName; } Is looping through and assigning each the only option here? Or is there any other way which is more efficient. Question 2 Say that I've got the array tagNames[] My next job is to perform a search to check if a given variable varString exists in the array tagNames[] and return true or false accordingly. I know that scope.tagNames.indexOf(varString) will return -1 when there are no matches, but is it the angular way? Are these approaches considered good practice?
tagged with: javascript
has answer: http://stackoverflow.com/a/26234871
has comment: http://stackoverflow.com/comment/41148776
has answer: http://stackoverflow.com/a/26234756
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26234760
possible better answer: http://stackoverflow.com/a/26234871
score: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/41163100
has text: @tymeJV: ok.. I see.. Do you have any idea regarding this?
score: 0
comment on: http://stackoverflow.com/q/26242131
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41149447
type: Comment
comment on: http://stackoverflow.com/q/26234848
score: 0
type: QuestionComment
has text: `JSON` is a serialised version of a JavaScript object, so you probably mean "from JavaScript", not "from JSON".

http://stackoverflow.com/comment/41227235
type: QuestionComment
has text: thank you for your help! now I get it why I had the problem. Deleting the `sharedPosts: [subPostSchema]` and `originalPost: [subPostSchema]` from my `subPostSchema` worked
score: 0
comment on: http://stackoverflow.com/q/26276697
type: Comment

http://stackoverflow.com/q/26295514
has comment: http://stackoverflow.com/comment/41262858
has comment: http://stackoverflow.com/comment/41260589
has comment: http://stackoverflow.com/comment/41263398
has answer: http://stackoverflow.com/a/26297173
tagged with: node.js
has answer: http://stackoverflow.com/a/26336905
accepted answer: http://stackoverflow.com/a/26336905
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41260939
linked to: http://stackoverflow.com/q/25751723
possible better answer: http://stackoverflow.com/a/26297173
has comment: http://stackoverflow.com/comment/41263087
has comment: http://stackoverflow.com/comment/41260498
type: Question
tagged with: protractor
has comment: http://stackoverflow.com/comment/41261272
tagged with: javascript
has title: Nested Promises Stuck
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/41263294
has comment: http://stackoverflow.com/comment/41261242
tagged with: asynchronous
has body: The following code gets stuck: var Promise = require('promise'); var testPromise = function(){ return new Promise(function(fulfill, reject){ element.all(by.repeater('item in menu.items')).first().then(function(el){ console.log('test f'); fulfill(el); console.log('test fe'); }); }); }; ... called by the following: testPromise().then(function(el){ console.log('test successful '+el); }); The console prints test f test fe And get stuck no more code is executed. It never reaches the then although fulfill has been called. if using nested promises is an anti pattern then how do I do the following without a nested promise: var getMenuItemEl = function(itemName){ return new Promise(function(fulfill, reject){ var elFound; element.all(by.repeater('item in menu.items')).then(function(els){ async.each(els, function(el, callback){ el.getText().then(function(text){ console.log('getMenuItemEl:'+text); if(text === itemName){ elFound = el; } callback(); }); }, function(err){ console.log('complete '+elFound); if(elFound){ console.log('fulfill'); fulfill(elFound); console.log('after fulfill'); }else{ reject('no item found'); } }); }); }); }; This also gets stuck after the fulfill has been called
favorite count: 0
tagged with: promise
linked to: http://stackoverflow.com/q/23803743
has comment: http://stackoverflow.com/comment/41263127

http://stackoverflow.com/q/26329229
has title: AngularJS - Access promise data throughout application
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26329306
accepted answer: http://stackoverflow.com/a/26329306
type: Question
has body: I have a factory that makes an http get request: grey.factory('JiraData', function( $http ) { return { async: function( ) { return $http.get( 'js/testdata.json' ) .then( function( result ) { return result.data; }); } }; }); I would like to use the data returned above throughout my application, in various controllers and directives. What is the best way to do this? Can I store and manipulate the data in local/session storage or root scope? If so, what is the best way?
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: promise
tagged with: angularjs

http://stackoverflow.com/q/26323356
has answer: http://stackoverflow.com/a/26323404
tagged with: javascript
favorite count: 0
has title: How do I do a array group and count it, like in MySQL group by given column id?
tagged with: multidimensional-array
answer count: 3
accepted answer: http://stackoverflow.com/a/26323543
has comment: http://stackoverflow.com/comment/41311573
upvote count: 1
has comment: http://stackoverflow.com/comment/41311778
has comment: http://stackoverflow.com/comment/41311670
has answer: http://stackoverflow.com/a/26323584
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41311725
score: 1
has body: I have a large array as bellow, now I need to do a group by first column and count the total of that channel existence. For example: var original_db = [ ["channel1", "online"], ["channel2", "offline"], ["channel3", "online"], ["channel1", "online"], ["lot more"].... ] Expected result from the original result need to be: var custom_db = [ ["channel1", 2], ["channel2", 0], ["channel3", 1] ] EDIT: for(var key in original_db) { var i; for (i = 0; i &lt; original_db.length; i += 1) { if (original_db[i][0] === original_db[key][0]) { original_db.splice(i, 1); return; } } } console.log(original_db);
tagged with: duplicates
type: Question
has answer: http://stackoverflow.com/a/26323543
possible better answer: http://stackoverflow.com/a/26323404
downvote count: 0

http://stackoverflow.com/comment/41189298
comment on: http://stackoverflow.com/a/26256479
score: 1
type: AnswerComment
has text: If you mean the line below:`// THIS IS CALLED WHEN DATA ARE NOT AVAILABLE` Where The promise is being resolved regardless of what happened before it, Yes. I thought it's not relevant to the main issue of handling async tasks, but yea, that line shouldn't be there.
type: Comment

http://stackoverflow.com/comment/41193053
type: AnswerComment
type: Comment
has text: P.S. Downvoters on this answer have a) no sense of humour and b) no sense of the ridiculous :)
comment on: http://stackoverflow.com/a/26258948
score: 0

http://stackoverflow.com/comment/41132009
comment on: http://stackoverflow.com/a/26225223
has text: Perfect that's exactly what I needed. Also now I know what I can do with JSON (haven't every used it, or knew what it was/could do). @Matthias
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26286041
has comment: http://stackoverflow.com/comment/41243770
has comment: http://stackoverflow.com/comment/41243657
has comment: http://stackoverflow.com/comment/41243654
type: Question
tagged with: javascript
has title: function not working on firefox
score: 0
has comment: http://stackoverflow.com/comment/41243732
answer count: 1
has body: I have this function that is supposed to remove a image when dragged to a div, but it is not working on firefox and I don't know why. and I have the following error message on the console "uncaught exception: Syntax error, unrecognized expression: #[object HTMLDivElement]" $(function() { $('#img_garbage').droppable({ drop: function(event, ui) { console.log(ui); $(ui.draggable).remove(); if (event.srcElement == undefined){ var dragged = event.target; } else { dragged = event.srcElement.alt} console.log(dragged); deleteCookie(dragged); $("#"+dragged).remove(); } }); });
tagged with: jquery
has comment: http://stackoverflow.com/comment/41243703
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26286114

http://stackoverflow.com/a/26288513
has body: input elements would work well here. &lt;input id="theInputBox" type="text&gt; That will put an input box on the screen that the user can type into. To check the text in the input box, do document.getElementById('theInputBox').value Congrats on your first attempt at coding! I think making games is a great way to learn to code.
type: Answer
answers question: http://stackoverflow.com/q/26288413
score: 0

http://stackoverflow.com/comment/41354554
comment on: http://stackoverflow.com/q/26346344
score: 0
type: QuestionComment
type: Comment
has text: Solve what problem? You only said you're having trouble. What kind of trouble are you having?

http://stackoverflow.com/comment/41289344
comment on: http://stackoverflow.com/q/26310813
type: Comment
has text: Still a little stumped as to how to make this occur on the server side got a good tutorial i can dig through?
score: 0
type: QuestionComment

http://stackoverflow.com/q/26229822
has body: I have a parent element to which I applied ng-swipe-right and ng-swipe-left. The swipe functionality works well. One of the element's child element has some content that overflows hence scroll gets automatically applied to it. BUT now, this scroll has stopped working after I had applied the swipe functionality. When I remove the swipe, the scroll works. Can you please advice, how I can have the parent element to have the swipe functionality but its child element which has overflowing content to also retain its scroll functionality. NOTE: I've not used any plugin for applying scroll functionality, it automatically takes scroll.
tagged with: angularjs-ng-touch
upvote count: 2
has answer: http://stackoverflow.com/a/37813817
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/25241168
tagged with: android
score: 2
downvote count: 0
type: UnansweredQuestion
has title: $swipe on child elements conflict with scroll and scroll stops working in AngularJS
type: Question
tagged with: swipe

http://stackoverflow.com/comment/41235903
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26279356
type: Comment
has text: Hello dimmlight. It works great. May I just ask why the scrolling works but when I click on "about" and then on "testimonials" it wont work as expected as if the offset was wrong.

http://stackoverflow.com/comment/41525211
has text: thanks! That got the React tab to appear. I embellished it a little (i'm using Coffeescript): if typeof window isnt "undefined" window.React = React window.onload = -> React.renderComponent App(null), document.getElementById("container") return
score: 0
comment on: http://stackoverflow.com/a/26347762
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26219724
score: 0
has comment: http://stackoverflow.com/comment/41125918
has comment: http://stackoverflow.com/comment/41125636
type: Answer
has comment: http://stackoverflow.com/comment/41125984
has body: Just need to arrange the groups a little better while maintaining validity. This is trimmed to capture just the main 4 parts without delimiters. edit: If you don't want to match .js or .css without a filename, use this regex -> (?i)(https|http|ftp)://((?:[a-z0-9-]+\.)+(?:com|org|net))(?:/(?:([a-z0-9-]+(?:/?[a-z0-9-])*(?:\.(css|js))?))?)? otherwise use this one -> # /(?i)(https|http|ftp):\/\/((?:[a-z0-9-]+\.)+(?:com|org|net))(?:\/(?:([a-z0-9-]+(?:\/?[a-z0-9-])*)\/?)?(?:\.(css|js))?)?/ (?i) ( https | http | ftp ) # (1) :// ( # (2 start) (?: [a-z0-9-]+ \. )+ (?: com | org | net ) ) # (2 end) (?: / (?: ( # (3 start) [a-z0-9-]+ (?: /? [a-z0-9-] )* ) # (3 end) /? )? (?: \. ( css | js ) # (4) )? )?
answers question: http://stackoverflow.com/q/26218595
has comment: http://stackoverflow.com/comment/41126324
has comment: http://stackoverflow.com/comment/41126263

http://stackoverflow.com/a/26308227
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26308187
type: Answer
has body: var x = document.getElementsByClassName('daddy'); var d = x[0].children[0]; d.style.width = '5em'; Or if you had multiple daddy elements you could do var x = document.getElementsByClassName('daddy'); [].forEach.call(x, function(d) { d.children[0].style.width = '5em'; });
score: 2

http://stackoverflow.com/comment/41170175
score: 0
has text: Also, 2: jQuery [supports hyphen-separated CSS properties](http://api.jquery.com/css/#css-properties) in setters and getters, though the camelCase style allows the keys to be left unquoted.
comment on: http://stackoverflow.com/a/26245749
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26215688
tagged with: javascript
tagged with: jquery
has title: Flot Chart : Adding Checkbox's to Toggle Chart Series
tagged with: visual-studio-2013
type: UnansweredQuestion
tagged with: asp.net-mvc
has body: After setting up my first chart I'm looking to add check-boxs to toggle which series are selected. Flot provides an example here : http://www.flotcharts.org/flot/examples/series-toggle/ Now when i tried to replicate this I'm getting error: 'datasets' is undefined could anyone explain why?? Also bonus points if anyone can tell my why the legend still display's inside the graph? Chart Looks like : View Code : Chart Code: $(document).ready(function fetchData() { function onDataReceived(series) { console.log('recieved data now parsing the data'); var currentdata = $.parseJSON(series); //Testing console.log(currentdata); console.log("series sub-arrays"); console.log(currentdata[0]); console.log(currentdata[1]); console.log(currentdata[2]); var datasets = [ { label: "Current_Out", data: currentdata[0], yaxis: 2, color: '#00C932', points: { fillColor: "#00C932", show: true }, lines: { show: true } }, { label: "Temperature", data: currentdata[1], yaxis: 1, color: "#0062FF", points: { fillColor: "#0062FF", show: true }, lines: {show:true } }] var options = { legend: { show: true, placement: 'outsideGrid', container: $("#legend-container") }, lines: { show: true, fill: false, }, axisLabels: { show: true }, xaxes: [{ mode: "time", timeformat: "%H:%M:%S", axisLabel:'Date', axisLabelUseCanvas: false, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 5 }], yaxes: [{ position: "left", axisLabel:'Celcius', axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 5 }, { position: "right", axisLabel: 'mA' }], grid: { hoverable: true, clickable: true, borderWidth: 1 }, legend: { labelBoxBorderColor: "none", position: "right" }, points: { show: true, fillColor: "#000000" } }; $.plot($("#placeholder"), datasets, options); } $.ajax({ url: '/Ajax/GetGraphData', type: "GET", dataType: "json", success: onDataReceived, failure: function() { …
type: Question
score: 0
has answer: http://stackoverflow.com/a/26216802
answer count: 1
tagged with: flot

http://stackoverflow.com/comment/41192393
has text: It seems that bigInt ignores the radix parameter :( https://github.com/peterolson/BigInteger.js/blob/master/BigInteger.js#L317-L331 meaning I will have to 'monkey patch it', any idea how to convert a string in dec to a string in hex?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26258377

http://stackoverflow.com/q/26210560
has answer: http://stackoverflow.com/a/26210670
upvote count: 1
has answer: http://stackoverflow.com/a/26210813
has comment: http://stackoverflow.com/comment/41103944
type: Question
has comment: http://stackoverflow.com/comment/41103833
has comment: http://stackoverflow.com/comment/41103948
score: 1
possible better answer: http://stackoverflow.com/a/26210813
accepted answer: http://stackoverflow.com/a/26210670
answer count: 2
has body: I'm appending data to a table using the for loop: for (var i = 0; i < data.length; i++) { date = data[i].inv_Date; invDate = date.substring(0, 10); billNo = data[i].Bill_No; netAmt = parseFloat(data[i].Net_Amt).toFixed(2); paidAmt = parseFloat(data[i].Paid_Amt).toFixed(2); balance = (parseFloat(netAmt) - parseFloat(paidAmt)).toFixed(2); //id = "damt['+i+']" $("#invoiceDetailTbl tbody").append(" " + " " + invDate + " " + " " + billNo + " " + " " + netAmt + " " + " " + paidAmt + " " + " " + ' ' + " " + " " + ' ' + " " + " " + balance + " " + " " + '' + " " + " "); totalAmt = totalAmt + parseFloat(netAmt); totalBalance = totalBalance + parseFloat(balance); } I'm reading value of a textbox using: for (var i = 0; i < tableRowCount; i++) { var rowDisAmt = table.rows.item(i + 1).cells[4].innerText; } But I always get null value. How can I access textbox values inside a html tag?
downvote count: 0
has comment: http://stackoverflow.com/comment/41104021
tagged with: javascript
has title: read value from textbox inside html table cell
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26275566
accepted answer: http://stackoverflow.com/a/26276806
upvote count: 1
downvote count: 1
has body: I currently have markers displaying as below, but without the numbers that signify there is more than one item in that exact location. I would like the markers to display as shown below: I was able to in back-end group the items based on exact location and that is fine, but I can't seem to find a way to add the special number/count to show how many items are there without creating special images with numbers drawn in them. Ideas on how this could be done? One other direction if I can't doing it cleanly is use PIL to add the number to the image. Still I don't think that is ideal.
type: Question
type: AnsweredQuestion
tagged with: python-imaging-library
has title: Adding a number to a marker in Google Maps JS API
score: 0
tagged with: google-maps
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26276806

http://stackoverflow.com/a/26203223
has body: Try replacing: $text = str_replace('[a]' . $match . '[/a]', '' . $match_decode . '', $text); with: $str = file_get_contents($match_url); preg_match("/\<title\>(.*)\<\/title\>/",$str,$title); $text = str_replace('[a]' . $match . '[/a]', '' . $title[1] . '', $text); to get images: preg_match("/\<img\>(.*)\<\/img\>/",$str,$img); You will get an array in $img, you will have to loop through it: for($i=0; $i<count($img); $i++){ echo $img[$i]; }
accepted answer of: http://stackoverflow.com/q/26202990
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26202990
has comment: http://stackoverflow.com/comment/41105578
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41104829
has comment: http://stackoverflow.com/comment/41104304
has comment: http://stackoverflow.com/comment/41107814

http://stackoverflow.com/q/26199684
score: 3
has title: Correct JavaScript IF Else Syntax
has body: I am updating an existing JavaScript application. Part of this update involves formatting things better and cleaning up code. Right now this is one of the Functions which uses if() and else statements without all the correct brackets in place... I personbally hate it when people do this shorthand method and even more so when they mix it and use it sometimes and not others. THat is the case in this example code below. this.setFlags = function() { if (document.documentElement) this.dataCode = 3; else if (document.body &amp;&amp; typeof document.body.scrollTop != 'undefined') this.dataCode = 2; else if (this.e &amp;&amp; this.e.pageX != 'undefined') this.dataCode = 1; this.initialised = true; } I honestly do not know how to correctly add the brackets to this function, below is what I have but I am thinking it might not be correct. Can a JavaScript expert let me know? this.setFlags = function() { if (document.documentElement){ this.dataCode = 3; }else{ if (document.body &amp;&amp; typeof document.body.scrollTop != 'undefined'){ this.dataCode = 2; }else{ if (this.e &amp;&amp; this.e.pageX != 'undefined'){ this.dataCode = 1; } } } this.initialised = true; }
has answer: http://stackoverflow.com/a/26199710
upvote count: 3
has comment: http://stackoverflow.com/comment/41083762
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26199710
favorite count: 0
has comment: http://stackoverflow.com/comment/41083750
has comment: http://stackoverflow.com/comment/41083896
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/4797286
has answer: http://stackoverflow.com/a/26199696
accepted answer: http://stackoverflow.com/a/26199696
type: Question

http://stackoverflow.com/q/26339228
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26339914
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Can I combine isolated scope and inherited scope?
has body: is it possible to combine isolated scope and inherited scope? I have the following structure: app.module("app").directive("myParentDirective", function(){ return { //other directive properties controller: function($scope) { $scope.myFunc(){//function I want to call from child element //dostuff }; }, link: function($scope){ $scope.foos = ["foo", "bar"]; } }; }); app.module("app").directive("myDirective", function(){ return { //other directive properties scope : {foo: "="}, template: " doStuff ", controller: function($scope){ //need controller here to do other stuff as well}, link: function($scope){ $scope.doStuff = function() { //do stuff plus call myFunc $scope.myFunc();//declared in "parent scope". This does not work } } }; }); So yeah. Is there a way to do this? I use isolated scope to get "foo" from the ng-repeat of the parent scope's "foos"-array. Previously i have emitted an event from the child element and listened on the "parent", but i would rather do it using scope. Is there a way or do I need to use event?
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/26339914
type: Question
tagged with: angularjs-directive
tagged with: javascript

http://stackoverflow.com/q/26305186
has title: Multiple calls to WebGL drawElements result in incorrect rendering
has body: My Question is: Why does the same example WebGL code result in different output on different platforms/browsers? In Firefox 30.0 (and the latest one, 32) on Windows, but not on Mac, making multiple drawElements calls results in incorrect rendering when rendering points: Above Left: Firefox (incorrect). Above Right: Chrome (correct). I've re-created this issue (first encountered in a software project which I cannot share) by copying and adapting the sample code from: https://developer.mozilla.org/samples/webgl/sample5/index.html I then modified the sample code for maximum simplicity, removing all animation, and rendering three points instead of a cube, with three calls to drawElements, changing color with a uniform for each. gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, cubeVerticesIndexBuffer); setMatrixUniforms(); gl.uniform4f(colorUniformLoc,1.0,0.0,0.0,1.0); /***** gl.drawElements(gl.POINTS, 36, gl.UNSIGNED_SHORT, 0); //commented out, from original example. *****/ gl.drawElements(gl.POINTS, 1, gl.UNSIGNED_SHORT, 0); gl.uniform4f(colorUniformLoc,1.0,1.0,0.0,1.0); gl.drawElements(gl.POINTS, 1, gl.UNSIGNED_SHORT, 2); gl.uniform4f(colorUniformLoc,0.0,0.0,1.0,1.0); gl.drawElements(gl.POINTS, 1, gl.UNSIGNED_SHORT, 4); The three points rendered are supposed to be in a straight line: var vertices = [ // Front face -1.0, -1.0, 1.0, -1.5, -1.0, 1.0, -2.0, -1.0, 1.0, //more verts not shown... I've shared the complete source via a public google-drive folder for anyone who feels like being extremely helpful: https://drive.google.com/folderview?id=0B5OXnggcG9_7VlZHY003UzFYNGc&amp;usp=sharing Sadly, Firefox 30 is the platform used (non-negotiable) by our client, so no easy fix by changing browsers. Thank you for reading!
type: AnsweredQuestion
tagged with: webgl
type: Question
has answer: http://stackoverflow.com/a/26308990
tagged with: firefox
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26308990

http://stackoverflow.com/q/26247514
tagged with: browser-extension
favorite count: 0
accepted answer: http://stackoverflow.com/a/26254729
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: selenium
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41179023
type: Question
has comment: http://stackoverflow.com/comment/41174414
has body: I have made the most basic chrome extension that could use message passing. The extension should listen for messages from a website (localhost:8080/* here) and always respond "Bye". In the test selenium opens a locally served page with chrome which tries to send a message to the extension and then throws the response on the console: $ tree -I node_modules . ├── extension │ ├── background.js │ └── manifest.json ├── package.json └── test ├── index.html └── selenium-test.js 2 directories, 5 files background.js chrome.runtime.onMessage.addListener( function (req, sender, sendResp) { sendResp('Bye'); }); manifest.json { "name": "chrome-test", "version": "0.1", "manifest_version": 2, "key": "pcoogjpilcclcmejpkmbifdbihomlgec", "description": "Test extension.", "app": { "background": { "scripts": ["background.js"], "persistent": true } }, "externally_connectable": { "matches": [ "http://localhost:8080/*" ], "accepts_tls_channel_id": false }, "permissions": [ "http://localhost:8080/*" ] } package.json { "name": "chrome-test", "version": "0.0.5", "description": "Chrome API sucks.", "keywords": [ "" ], "author": "Chris Perivolaropoulos", "contributors": [], "dependencies": { "selenium-webdriver": "*", "mocha": "*", "chai": "*" }, "scripts": { "test": "mocha test/selenium-test.js" } } index.html Test page Test page selenium-test.js var assert = require('chai').assert, test = require('selenium-webdriver/testing'), webdriver = require('selenium-webdriver'), chromedriver = require('selenium-webdriver/chrome'); // @param extensions: string of unpacked extension path to install. function chrome_driver(extension) { var logperfs = new webdriver.logging.Preferences(), opts = new chromedriver.Options(). addArguments("--load-extension=" + extension || '../extension'); logperfs.setLevel(webdriver.logging.Type.BROWSER, webdriver.logging.Level.ALL); var chrome = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.chrome()). setChromeOptions(opts). setLoggingPrefs(logperfs). bui…
tagged with: javascript
has answer: http://stackoverflow.com/a/26254729
has title: Chrome onMessage listener always sends 'undefined' response
tagged with: google-chrome-extension
answer count: 1
downvote count: 0

http://stackoverflow.com/a/26329306
upvote count: 3
score: 3
has body: If you are asking a way to call the http.get function only one bug accessing the data more than once, one way is to save the promise on a variable. grey.factory('JiraData', function( $http ) { var promise; return { async: function( ) { if(!promise) { promise = $http.get( 'js/testdata.json' ) .then( function( result ) { return result.data; }); } return promise; } }; }); And then you can useit like: grey.controller('ACtrl', function( Jiradata ) { JiraData.async().then(function(returnData) { //your code }); } This way, the http request is only call once
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26329229
answers question: http://stackoverflow.com/q/26329229
type: Answer

http://stackoverflow.com/comment/41097046
has text: In any case, you just about *never* want to hook up to the `change` event when using Knockout. You should let KO handle changing your view model values when events fire in the DOM.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26206826
score: 2

http://stackoverflow.com/comment/41269971
comment on: http://stackoverflow.com/a/26300612
score: 1
type: AnswerComment
has text: +1 But the third expression could just as easily be something like `for(var i=length; i--;console.log(i));` (not that it's any clearer that way).
type: Comment

http://stackoverflow.com/comment/41213377
type: Comment
has text: You'd be surprised. It can save you a lot of time in your own code to find out where things went wrong if an exception is thrown and there's no handler for the exception nearby. It costs you little to use the Error class and it can save you a lot of time - even in your own code - at least that's been my experience.
comment on: http://stackoverflow.com/q/26261612
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41312910
type: Comment
comment on: http://stackoverflow.com/a/26324127
type: AnswerComment
has text: I am still getting this console error:'Uncaught SyntaxError: Unexpected string '
score: 0

http://stackoverflow.com/a/26214562
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26212994
accepted answer of: http://stackoverflow.com/q/26212994
score: 1
has body: As the documentation states, the callback receives an object containing the results: The callback parameter should be a function that looks like this: function(object items) {...}; object items Object with items in their key-value mappings. It is done in this way, because one get operation can retrieve more than one value. So in general, the code should look like this: chrome.storage.local.get('keyName', function(result) { /* use result.keyName */ }); And your code can be simplified to this: chrome.storage.local.get(['loginC', 'passC'], function(result) { if (result.loginC) { // Will catch both "" and undefined document.getElementById("login").value = result.loginC; } if (result.passC) { document.getElementById("pass").value = result.passC; } });
type: AcceptedAnswer

http://stackoverflow.com/comment/41146862
type: QuestionComment
has text: is the code wrapped in `$(document).ready(function() { ... });` or something equivalent?
comment on: http://stackoverflow.com/q/26233740
score: 0
type: Comment

http://stackoverflow.com/comment/41199302
type: QuestionComment
has text: Its default behaviour `` linking to ` ` on click. If you don't want that for what you need the ``?
score: 0
comment on: http://stackoverflow.com/q/26254314
type: Comment

http://stackoverflow.com/a/26198945
has body: I think the issue is with the first line of your js/cvAliboController.js : By doing var cvAliboManager = angular.module('cvAliboApp', []); you are redefininng your app without any dependency, i.e. without ngRoute, so you can't resolve the routes and nothing gets displayed. Try to recall it without the brackets : var cvAliboManager = angular.module('cvAliboApp');
type: Answer
answers question: http://stackoverflow.com/q/26198346
accepted answer of: http://stackoverflow.com/q/26198346
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41089218

http://stackoverflow.com/a/26293241
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: You can convert the include to an object with model and where properties User.findAll({ include: [ { model: Task where: { id: 1 } }] })
accepted answer of: http://stackoverflow.com/q/26275854
answers question: http://stackoverflow.com/q/26275854

http://stackoverflow.com/comment/41275437
score: 1
has text: Becase "this" is not the option so there is no data attribute
comment on: http://stackoverflow.com/q/26303304
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41121443
comment on: http://stackoverflow.com/a/26219910
type: AnswerComment
has text: That's different from what he's trying to do in the question, so I don't think it's relevant.
score: 1
type: Comment

http://stackoverflow.com/comment/41223215
type: QuestionComment
comment on: http://stackoverflow.com/q/26274424
has text: Grundy, thanks for commenting. I have added more details about the point in the post itself now.
score: 0
type: Comment

http://stackoverflow.com/a/26204782
score: 3
answers question: http://stackoverflow.com/q/26204694
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26204694
type: Answer
upvote count: 3
has body: If you do the hover on the parent instead, and move the overlay to within the wrapper, this will prevent the fading in of the overlay from triggering a second hover event. html, moving overlay inside of carousel-wrapper: &lt;div class="block-11 block-1"&gt; &lt;div class="carousel-wrapper" id="carousel-1"&gt; &lt;ul class="carousel clearfix"&gt; &lt;li&gt;&lt;img src="http://i.imgur.com/eTxMX2T.jpg" alt="" width="646" height="350"/&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="semitransparentoverlay"&gt; &lt;input name="" type="button" value="Show all" class="btn-1"/&gt; &lt;/div&gt; &lt;/div&gt; Jquery, targeting carousel-wrapper for hover: $(document).ready(function () { $('.carousel-wrapper').hover(function () { $(this).children('.semitransparentoverlay').fadeIn('200'); }, function () { $(this).children('.semitransparentoverlay').fadeOut('200'); }); }); Updated link: http://jsfiddle.net/carasin/1po0acv6/2/

http://stackoverflow.com/q/26352799
tagged with: java
has comment: http://stackoverflow.com/comment/41365354
type: Question
answer count: 2
score: -2
tagged with: javascript
tagged with: string
possible better answer: http://stackoverflow.com/a/26352895
downvote count: 2
has body: String MonthName = "" ; String DateName = "" ; String sign = "" ; String horoscope = "" ; Scanner scan = new Scanner(System.in); System.out.println("Please enter your month of birth as an integer: "); int month= scan.nextInt(); System.out.println(" "); System.out.println("Please enter your date of birth as an integer: "); int date = scan.nextInt(); System.out.println(" "); if (month == 1) { MonthName = "January"; } else if (month == 2) { MonthName = "February"; } else if (month == 3) { MonthName = "March"; } else if (month == 4) { MonthName = "April"; } else if (month == 5) { MonthName = "May" ; } else if (month == 6) { MonthName = "June" ; } else if (month == 7) { MonthName = "July" ; } else if (month == 8) { MonthName = "August" ; } else if (month == 9) { MonthName = "September" ; } else if (month == 10) { MonthName = "October" ; } else if (month == 11) { MonthName = "November" ; } else if (month == 12) { MonthName = "December" ; } if (date == 1) { DateName = "first"; } else if (date == 2) { DateName = "second" ; } else if (date == 3) { DateName = "third" ; } else if (date == 4) { DateName = "fourth" ; } else if (date == 5) { DateName = "fifth" ; } else if (date == 6) { DateName = "sixth" ; } else if (date == 7) { DateName = "seventh" ; } else if (date == 8) { DateName = "eighth" ; } else if (date == 9) { DateName = "nineth" ; } else if (date == 10) { DateName = "tenth"; } else if (date == 11) { DateName = "eleventh"; } else if (date == 12) { DateName = "twelfth"; } else if (date == 13) { DateName = "thirteenth"; } else if (date == 14) { DateName = "fourteenth"; } else if (date == 15) { DateName = "fifteenth" ; } else if (date == 16) { DateName = "sixteenth" ; } else if (date == 17) { DateName = "seventeenth" ; } else if (date == 18) { DateName = "eighteenth" ; } else if (date == 19) { DateName = "nineteenth"; } else if (date == 20) { DateName = "twentieth"; } else if (date == 21) { DateName = "twentyfirst"; } else if (date == 22) { DateName = "twentysecond"; } el…
favorite count: 0
has answer: http://stackoverflow.com/a/26352895
has title: For every single birth day, it types "Thirtyfirst" and says "DateName" is unused?
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26352837
accepted answer: http://stackoverflow.com/a/26352837

http://stackoverflow.com/a/26249312
type: Answer
has body: I found another solution which do accomplish the task and is also useful if you have many images. Here is the code. Might help someone out there, HTML Comments (3) Reply Report jQuery var sourceSwap = function() { var $this = $(this); var newSource = $this.data('swap'); $this.data('swap', $this.attr('src')); $this.attr('src', newSource); } $('.commentImg').hover(sourceSwap, sourceSwap); $('.replyImg').hover(sourceSwap, sourceSwap); $('.reportImg').hover(sourceSwap, sourceSwap);
answers question: http://stackoverflow.com/q/26249193
score: 0

http://stackoverflow.com/q/26270096
tagged with: angularjs-validation
tagged with: angularjs
has body: Problem, Somehow i can't get the validation right with AngularJs. I want just user input box to be red when required field is not present or wrong on submit. I have create a Plunker http://plnkr.co/edit/0ea77wRG3EJC13c22LLn. I have created a very simple Plunker, just to understand. &lt;input type="text" name="email" ng-model="userEmail" required&gt; Please help
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26270928
has answer: http://stackoverflow.com/a/26270819
has title: Input Validation in AngularJs Form
downvote count: 0
score: 1
type: Question
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: validation
linked to: http://stackoverflow.com/q/17452247
favorite count: 0

http://stackoverflow.com/q/26298644
downvote count: 1
has title: calling a server side function from javascript without using ajax
has answer: http://stackoverflow.com/a/26298734
has answer: http://stackoverflow.com/a/26298761
tagged with: c#
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26299112
has answer: http://stackoverflow.com/a/26299112
linked to: http://stackoverflow.com/q/3017394
type: Question
linked to: http://stackoverflow.com/q/5828803
score: 0
has comment: http://stackoverflow.com/comment/41266198
has comment: http://stackoverflow.com/comment/41266192
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26298734
has body: I am trying to do the following : function redirectContactOnClick(contactId) { var enc=&lt;%= QueryStringModule.Encrypt("cont="+ contactId)%&gt;; alert(enc); //window.location = "Contacts/AddEditContact.aspx"; } QueryStringModule.Encrypt is a function inside a c# class, the page raise an error saying :The name 'contactId' does not exist in the current context
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41266506
has comment: http://stackoverflow.com/comment/41268770
has comment: http://stackoverflow.com/comment/41266165
upvote count: 1

http://stackoverflow.com/a/26235364
has body: Try this : Instead of checking month like month==(1||3||5||7||8||10||12), you can have an array of matching values and use indexOf to check if month is equal to one of the value from array. $(function(){ $('#A').keyup(function(){ var array31=[1,3,5,7,8,10,12]; var array30=[4,6,9,11]; var number=$.trim($(this).val()); var d=new Date(); var month=d.getMonth()+1; var year=d.getFullYear(); var dDate=d.getDate()+parseInt(number)||0; if((year%4!=0) &amp;&amp; (month==2 &amp;&amp; dDate&gt;28)){ month=month+1; dDate=dDate-28; }else if((year%4==0) &amp;&amp; (month==2 &amp;&amp; dDate&gt;29)){ month=month+1; dDate=dDate-29; }else if(array31.indexOf(month)!=-1 &amp;&amp; dDate&gt;31){ month=month+1; dDate=parseInt(dDate)-31; }else if(array30.indexOf(month)!=-1 &amp;&amp; dDate&gt;30){ month=month+1; dDate=dDate-30; } $('#B').val(month+'/'+dDate+'/'+year); }) }); DEMO
type: Answer
answers question: http://stackoverflow.com/q/26235096
score: 0

http://stackoverflow.com/comment/41296400
score: 0
has text: Provide us the code of your content script, otherwise it's impossible to know what's causing the error. Most of the times, when running in `document_start`, scripts stop working because some elements haven't been loaded yet... but it's impossible to say without seeing your code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26314783

http://stackoverflow.com/a/26244176
has comment: http://stackoverflow.com/comment/41176367
has comment: http://stackoverflow.com/comment/41167681
answers question: http://stackoverflow.com/q/26243745
accepted answer of: http://stackoverflow.com/q/26243745
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41167989
score: 2
has body: How your JSON should be: { "people": [ { "name": "Jack", "age": "28", "weight": "75kg" }, { "name": "Jill", "age": "25", "weight": "66kg" } ] } How your call should be: $http.get('people.json').success(function(data){ names.people = data.people; }); The method you're using with $http.get for the success is something I don't typically do, so you're either looking at data.people or data.data.people depending on the response you received from the call. console.dir(data) Would give you a good look at the response being received.
upvote count: 2

http://stackoverflow.com/comment/41307365
comment on: http://stackoverflow.com/q/26321056
has text: @Shomz is right. You probably want to have a keyup event on `document`. But check for focus on the `div`.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26344581
answer count: 2
has comment: http://stackoverflow.com/comment/41350741
has title: JSON Data Parsing in JQuery Starting with an array
tagged with: parsing
favorite count: 0
possible better answer: http://stackoverflow.com/a/26344644
downvote count: 2
has answer: http://stackoverflow.com/a/26344644
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26344643
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has body: Before you mark this question as a duplicate please read it :) The problem I am having is the JSON file that I am using starts with an array so when I try to parse it I get this: Cannot read property '0' of undefined Here is the json file that I am trying to parse: http://data.police.uk/api/crimes-at-location?date=2014-1&amp;lat=52.629729&amp;lng=-1.131592 and this is the code I am using: var link = "http://data.police.uk/api/crimes-at-location?date=2014-1&amp;lat=52.629729&amp;lng=-1.131592"; $.getJSON(link, function (json) { // Set the variables from the results array var cat = json.data[0].catageroy; $("#location").replaceWith('Category : ', cat); }); HELP!!! Thanks
accepted answer: http://stackoverflow.com/a/26344643

http://stackoverflow.com/comment/41167622
comment on: http://stackoverflow.com/q/26244062
type: Comment
type: QuestionComment
score: 1
has text: What exactly do you want `$scope.titles` to look like

c3.js
tags question: http://stackoverflow.com/q/26340758
tag name: c3.js
type: Tag
tags question: http://stackoverflow.com/q/26352352

http://stackoverflow.com/comment/41347039
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26342470
type: Comment
has text: Thanks. I'm sure that will work. I tried this. But I really want to put individual and organization into searchBO, in the controller I have SearchBO type, Spring can just convert JSON to Java object automatically.

http://stackoverflow.com/comment/41260305
type: Comment
type: QuestionComment
has text: If that is exactly like how it is inside your code, then you need to unindent all of your code, and it will work. Jade code cannot start indented.
comment on: http://stackoverflow.com/q/26295405
score: 0

app-store
tag name: app-store
type: Tag
tags question: http://stackoverflow.com/q/26260313

http://stackoverflow.com/q/26318458
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26318515
tagged with: ajax
has body: I have a simple form with 2 input: &lt;form name="contact" id="contact"&gt; &lt;input type="text" id="firstName" name="firstName"/&gt; &lt;input type="text" id="lastName" name="lastName"/&gt; &lt;input type="submit" value="Send"/&gt; &lt;/form&gt; On submit I want using jQuery ajax method to send data to print.php. Code looks next: var contact=$("#contact"); contact.on("submit",function(event){ var firstName=$("#firstName").val(); var lastName=$("#firstName").val(); $.ajax({ type:"POST", url:"print.php", dataType:"json", data:{ fname:firstName, lname:lastName } }); }); I want that Print.php script simply prints sent data, but nothing is happening. Script looks next: &lt;?php $fname = $_POST['fname']; $lname=$_POST['lname']; echo $fname; ?&gt; Problem is obviusly in print.php.
score: 0
has comment: http://stackoverflow.com/comment/41303149
has comment: http://stackoverflow.com/comment/41303021
answer count: 4
has comment: http://stackoverflow.com/comment/41302671
has answer: http://stackoverflow.com/a/26318957
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41302973
has title: Sending data to server with $.ajax request
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41302760
type: Question
has answer: http://stackoverflow.com/a/26318788
has answer: http://stackoverflow.com/a/26318473

http://stackoverflow.com/comment/65961853
type: Comment
comment on: http://stackoverflow.com/a/26323426
score: 0
type: AnswerComment
has text: @Jaspal add the dropzone function into your function where you add dynamic elements from.

http://stackoverflow.com/q/26218130
has body: When i select an option I call a Javascript code with the onchange function. I send 2 parameters with it: //capaciteit.php function testfunction(week, id) { window.location.href = "capaciteitberekening.php?week=" + week + "&amp;id=" + id; } I call the file capaciteitberekening.php and send the parameters with it. then I try to get the both parameters with the $_GET function: //capaciteitberekening.php require ('capaciteit.php'); $id = $_GET['id']; $week = $_GET['week']; echo $id, $week; After I echo both $id and $week(to check if they are working) I call a query: //capaciteitberekening.php $datumbegin = mysql_query("SELECT * FROM capaciteit"); while($row = mysql_fetch_array($datumbegin)) { echo $row['DAGEN']; } When I try this on my website its only shows the echo of $id and $week. this code is working code since I use it somewhere else and it works fine there. this is the way i connect to my DB: require('auth.php');require_once('config.php');require_once('exec/pubs_exec.php'); $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); //Database openen if(!$link) die('Niet gelukt om verbinding te maken met de server: ' . mysql_error()); $db = mysql_select_db(DB_DATABASE); //Select database if(!$db) die("Selecteren van DB mislukt"); in config.php i set the values for DB_host, DB_USER, DB_PASSWORD and DB_DATABASE What am I doing wrong here?
has comment: http://stackoverflow.com/comment/41117944
score: 0
accepted answer: http://stackoverflow.com/a/26219815
tagged with: mysql
has comment: http://stackoverflow.com/comment/41118171
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41117851
has comment: http://stackoverflow.com/comment/41118293
tagged with: sql
answer count: 1
has title: SQL query does not work when called by window.location.href
has answer: http://stackoverflow.com/a/26219815
has comment: http://stackoverflow.com/comment/41118105
has comment: http://stackoverflow.com/comment/41117955
has comment: http://stackoverflow.com/comment/41117838
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/a/26259649
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26259601
has body: function getPropertyValue(obj, prop){ return obj[prop]; } var obj = { name: "tom", age: 23 } var name = getPropertyValue(obj,"name"); var age = getPropertyValue(obj,"age");
answers question: http://stackoverflow.com/q/26259601

acrobat
type: Tag
tag name: acrobat
tags question: http://stackoverflow.com/q/26256514

http://stackoverflow.com/comment/41373741
comment on: http://stackoverflow.com/a/26354049
has text: $(document).ready(function(){ }); this means when the page in ready i.e. loaded properly.It wont work without internet.to make it work without internet you have to download the latest jquery.min.js file from jquery site and place it in your project,and the use on pages where you need.
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/26338240
answer count: 1
has answer: http://stackoverflow.com/a/26340403
has comment: http://stackoverflow.com/comment/41341966
tagged with: animation
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26340403
type: Question
tagged with: javascript
has title: Animating 3 images in canvas
has comment: http://stackoverflow.com/comment/41341416
score: 0
has body: I need to animate 3 images of clouds in canvas, they should be moving on X axis and once they disappear on the right side they should reappear on the left. Each cloud should be on different X and Y axis starting positions and they should be moving with different speed. First I tried to create only 1 cloud animation and this is what I came up with: var canvas, context, docWidth, docHeight; window.onload = function(){ docWidth = window.innerWidth; docHeight = window.innerHeight canvas = document.getElementById('canvas'); context = canvas.getContext('2d') resizeCanvas(docWidth, docHeight); drawCloud(0, 0, docWidth, docHeight); } function resizeCanvas(width, height){ canvas.width = docWidth; canvas.height = docHeight; } function drawCloud(x,y,width, height){ var img = new Image(); img.src = 'images/cloud1.png'; img.onload = function(){ context.save(); context.clearRect(0,0,width,height); imageWidth = img.naturalWidth; imageHeight = img.naturalHeight; context.drawImage(img,x-imageWidth,10); context.restore(); if(x &gt;= width+imageWidth){ x=0-imageWidth/2; } else { x += 3; } var loopTimer = setTimeout('drawCloud('+x+','+y+','+width+','+height+')',24); } } This works just fine, I see the cloud animation, it disappears on the right side and reappears on the left. Now with 3 images that's where things get complicated. I tried an OOP approach: First in my Canvas element I tried to preload images: &lt;canvas id="canvas" width="0px" height="0px"&gt; &lt;script type="text/javascript"&gt; &lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!-- var images = new Array() function preload() { for (i = 0; i &lt; preload.arguments.length; i++) { images[i] = new Image() images[i].src = preload.arguments[i] } } preload( "images/cloud1.png", "images/cloud2.png", "images/cloud3.png" ) //--&gt;&lt;!]]&gt; &lt;/script&gt; &lt;/canvas&gt; Then I tried to create the Cloud objects: function Cloud (x, y, width, height, filename, velocity, rate) { this.x = x; this.y = y; this.width = width; this.height = heigh…
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26312406
accepted answer: http://stackoverflow.com/a/26315372
has body: I was toying with socket.io, ThreeJS, Javascript, and NodeJS to create a simple client/server using ThreeJS's graphics. I wasn't sure if all of these frameworks would even work together, but I decided to give it a shot since I've seen similar examples online before even though I cannot find a simple one to dissect or experiment with. It's mainly to experiment with, but I also wanted to make a small little concept-game as proof of what I've learned so far. I posted my code here: https://gist.github.com/netsider/63c414d83bd806b4e7eb Sorry if it's a little untidy, but I did my best to make it as readable as possible. Basically, right now the server-side NodeJS script seems to run fine (Run with "node server-alpha.js"), and the client script (client-alpha.html, which you can just open in a browser) connects to the server, and displays a list of users (who are also connected). However, my intention was for each user to be able to move his/her own cube around, and right now each cube only gets added to the screen (rather than being added, subtracted, and then added again - to give the illusion of movement). If you run both pieces of code and connected one or two users and move the arrow keys a few times for each, you'll see what I'm talking about. Can anybody help me with this? I tried several different ways to remove the cube (and remembered to call render(), after each)... but everything I tried didn't seem to work. It always resulted in the cubes just being added to the screen, and never subtracted. I added comments in the code to make things a little easier, as I know this is quite a bit of code to go through (if it's not your own, anyway). Thanks, any help would be greatly appreciated... as I'm really stuck trying to make the cubes just move. Also, I'm having trouble adding the Fly-Controls (FlyControls.js - it's commented out ATM), so if someone could tell me where I went wrong I'd appreciate that a lot also.
tagged with: node.js
tagged with: three.js
upvote count: 1
tagged with: socket.io
type: Question
type: AnsweredQuestion
score: 1
has title: ThreeJS, Websockets, and NodeJS Client/Server Experiment
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26315372

http://stackoverflow.com/comment/41327800
comment on: http://stackoverflow.com/a/26331931
type: AnswerComment
has text: they both define window[elm.id] behavior. they both complain about it too. ;)
score: 0
type: Comment

http://stackoverflow.com/a/63071322
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26283936
type: Answer
has comment: http://stackoverflow.com/comment/132929427
has body: For those who have two images, repeated, add background no-repeat as @BayyMekenique says but also change this line: code 'line-height: ' + this.height + 'px;', code to this: code 'line-height: ' + this.height % 2 + 'px;', code

http://stackoverflow.com/a/26342895
type: Answer
answers question: http://stackoverflow.com/q/26331896
has body: In TypeScript, all variables must be declared. You can declare it with declare var $; at the beginning of the file. Or you can use a definition file for jQuery: Download it ; Then, in your .ts file, include the definition file: /// &lt;reference path='jquery.d.ts' /&gt; // here the compiler known jQuery $(document).ready(/* ... */);
score: 0

http://stackoverflow.com/comment/41273221
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26287359
type: AnswerComment
has text: Updated answer using OHLC chart referenced in your edit.

http://stackoverflow.com/comment/52231526
type: Comment
has text: It just refers to hoisting of functions, which I think is fine and is how my angular style guide shows it. Hoisting of vars is not good. So declare all vars up top.
score: 1
comment on: http://stackoverflow.com/a/26321623
type: AnswerComment

http://stackoverflow.com/a/26312170
downvote count: 0
type: Answer
upvote count: 1
has body: You could use Javascript document.querySelectorAll('')! try this if (!document.querySelectorAll('body.posts.show').length &amp;&amp; !document.querySelectorAll('body.posts.edit').length &amp;&amp; !document.querySelectorAll('body.chunks.create').length) { // Something here } even better would be if (!document.querySelectorAll('body.posts.show, body.posts.edit, body.chunks.create').length) { // Something here }
score: 1
answers question: http://stackoverflow.com/q/26312119

http://stackoverflow.com/a/26286089
answers question: http://stackoverflow.com/q/26285928
score: 0
type: Answer
has body: The default option would be to use the PhoneGap Storage API PhoneGap Storage API This however is built on the W3C Web SQL Database Specification and W3C Web Storage API Specification, neither of which has been generally accepted by the community and as such is not supported across platforms. It does however work on iOS and Android. A more platform independent solution is Lawnchair. It is a third party, open source, local JSON data store. Lawnchair

http://stackoverflow.com/a/26262242
upvote count: 4
has body: The id_token is for the client - it has to be validated by the client (or by the identity token validation endpoint in idsrv if the client does not have the necessary crypto libraries). Afterwards you use the access token to access the resource.
downvote count: 0
has comment: http://stackoverflow.com/comment/41202260
has comment: http://stackoverflow.com/comment/41202620
answers question: http://stackoverflow.com/q/26259709
has comment: http://stackoverflow.com/comment/41200105
score: 4
accepted answer of: http://stackoverflow.com/q/26259709
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/69322185
type: Answer

http://stackoverflow.com/comment/41348675
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26343449
score: 0
has text: When are `win(r)` and `AlertFunction()` fired?

http://stackoverflow.com/a/26251805
answers question: http://stackoverflow.com/q/26238236
upvote count: 1
score: 1
has body: When reading this question the day after, one would think I was under the influence of drugs. I came up with a better solution that only uses javascript variables: VIEW: @using (Ajax.BeginForm("", "", new AjaxOptions { OnBegin = "$('#iconElement' + iconNumber).attr('class', 'fa fa-spinner fa-spin');", HttpMethod = "POST" })) { Html input here } I can now disable the form after submit to prevent multiple requests. Because I don't start the spinner directly in onclick I don't have to disable the buttons, (spinner wont start).
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26238236
type: Answer

http://stackoverflow.com/a/26339472
has comment: http://stackoverflow.com/comment/41344170
has comment: http://stackoverflow.com/comment/41345066
has comment: http://stackoverflow.com/comment/41368102
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26339378
answers question: http://stackoverflow.com/q/26339378
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41341657
has body: You need to use ajaxStart and ajaxStop like that: $(document) .ajaxStart(function () { myMask.show(); }) .ajaxStop(function () { myMask.hide(); });
has comment: http://stackoverflow.com/comment/41345322
type: Answer

http://stackoverflow.com/comment/41313079
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26324265
has text: Why don't you add a class to the body and then check if the page has that class and run the code only if the body has the class?
type: Comment

http://stackoverflow.com/q/26337196
tagged with: javascript
has body: In javascript, how to specify read only properties while using Object.create()?
score: 0
has comment: http://stackoverflow.com/comment/41338858
has title: Javascript object with read only properties
has comment: http://stackoverflow.com/comment/41337267
favorite count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41337446
tagged with: object
has answer: http://stackoverflow.com/a/26340657
type: Question
answer count: 1

http://stackoverflow.com/comment/41155921
score: 0
type: QuestionComment
type: Comment
has text: Here is a JSFiddle of your page to make it easier for others to play with: http://jsfiddle.net/TrueBlueAussie/m9ng6jv5/
comment on: http://stackoverflow.com/q/26237922

http://stackoverflow.com/a/26304642
has body: In express 4, you construct your routes using routers. So, say you have routes/index.js and routes/foo.js, they would look something like this: // routes/index.js var router = require('express').Router(); router.get('/', function(req, res){ res.send('Hello!'); }); module.exports = router; // routes/foo.js var router = require('express').Router(); router.get('/bar', function(req, res){ res.send('foobar'); }); module.exports = router; In your main server file you can then app.use these routers, attaching them at various places. You could also do router.use to attach routers to routers (e.g. /users/user-id/pictures/picture-id kind of routes). // server.js var http = require('http'); var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use('/', require('./routes/index')); app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); app.use('/foo', require('./routes/foo')); app.listen(3000); And you should now be able to GET / and GET /foo/bar. For a bit more technical correctness, you should also be including middleware only on routes that need it. You can do this per router, or per endpoint. router.use(bodyParser.json()); // or router.route('/baz') .use(bodyParser.json()) .post(function(req, res){ res.status(201).json(req.body); }); This is generally good to do, but also can be very important in some cases, e.g. handling file uploads.
answers question: http://stackoverflow.com/q/26304263
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26304263
type: Answer
upvote count: 2

http://stackoverflow.com/a/26347691
has comment: http://stackoverflow.com/comment/41383106
answers question: http://stackoverflow.com/q/26345135
has comment: http://stackoverflow.com/comment/41390415
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41369365
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26345135
type: Answer
score: 2
has body: EDIT: Found that overriding the initTools method is a better solutions for this EDIT 2: Supports both ExtJS 4.2 and ExtJS 5.x Ext.create('Ext.panel.Panel', { width : 500, height: 500, title : 'Panel', renderTo: Ext.getBody(), closable : true, collapsible : true, collapseFirst : false, tools: [{ type : 'gear' }], initTools: function() { var me = this, tools = me.tools, i, tool; me.tools = []; for (i = tools &amp;&amp; tools.length; i; ) { --i; me.tools[i] = tool = tools[i]; tool.toolOwner = me; } // Add a collapse tool unless configured to not show a collapse tool // or to not even show a header. if (me.collapsible &amp;&amp; !(me.hideCollapseTool || me.header === false || me.preventHeader)) { if (Ext.getVersion().major == '4') { me.collapseDirection = me.collapseDirection || me.headerPosition || 'top'; me.collapseTool = me.expandTool = Ext.widget({ xtype: 'tool', handler: me.toggleCollapse, scope: me }); me.updateCollapseTool(); // Prepend collapse tool is configured to do so. if (me.collapseFirst) { me.tools.unshift(me.collapseTool); } } else { me.updateCollapseTool(); // Prepend collapse tool is configured to do so. if (me.collapseFirst) { me.tools.unshift(me.collapseTool); } } } if (me.pinnable) { me.initPinnable(); } // Add subclass-specific tools. me.addTools(); // Append collapse tool if needed. if (me.collapseTool &amp;&amp; !me.collapseFirst) { me.addTool(me.collapseTool); } // Make Panel closable. if (me.closable) { me.addClsWithUI('closable'); me.addTool({ xtype : 'tool', type: 'close', scope: me, handler: me.close }); } } });
has comment: http://stackoverflow.com/comment/41390824

http://stackoverflow.com/comment/41134636
type: QuestionComment
comment on: http://stackoverflow.com/q/26226773
has text: Wrong forum, a mod will correct that. But yes, you would overlay the "style" on the character. As long as the overlays are transparent, it would be fine. To optimize you could "cache" the character with the overlay applied. But again, wrong forum, and have no clue what Phaser is.
score: 0
type: Comment

http://stackoverflow.com/a/46847832
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/26203725
type: Answer
has body: This worked for me: just simply add the webpack middlewares first and the app.get('*'... index.html resolver later, so express will first check if the request matches one of the routes provided by webpack (like: /dist/bundle.js or /__webpack_hmr_) and if not, then it will move to the index.html with the * resolver. ie: app.use(require('webpack-dev-middleware')(compiler, { publicPath: webpackConfig.output.publicPath, })) app.use(require('webpack-hot-middleware')(compiler)) app.get('*', function(req, res) { sendSomeHtml(res) })
downvote count: 1

http://stackoverflow.com/q/26301425
score: 2
type: AnsweredQuestion
type: Question
has body: I want to update the tooltip date format dynamically. Like on button click event the tooltip date format will be change to another one. Check out my html: changeDateFormat on Click the button date format chang to %m-%d-%y Javascript $(function () { $('#container').highcharts({ xAxis: { type: 'datetime' }, tooltip: { xDateFormat: '%Y-%m-%d', shared: true }, plotOptions: { series: { pointStart: Date.UTC(2012, 0, 1), pointInterval: 24 * 3600 * 1000 } }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4].reverse() }] }); }); http://jsfiddle.net/hL8ae0yr/
answer count: 2
tagged with: highcharts
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26302784
tagged with: jquery
has answer: http://stackoverflow.com/a/26337021
has answer: http://stackoverflow.com/a/26302784
downvote count: 0
has title: Dynamically update tooltip date format highchart
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/26337021

java
tags question: http://stackoverflow.com/q/26336029
tags question: http://stackoverflow.com/q/26252776
tags question: http://stackoverflow.com/q/26307545
tags question: http://stackoverflow.com/q/26318856
tags question: http://stackoverflow.com/q/26201817
tags question: http://stackoverflow.com/q/26294656
tags question: http://stackoverflow.com/q/26258482
tags question: http://stackoverflow.com/q/26213957
tags question: http://stackoverflow.com/q/26352799
tags question: http://stackoverflow.com/q/26302134
tags question: http://stackoverflow.com/q/26316556
tags question: http://stackoverflow.com/q/26235957
tags question: http://stackoverflow.com/q/26316966
tags question: http://stackoverflow.com/q/26282487
tags question: http://stackoverflow.com/q/26327907
tags question: http://stackoverflow.com/q/26350330
tags question: http://stackoverflow.com/q/26319302
tags question: http://stackoverflow.com/q/26204654
tags question: http://stackoverflow.com/q/26240953
tags question: http://stackoverflow.com/q/26288818
tags question: http://stackoverflow.com/q/26306671
tags question: http://stackoverflow.com/q/26328755
tags question: http://stackoverflow.com/q/26194729
tags question: http://stackoverflow.com/q/26230475
tags question: http://stackoverflow.com/q/26291324
tags question: http://stackoverflow.com/q/26203222
tags question: http://stackoverflow.com/q/26331232
tags question: http://stackoverflow.com/q/26231513
tags question: http://stackoverflow.com/q/26335512
tags question: http://stackoverflow.com/q/26240344
tags question: http://stackoverflow.com/q/26344596
tags question: http://stackoverflow.com/q/26310620
tags question: http://stackoverflow.com/q/26223914
tags question: http://stackoverflow.com/q/26207151
tags question: http://stackoverflow.com/q/26299298
tags question: http://stackoverflow.com/q/26212323
tag name: java
tags question: http://stackoverflow.com/q/26307572
tags question: http://stackoverflow.com/q/26310691
tags question: http://stackoverflow.com/q/26218232
tags question: http://stackoverflow.com/q/26236045
tags question: http://stackoverflow.com/q/26283525
tags question: http://stackoverflow.com/q/26308242
tags question: http://stackoverflow.com/q/26260775
tags question: http://stackoverflow.com/q/26200166
tags question: http://stackoverflow.com/q/26268048
tags question: http://stackoverflow.com/q/26207583
tags question: http://stackoverflow.com/q/26324558
tags question: http://stackoverflow.com/q/26246037
tags question: http://stackoverflow.com/q/26311470
tags question: http://stackoverflow.com/q/26229424
type: Tag
tags question: http://stackoverflow.com/q/26274531
tags question: http://stackoverflow.com/q/26273223
tags question: http://stackoverflow.com/q/26249230
tags question: http://stackoverflow.com/q/26277049
tags question: http://stackoverflow.com/q/26303538
tags question: http://stackoverflow.com/q/26329503
tags question: http://stackoverflow.com/q/26236015

http://stackoverflow.com/q/26218849
upvote count: 1
tagged with: twitter-bootstrap-2
has title: bootstrap datepicker plugin issue
has answer: http://stackoverflow.com/a/26219767
score: 1
type: Question
tagged with: validation
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: datepicker
has body: I use a template that uses Bootstrap 2. That template has the datepicker plugin and the validation field plugin. I need to get the date user entered from datepicker so I can validate it. Problem is that It's not reading it at once, I have to click twice in order to do this. So because of this, integration with validation plugin is not working as it should work. It validates after the second click I mention...What can be wrong? html snippet: &lt;div class="span6"&gt; &lt;div class="control-group"&gt; &lt;label class="control-label"&gt;V&amp;aacute;lido Desde&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;div class="controls"&gt; &lt;div class="input-icon left"&gt; &lt;i class="icon-calendar"&gt;&lt;/i&gt; &lt;input class="m-wrap m-ctrl-medium date-picker" size="16" type="text" value="{$okInfo['start_date']}" placeholder="dd/mm/yyyy" id="start_date" name="start_date" data-date="" data-date-format="dd/mm/yyyy"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; then I have a js file from the plugin (snippet): if (jQuery().datepicker) { $('.date-picker').datepicker({ rtl : App.isRTL(), autoclose: true, }); } and finally the validation file: var FormValidation = function () { var handleValidation2 = function() { var form2 = $('#form_sample_2'); var error2 = $('.alert-error', form2); var success2 = $('#myModal', form2); form2.validate({ errorElement: 'span', //default input error message container errorClass: 'help-inline', // default input error message class focusInvalid: false, // do not focus the last invalid input ignore: "", onfocusout: function (element) { $(element).valid(); }, rules: { start_date: { required: true, valid_date: true }, },
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41092335
comment on: http://stackoverflow.com/q/26204527
score: 0
type: Comment
type: QuestionComment
has text: [http://i.imgur.com/gqiJWC7.jpg](http://i.imgur.com/gqiJWC7.jpg) I made it visual of what I'm trying to do.

http://stackoverflow.com/comment/41138090
type: Comment
score: 1
has text: Yes True but to give an idea I've just given one work around to disable the past time and another case to disable the past hours and minutes after selecting date. Tomorrow I'll look into your future minutes case :)
type: AnswerComment
comment on: http://stackoverflow.com/a/26227039

http://stackoverflow.com/comment/42811168
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26288047
has text: @aarosil: Is `methodOverride` not needed at all then? Could you remove it from your answer if that's the case?
type: AnswerComment

http://stackoverflow.com/comment/41323473
type: AnswerComment
has text: I'm only allowed to use conditional statement, i have updated the code and add:else if (isNaN(age) == true || !age) alert('please enter a valid entry'); but when i enter 0 it still output error
type: Comment
comment on: http://stackoverflow.com/a/26329141
score: 0

http://stackoverflow.com/a/26290188
answers question: http://stackoverflow.com/q/26290126
has body: Your socket server is not using SSL. First, add the secure parameter to your client (maybe redundant with the https but SSL+socket.io does weird stuff sometimes): var socket = io.connect('https://localhost', {secure: true}); Then, you need your socket to be secure too : var privateKey = fs.readFileSync('YOUR SSL KEY').toString(); var certificate = fs.readFileSync('YOUR SSL CRT').toString(); var ca = fs.readFileSync('YOUR SSL CA').toString(); var io = require('socket.io').listen(3456,{key:privateKey,cert:certificate,ca:ca});
downvote count: 3
upvote count: 1
score: -2
has comment: http://stackoverflow.com/comment/41251403
has comment: http://stackoverflow.com/comment/41251385
type: Answer

http://stackoverflow.com/comment/41367843
comment on: http://stackoverflow.com/a/26354010
score: 0
type: AnswerComment
type: Comment
has text: what will be 'location.protocol' and "#!" ?

http://stackoverflow.com/a/26229034
type: Answer
accepted answer of: http://stackoverflow.com/q/26228910
answers question: http://stackoverflow.com/q/26228910
has comment: http://stackoverflow.com/comment/41139354
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41139105
has body: Mage::helper('payment')-&gt;__('Credit Card Number') =&gt; substr($info-&gt;getCcNumber(),0,-4).'***',
has comment: http://stackoverflow.com/comment/41139525

http://stackoverflow.com/q/26235187
tagged with: javascript
has comment: http://stackoverflow.com/comment/41149433
has comment: http://stackoverflow.com/comment/41151645
has comment: http://stackoverflow.com/comment/41149483
has body: I want to change a css class attributes on a specific page, but I can't get it to work My code is this. if ( is_page(877) ) { //change CSS Class } else if ( is_page(970) ) { //change CSS Class } else { // Same CSS } I have tried all these insde the IFs but nothing. document.getElementById('header-aside').className = 'header-two-aside2'; document.getElementById('header-aside').classList.add('header-two-aside2'); $('#header-aside').removeClass('header-two-aside'); $('#header-aside').addClass('header-two-aside'); What Can I do?
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/41151764
answer count: 1
has comment: http://stackoverflow.com/comment/41149455
favorite count: 0
accepted answer: http://stackoverflow.com/a/26236017
score: -4
has comment: http://stackoverflow.com/comment/41151810
has comment: http://stackoverflow.com/comment/41149444
tagged with: css
has comment: http://stackoverflow.com/comment/41154927
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41149543
has comment: http://stackoverflow.com/comment/41149424
has comment: http://stackoverflow.com/comment/41151627
type: Question
has comment: http://stackoverflow.com/comment/41149480
has answer: http://stackoverflow.com/a/26236017
has comment: http://stackoverflow.com/comment/41149494
has title: Change CSS Class through Javascript or php

cordova
tags question: http://stackoverflow.com/q/26195965
tags question: http://stackoverflow.com/q/26283911
tags question: http://stackoverflow.com/q/26286462
tags question: http://stackoverflow.com/q/26272560
tags question: http://stackoverflow.com/q/26205535
tags question: http://stackoverflow.com/q/26290528
tags question: http://stackoverflow.com/q/26262048
tags question: http://stackoverflow.com/q/26348330
tags question: http://stackoverflow.com/q/26339909
tags question: http://stackoverflow.com/q/26215984
tags question: http://stackoverflow.com/q/26254123
tags question: http://stackoverflow.com/q/26331443
tags question: http://stackoverflow.com/q/26287928
tags question: http://stackoverflow.com/q/26240735
tags question: http://stackoverflow.com/q/26313173
tags question: http://stackoverflow.com/q/26322685
tags question: http://stackoverflow.com/q/26336592
tags question: http://stackoverflow.com/q/26202343
tags question: http://stackoverflow.com/q/26207652
tags question: http://stackoverflow.com/q/26275130
tags question: http://stackoverflow.com/q/26339389
tags question: http://stackoverflow.com/q/26239325
tags question: http://stackoverflow.com/q/26257342
tags question: http://stackoverflow.com/q/26321810
tags question: http://stackoverflow.com/q/26329292
tags question: http://stackoverflow.com/q/26333691
tags question: http://stackoverflow.com/q/26264644
tags question: http://stackoverflow.com/q/26250556
tag name: cordova
tags question: http://stackoverflow.com/q/26242400
tags question: http://stackoverflow.com/q/26265021
tags question: http://stackoverflow.com/q/26217509
tags question: http://stackoverflow.com/q/26314325
tags question: http://stackoverflow.com/q/26216075
tags question: http://stackoverflow.com/q/26233012
tags question: http://stackoverflow.com/q/26255002
tags question: http://stackoverflow.com/q/26303277
tags question: http://stackoverflow.com/q/26223914
tags question: http://stackoverflow.com/q/26282357
tags question: http://stackoverflow.com/q/26304729
tags question: http://stackoverflow.com/q/26293711
tags question: http://stackoverflow.com/q/26230516
tags question: http://stackoverflow.com/q/26233428
tags question: http://stackoverflow.com/q/26209975
tags question: http://stackoverflow.com/q/26292291
tags question: http://stackoverflow.com/q/26285928
tags question: http://stackoverflow.com/q/26349697
tags question: http://stackoverflow.com/q/26303900
tags question: http://stackoverflow.com/q/26217809
tags question: http://stackoverflow.com/q/26225694
tags question: http://stackoverflow.com/q/26297479
tags question: http://stackoverflow.com/q/26257349
tags question: http://stackoverflow.com/q/26260313
tags question: http://stackoverflow.com/q/26232709
tags question: http://stackoverflow.com/q/26241611
type: Tag
tags question: http://stackoverflow.com/q/26243013
tags question: http://stackoverflow.com/q/26220013
tags question: http://stackoverflow.com/q/26287849
tags question: http://stackoverflow.com/q/26274138
tags question: http://stackoverflow.com/q/26269297
tags question: http://stackoverflow.com/q/26210801

http://stackoverflow.com/q/26202082
has comment: http://stackoverflow.com/comment/41087967
has comment: http://stackoverflow.com/comment/41096595
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26202158
has body: 3D array // Array var x = { "letter": [ "a", "b", "c", "d", "e", "f", "g", "h", "i" ], "line": [ { "data": [ 306, 830, 377, 651, 547, 369, 300, 148, 494 ] }, { "data": [ 88, 339, 298, 87, 96, 108, 93, 182, 64 ] }, { "data": [ 3157, 2943, 2724, 2116, 3700, 2980, 2449, 2494, 1057 ] }, { "data": [ 2006, 1921, 2030, 615, 273, 415, 680, 286, 730 ] } ] }; Some variables // Variables var line = x.line; var data = []; for (var i = 0; i < line.length; i++) { data.push(line[i].data); } The actual code in question // Existing code (only works on fixed number of array objects, but I want something that will work on any number of objects) var listData = []; for (var i = 0; i < line.length; i++) { listData.push(''); } for (var i = 0; i < data[0].length; i++) { listData[0] += ' ' + data[0][i] + ' '; listData[1] += ' ' + data[1][i] + ' '; listData[2] += ' ' + data[2][i] + ' '; listData[3] += ' ' + data[3][i] + ' '; } // Perhaps something like this? This is where I got stuck... var listData = []; for (var i = 0; i < line.length; i++) { listData.push(''); listData[i] += ' ' + data[i][/* ??? */] + ' '; } I want to simplify the line[data] objects into one array, wrapping each of the data objects' values in an html tag, then concatenating them into one string per object. So that listData looks like below: Desired result listData == [ " 306 830 377 651 547 369 300 148 494 ", " 88 339 298 87 96 108 93 182 64 ", " 3157 2943 2724 2116 3700 2980 2449 2494 1057 ", " 2006 1921 2030 615 273 415 680 286 730 " ] But I want to do it in a way that would work not just with 4 data objects, but any number of them originally in x. You can see that I did it with the 4 objects that are there, but can't figure out how to do it programmatically. If you can please use my existing variables, I'd be extra appreciative! Thanks.
upvote count: 1
has comment: http://stackoverflow.com/comment/41087986
answer count: 1
has comment: http://stackoverflow.com/comment/41097873
favorite count: 0
has comment: http://stackoverflow.com/comment/41088033
tagged with: multidimensional-array
has comment: http://stackoverflow.com/comment/41088022
has title: JavaScript: Concatenate 3D array into 2D array, wrapping values in html tags
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/41716355
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26274663
type: Comment
has text: Thanks! That worked for me. I thought there's more general solution like titile="Toggle: { model.brandName } { model.productName }", but seem like there isn't

http://stackoverflow.com/q/26346746
answer count: 1
downvote count: 0
tagged with: hapi.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26437251
favorite count: 0
has answer: http://stackoverflow.com/a/26437251
type: AnsweredQuestion
tagged with: phantomjs
has body: I am using phantomjs-node and it is, unfortunately, not playing well with lab's test coverage stuff. When I run lab -t 100, it is trying to inject __$$labCov into the function passed to page.evalute(). However, that function is not executed in the context of the code in which it appears. It is executed in the context of the phantom browser. So, in my code that is being tested, if I have this in the midst of my PhantomJS code: page.evaluate( function () { return 'foo'; }, function (result) { // Do something with result here ph.exit(); } ); In the second function, result should be the string "foo". And that's what happens when I just run the code. But if I run it via lab -t 100, it is null and I get "phantom stdout: ReferenceError: Can't find variable: __$$labCov". Is there a way to tell lab, "Hey, I know this one line looks like code that yo u want to make sure gets run, but really, don't worry about this little function here, it's not for you."? Alternately, is there a way I can access __$$labCov so that I can make it available to the sandboxed function? Phantom let's you do it like this: page.evaluate( function (__$$labCOv) { return 'foo'; }, function (result) { // Do something with result here ph.exit(); }, __$$labCov ); But that doesn't work because I don't have access to __$$labCov...
score: 4
type: Question
upvote count: 4
has title: phantomjs-node + lab (test utility from hapijs) + test coverage

http://stackoverflow.com/comment/111639210
type: Comment
has text: @Luke Thank you! Missed some lines!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/60190712

http://stackoverflow.com/comment/41270612
has text: @anusha As I wrote in the post, I can remove the entire textarea and keep the label, and the events are not fired. It is as if just using a f.something disables the events
comment on: http://stackoverflow.com/q/26300499
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26341794
has comment: http://stackoverflow.com/comment/41346777
has comment: http://stackoverflow.com/comment/41347221
has comment: http://stackoverflow.com/comment/41346870
has comment: http://stackoverflow.com/comment/41345985
score: 1
has comment: http://stackoverflow.com/comment/41345710
has comment: http://stackoverflow.com/comment/41346961
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41347188
has comment: http://stackoverflow.com/comment/41347296
answers question: http://stackoverflow.com/q/26341383
has comment: http://stackoverflow.com/comment/41346990
accepted answer of: http://stackoverflow.com/q/26341383
has comment: http://stackoverflow.com/comment/41345934
has body: After my comments, I think this would be a quick fix to your problem: $('.address').each(function(index) { address = new newAddress($('.address').eq(index).val(), $('.address2').eq(index).val(), $('.city').eq(index).val(), $('.state').eq(index).val(), $('.zip').eq(index).val(), $('.addr_from_month').eq(index).val(), $('.addr_from_year').eq(index).val(), $('.addr_to_month').eq(index).val(), $('.addr_to_year').eq(index).val()); addresses.push(address); //build the addresses array of objects }); Update Another way would be using .map() to return the array in one go. The code below would be everything you would need: var addresses = $('.form-control').map(function (index, element) { return { line1: $('.address').eq(index).val(), line2: $('.address2').eq(index).val(), city: $('.city').eq(index).val(), state: $('.state').eq(index).val(), zip: $('.zip').eq(index).val(), from_month: $('.addr_from_month').eq(index).val(), from_year: $('.addr_from_year').eq(index).val(), to_month: $('.addr_to_month').eq(index).val(), to_year: $('.addr_to_year').eq(index).val() }; }).get();
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41182326
score: 0
type: Comment
has text: Suggestion: Do not use attribute based handlers (like `onchange=`) to connect events when using jQuery. jQuery's alternatives, like `$('#section').change(function(){...});`, are much cleaner and keep the handler with the code.
type: QuestionComment
comment on: http://stackoverflow.com/q/26252727

http://stackoverflow.com/a/26216157
type: Answer
answers question: http://stackoverflow.com/q/26215739
upvote count: 1
downvote count: 0
score: 1
has body: try like this Remove this from markup onchange="javascript:getCities('&lt;%=BusinessID %&gt;');" and add in page_load protected void Page_Load(object sender, EventArgs e) { ddlAddressSPC.Attributes.Add("onchange", "getCities('" + BusinessID + "')"); }

http://stackoverflow.com/q/26233962
tagged with: javascript
has title: Nested templates failed when updating from knockout 2.3 to 3.2
score: 0
has body: I have a page using knockout 2.3.0 and nested templates that was working fine untill I updated it to version 3.2.0. If I strip away the rest of the page, the structure that fails looks like this: ... ... ** In this case, displayAddFieldTemplate resolves to "meta-add-template" that looks like this I have hardcoded $root.fieldValueIsVisible($data) to return true, so that the link should always be shown. This however, gives the following javascript error when I run it in the browser: Uncaught TypeError: Unable to process binding "template: function (){return { name:$root.displayAddFieldTemplate,data:$data} }" Message: undefined is not a function If I remove the data-bind from the meta-add-template, so that is looks like this it works as expected. Even if I inline a value into the data-bind it gives the same error message. So it fails for this template as well: Why does this not work as expected, and why did it stop working after the update from 2.3 to 3.2?
answer count: 1
has answer: http://stackoverflow.com/a/26235717
accepted answer: http://stackoverflow.com/a/26235717
linked to: http://stackoverflow.com/q/7911732
tagged with: templates
type: AnsweredQuestion
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41147744

http://stackoverflow.com/comment/41206063
score: 0
has text: @Scott Your use of built-in JavaScript methods like `Object.keys()` and `Array.prototype.forEach()` is way cooler anyways. As long as we don't have to support older versions of _that-browser-I-shall-not-mention-here_...
type: Comment
comment on: http://stackoverflow.com/a/26264385
type: AnswerComment

http://stackoverflow.com/comment/41368405
type: Comment
has text: @dizaraj What's the error you are getting? What does the execution log say?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26339476

http://stackoverflow.com/a/26345883
answers question: http://stackoverflow.com/q/26341650
has body: By using the Newtonsoft json serializer/deserializer this can be achieved. To serialize your model use as below. Name space: Newtonsoft.Json; var now = JsonConvert.SerializeObject( Model ); To deserialize, ViewModel vm = JsonConvert.DeserializeObject&lt;ViewModel&gt;( obj ); Here ViewModel is your view model. Hope it helps!
score: 0
type: Answer

http://stackoverflow.com/comment/41391173
comment on: http://stackoverflow.com/a/26338269
has text: All of the plugins are listed properly. And I found out some of them are being included. There's just one in particular, `com.oauthio.plugins.oauthio` that doesn't function properly. Not sure what to do with the question as it's technically now probably a different question -- one concerning a specific plugin.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26303258
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41275060
answers question: http://stackoverflow.com/q/26302879
accepted answer of: http://stackoverflow.com/q/26302879
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: well not sure if this is the intended result but your code does look a little off this should at least get the alert to show and hopefully get you on the right track function maaktable () { alert("Hey!"); var tablestart = document.createElement("table"); var tabrow = tablestart.appendChild(document.createElement("tr")); for (i = 0; i &lt; 6; i++) { //tabdata; tabrow.appendChild(document.createElement("td").innerText(amount[i])); } }

http://stackoverflow.com/comment/41148143
score: 0
type: Comment
type: QuestionComment
has text: In [this Fiddle](http://jsfiddle.net/86d1nx7x/3/) still happens?
comment on: http://stackoverflow.com/q/26234238

http://stackoverflow.com/q/26342933
type: Question
has body: I just want to hide field which I added to model sales.order.line and added it to sale.order.form. I tried below code: openerp.sales_extra = function(instance){ // module code goes here console.log('My module has been initialized'); var MODELS_TO_HIDE = ['sale.order.line']; openerp.web.FormView.include({ start: function() { // on_loaded: function(data) { var self = this; var ret = this._super.apply(this, arguments); var res_model = this.dataset.model; if ($.inArray(res_model, MODELS_TO_HIDE) != -1) { //this.$element.find('add_to_inv').remove(); this.$element.find('add_to_inv').hide();//this the field which i want to hide }; return ret; }, }); }; But I get the following error: Uncaught TypeError: Cannot read property 'include' of undefined Another Question if this field is boolean in my OpenERP module how to know if it checked or not in js?
tagged with: javascript
score: 0
answer count: 1
tagged with: openerp-7
type: UnansweredQuestion
has title: hide field in OpenERP module using javascript
has answer: http://stackoverflow.com/a/27985359

http://stackoverflow.com/comment/41242788
type: Comment
type: QuestionComment
has text: What about execute the function? `this.isReady = youngOrOld()` ?
comment on: http://stackoverflow.com/q/26285658
score: 0

http://stackoverflow.com/comment/41343249
score: 0
has text: Duplicate `id`s is invalid markup. The behavior is entirely undefined until the markup is fixed.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26340515

http://stackoverflow.com/comment/41200360
type: QuestionComment
has text: Making your code wait 3000 ms is rarely a good idea, you're better off using setTimeout(function(){$('.cw1a').css('display', 'none'); $('.cw1b').css('display', 'block')}, 3000);
comment on: http://stackoverflow.com/q/26257342
score: 0
type: Comment

http://stackoverflow.com/comment/41158100
score: 1
comment on: http://stackoverflow.com/q/26239566
type: QuestionComment
type: Comment
has text: If they have unique logins then it's simple. You can't rely on an IP address as, for example, corporate firewalls will set them equal .

http://stackoverflow.com/a/26222876
downvote count: 0
has comment: http://stackoverflow.com/comment/41152266
type: Answer
answers question: http://stackoverflow.com/q/26222745
upvote count: 3
score: 3
has body: The only good solution to save data when the user leaves the page is to continiously save data offline (localStorage) and alert the user if the data hasn't been saved to the server when they leave the page. The good thing about localStorage is that the data is saved to the browser even when the computer crashes or the connection is lost. When the user reconnects you can sync data back to the server. More about offline browser storage: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage http://diveintohtml5.info/storage.html

http://stackoverflow.com/a/60349323
has body: To only get the first name and last name you can first .split the string by the space so it turns into an array. And then you get the first and last name and add it together. const displayname = "abc pqr xyz"; const splitDisplayName = displayname.split(" "); const newDisplayName = splitDisplayName[0] + " " + splitDisplayName[2];
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26228592

http://stackoverflow.com/comment/41285998
has text: @SaniHuttunen, yes, the script was running in $(document).ready, but i removed it, and still the same problem.
comment on: http://stackoverflow.com/q/26309127
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41371868
type: AnswerComment
has text: Oh, you extend your question :) Is there any other extened option in form? Like ajax login or else, if i update code you cant close #hidden_part without an action
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26353792

http://stackoverflow.com/comment/41231240
has text: try to set the `min : '-10'` `max : '10'` and `value : '0'` for `#scaleSlider`
comment on: http://stackoverflow.com/q/26274711
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41186866
type: QuestionComment
type: Comment
has text: @Steve Thanks ! Also ahve read the mozilla docs. But what i can't make work is, getting the cookies value. On page 1 i set/make the cookie, but when i go to another page or so, i try to get the cookie, but it does nothing. Am i missing something here?
comment on: http://stackoverflow.com/q/26254935
score: 0

http://stackoverflow.com/a/26924157
type: Answer
score: 12
has body: The one solution that has so far worked flawlessly for me has been: $scope.uploader.onBeforeUploadItem = onBeforeUploadItem; function onBeforeUploadItem(item) { item.formData.push({your: 'data'}); console.log(item); } As per https://github.com/nervgh/angular-file-upload/issues/97#issuecomment-39248062
upvote count: 12
downvote count: 0
answers question: http://stackoverflow.com/q/26350299

http://stackoverflow.com/comment/41401172
comment on: http://stackoverflow.com/a/26277666
type: Comment
score: 0
type: AnswerComment
has text: Yeah, I'm pretty sure about this, see [this page](http://www.highcharts.com/about) ;). And we have note in [FAQ](http://www.highcharts.com/docs/getting-started/frequently-asked-questions#highstock-features-in-highcharts) about Highstock including Highcharts.

http://stackoverflow.com/a/26354014
answers question: http://stackoverflow.com/q/26352968
score: 0
has comment: http://stackoverflow.com/comment/41452766
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41589121
type: Answer
has comment: http://stackoverflow.com/comment/41487777
has comment: http://stackoverflow.com/comment/41428615
accepted answer of: http://stackoverflow.com/q/26352968
has comment: http://stackoverflow.com/comment/41443356
has body: 1.To save and retrieve values (if only 3 values) use Properties. To Know more about Properties here are the docs. 2.To know which is the last opened window visit this Answer. 3.To check if its first time app launch do something like this : if(Ti.App.Properties.hasProperty('firsttime')){ //Code for second and subsequent launch }else{ //first launch //add your code for first launch //finally Ti.App.Properties.setString("firsttime", "true"); }

http://stackoverflow.com/q/26209908
has comment: http://stackoverflow.com/comment/41103009
score: 2
type: AnsweredQuestion
tagged with: rhino
accepted answer: http://stackoverflow.com/a/26209962
type: Question
tagged with: nashorn
tagged with: javascript
has comment: http://stackoverflow.com/comment/41105231
answer count: 2
has title: Expose an object's member functions as global functions
downvote count: 0
has answer: http://stackoverflow.com/a/26209962
favorite count: 0
has answer: http://stackoverflow.com/a/26212850
upvote count: 2
has body: For example I have: var n = { abc: function() { print("abc"); }, def: function() { print("def"); }, }; Is there a way to export abc and def as global functions, so that I can call abc() directly rather than n.abc()? My context for this is using Rhino/Nashorn script engine, and I'd like to inject a "global" object that provides global functions.
possible better answer: http://stackoverflow.com/a/26212850

http://stackoverflow.com/comment/41233504
type: QuestionComment
has text: The delay happens when keeping the key pressed right? It's a well known behavior and requires a different approach. See here: http://stackoverflow.com/questions/11197220/javascript-move-delay-and-multiple-keystrokes
score: 3
comment on: http://stackoverflow.com/q/26280708
type: Comment

http://stackoverflow.com/q/26336921
score: 0
accepted answer: http://stackoverflow.com/a/26349131
linked to: http://stackoverflow.com/q/2385609
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41346516
type: Question
has body: I have the following selected text in CKEditor plugin. monkey needs food today I can retrieve the banana using the following code editor.on( 'dialogShow', function( dialogShowEvent ) { var selection = editor.getSelection(); if (selection) { var selectedElement = selection.getSelectedElement(); // http://ckeditor.com/forums/Support/GetSelectedElement-returns-null-IE-and-Chrome-BUG if (selectedElement == null) { // I have no idea whether this is a correct workaround? Just pray... selectedElement = selection.getStartElement(); } if (selectedElement == null) { return; } // Yes :) var banana = selectedElement.getAttribute('answer'); However, the code will break, if our selected text is monkey needs food today May I know what is the correct way to iterate through DOM element of selected text? I expect we have something like getSelectedElements (Plural). But, I can't find one.
answer count: 1
has title: CKEditor plugin - Proper way to iterate multiple DOM elements for selected text
tagged with: javascript
tagged with: ckeditor
has answer: http://stackoverflow.com/a/26349131

http://stackoverflow.com/q/26332849
tagged with: entity-framework
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/26339997
accepted answer: http://stackoverflow.com/a/26339997
score: 0
has body: When I am writing Javascript functions, I believe that the convention is to use pascalCase for property names (lower first letter of first word), but when creating a C# property, it should be CamelCase (first letter of every word capitalized.) However, both languages are case sensitive and this causes an issue when serializing a Javascript or C# object to JSON and back because of the case mismatch. I am content with the approach of adding Attributes on my C# objects to map the C# CamelCase property to the Javascript pascalCase form; it seems clean, explicit and allows me to maintain the "always case this way" approach while writing within each language and this I feel helps me cut down on errors and I like consistency. However, for objects that are generated, eg, Entity Framework objects, these objects are generated without these attributes and if I were to add them and then decide to regenerate to pick up database changes, I would lose the attributes. (I am using visual Studioo, ASP.NET MVC and reverse engineeering Code "First" from a database.) I am a rookie at all of these technologies. I would like your advise on how to serialize these objects easily so that I can consistantly use the desired casing even with generated objects. Is there a way to have it all in this case? There's a lot of questions on this subject, but I'm not sure that this particular angle has been addressed. Here's a contrived example where I play to try and learn about these subjects: function Person(name, age) { this.name = name; this.age = age; return this; } $(document).ready(function () { /* Finds all of the controls whose IDs begin with PushMeButton */ $("[id^=PushMeButton]").click(function () { //var id = $(this).attr('id'); var url = '/Home/Ajax/'; var joe = new Person("Joe", 98); $.ajax({ type: 'POST', url: url, dataType: 'json', data: joe, success: function (person) { alert('im back'); alert(person.age); }, error: function (xhr, ajaxOptions, error) { alert(xhr.status); alert('Error: …
answer count: 1
has title: Serializing, Deserializing C#/JSON objects and not having casing issues
type: AnsweredQuestion

http://stackoverflow.com/a/26223309
answers question: http://stackoverflow.com/q/26223114
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/41128603
upvote count: 1
has body: There are several ways. Here's one which I prefer to use: .factory('LoadData', function LoadData($http, $q){ var status = false; var service = { getMyData: getMyData, status: status }; return service; function getMyData() { return $http( // implementation of the call ).then( function(response){ var myData = response.data; status = true; } ); } } This provides good encapsulation of your methods and gives you a clean interface to export. No need for the getter method if you don't want it. Inspiration via John Papa's Angular style guide (found here).

http://stackoverflow.com/a/51097961
answers question: http://stackoverflow.com/q/26241377
has body: I used this code to open all popups in a layer group: markers.eachLayer(marker =&gt; marker.openPopup()); While dealing with layer groups, you might want to consider passing { autoClose: false, closeOnClick: false } options while binding popup, so popups won't get closed while opening new popup, or if user clicks on the map: marker.bindPopup(item.name, { autoClose: false, closeOnClick: false });
score: 0
type: Answer

http://stackoverflow.com/q/26201039
tagged with: jquery
favorite count: 0
has title: How to fill cross domain textbox?
tagged with: ajax
has answer: http://stackoverflow.com/a/26202400
type: UnansweredQuestion
tagged with: php
downvote count: 1
type: Question
score: -1
tagged with: jsonp
upvote count: 0
answer count: 1
has body: I have searched quite long for a solution but did not find anything, that resolves my problem. I am trying to send some text from my input type="text" on my own domain to a cross domain input type="text". I have read something for jsonp and ajax can handle this, but until now i have found only examples to read the cross domain into my own domain. And i want to fill the cross domain textbox with some text value i type in my own domain. Any example that can handle this is welcomed.
tagged with: javascript

http://stackoverflow.com/a/26206791
answers question: http://stackoverflow.com/q/26205323
type: Answer
has comment: http://stackoverflow.com/comment/41131372
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26205323
has body: Quoting http://docs.meteor.com/ : Some JavaScript libraries only work when placed in the client/compatibility subdirectory. Files in this directory are executed without being wrapped in a new variable scope. This means that each top-level var defines a global variable. In addition, these files are executed before other client-side JavaScript files. This is exactly what needs to be done with three.min.js because the beggining of the file looks like : // threejs.org/license 'use strict';var THREE={REVISION:"68"}; So you need to put three.min.js inside cient/compatibility/. But you are probably better off using a package, choose carefully the one who is more likely to upgrade to revision 69 quickly in a few weeks or so.

http://stackoverflow.com/comment/41104661
type: Comment
has text: You need to replace `<` with `&lt;` and `>` with `&gt;` to prevent parsing of XML/html elements in browser. You can still see output in DevTools.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26210835

http://stackoverflow.com/comment/41269330
type: Comment
has text: i tried this but it just doesn't work.this is so frustrating. where do you place the var line? what format should the date be in?
type: AnswerComment
comment on: http://stackoverflow.com/a/26299794
score: 0

http://stackoverflow.com/a/26242433
downvote count: 0
has comment: http://stackoverflow.com/comment/41164083
answers question: http://stackoverflow.com/q/26242131
has comment: http://stackoverflow.com/comment/41163695
type: Answer
has comment: http://stackoverflow.com/comment/41163789
upvote count: 2
has comment: http://stackoverflow.com/comment/41164416
has body: Here is an example of something you could do given the HTML (pairs of labels and selects with no surrounding element) that you have: $("#remove_more_interest").on('click', function () { var labelLength = $('#interest_type_container &gt; label').length - 1; var selectLength = $('#interest_type_container &gt; select').length - 1; $('#interest_type_container &gt; label').eq(labelLength).remove(); $('#interest_type_container &gt; label').eq(labelLength - 1).remove(); $('#interest_type_container &gt; select').eq(selectLength).remove(); $('#interest_type_container &gt; select').eq(selectLength -1).remove(); }); This is using straight up brute force though, there may be better, more elegant ways to accomplish this. http://jsfiddle.net/jayblanchard/uohc23xd/
score: 2

http://stackoverflow.com/comment/41325236
type: QuestionComment
has text: "Access-Control-Allow-Origin suddenly doesn't work" Well, I can assure you that the world's web browsers suddenly change how they use this header on your site. How are we supposed to know why this stopped working? You didn't show any code that was changed, nor did you show us the HTTP request/response. Only you know this information.
score: 0
comment on: http://stackoverflow.com/q/26330646
type: Comment

http://stackoverflow.com/comment/41164645
type: Comment
comment on: http://stackoverflow.com/a/26242569
has text: Since he is binding to something that exists at the time jQuery runs ( `#remove_more_interest` ) event delegation is not necessary.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41243275
has text: its menu link because the app is generic, all the app will have same link based on parameter different app will be loaded
score: 0
comment on: http://stackoverflow.com/q/26285239
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26285580
score: 1
has comment: http://stackoverflow.com/comment/41242743
has comment: http://stackoverflow.com/comment/41242835
has comment: http://stackoverflow.com/comment/41242894
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41242694
upvote count: 1
has body: One way to inject server side information into the JavaScript portion of your application is "stringifying" the .Net object and calling JSON.Parse on the client side. If you have the Json.NET nuget package from Newtonsoft you can use the static method JsonConvert.SerializeObject() to turn almost any C# data structure into a JSON string. After you place that string of JSON into your view using the templating feature of the Razor view engine, you can store it to a variable like so: var engineerString = @JsonConvert.SerializeObject(Model.EngineerSchedule); var dictionary = JSON.parse(engineerString);
answers question: http://stackoverflow.com/q/26285468

http://stackoverflow.com/q/26330029
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/41324756
score: 0
has answer: http://stackoverflow.com/a/26330736
has comment: http://stackoverflow.com/comment/41324641
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41324693
tagged with: jquery
has body: I have a big draggable map to see all places on map. But I want to be able to drag it according to the mouse position. How to drag a child according to mouse position in Jquery? Here is my dragging code: $(".map").draggable({ containment:[(parseInt($(".hk").width()) - parseInt($(".hkc").width())) * -1, (parseInt($(".hk").height()) - parseInt($(".hkc").height())) * -1, 0, 0], cursor: "move" }) My demo is here and here is screenshot:
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41324353
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41324496
has title: How to drag a child according to mouse position in Jquery?
type: Question

http://stackoverflow.com/comment/41326324
type: AnswerComment
comment on: http://stackoverflow.com/a/26331033
type: Comment
has text: I would 'up' you, but I can't. Thanks for helping you all!
score: 0

http://stackoverflow.com/q/26263475
tagged with: module
score: 2
upvote count: 2
tagged with: lazy-loading
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26263938
has comment: http://stackoverflow.com/comment/41202417
type: Question
has title: Is there a dynamic module loader for AngularJS that uses convention over configuration?
has comment: http://stackoverflow.com/comment/41202220
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: convention-over-configur
favorite count: 0
tagged with: angularjs
has body: Most dynamic modules that I can find are not really dynamic and are actually lazy loaders, as they mostly require you to register what you want loaded in config files and registers. I am looking for a loader js way of using convention and just auto loading anything under folders for my one page app. Something like: app public loader.js &lt;-- no need to register anything manually modules module1 controllers controller1.js controller2.js directives directive1.js directive2.js services service1.js service2.js views view1.js view2.js

http://stackoverflow.com/comment/41239732
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26283845
type: Comment
has text: NaN is there because of the parseInts in swapTiles, you could change it to "parseInt(targetTileValue) || ''", then you will always have an empty string there.

http://stackoverflow.com/comment/41106068
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26211693
has text: I also think you have to look in the array if you want to do it with "empty slots"
type: AnswerComment

http://stackoverflow.com/q/26263288
tagged with: slide
tagged with: conflict
has comment: http://stackoverflow.com/comment/41204432
has body: I have the below code. It slides a mobile menu in, has a timeout function to only allow clicks in 500ms to prevent excessive clicks. It also closes back when user clicks outside the menu area. These two functions at the bottom of script are conflicting with each other. This only happens on a responsive site in a special case - if I click outside the menu area on first page load when mobile menu is still hidden, and then shrink the browser window, the menu shows up as already slid in. var togglerWidth = jQuery('#mobile-menu-toggler').css('min-width'); //get width of toggler //Slide left function var slideLeft = function () { var menuWidth = jQuery('#mainmenu-mobile').width(); //get width of main menu jQuery('#mobile-menu-toggler').animate({ width: menuWidth }, // what property we are animating 500, // how fast we are animating 'swing', // the type of easing function () { // the callback }); jQuery('#mainmenu-mobile').animate({ right: "0px" }, // what property we are animating 500, // how fast we are animating 'swing', // the type of easing function () { // the callback }); } //Slide Right Function var slideRight = function () { var menuWidth = jQuery('#mainmenu-mobile').width(); //get width of main menu jQuery('#mobile-menu-toggler').animate({ width: togglerWidth }, // what property we are animating 500, // how fast we are animating 'swing', // the type of easing function () { // the callback }); jQuery('#mainmenu-mobile').animate({ right: -menuWidth }, // what property we are animating 500, // how fast we are animating 'swing', // the type of easing function () { // the callback }); } var activate = function () { //switch to 'active-menu' class jQuery('#mainmenu-mobile, #mobile-menu-toggler').addClass('active-menu'); } var deactivate = function () { //switch back to 'inactive-menu' class jQuery('#mainmenu-mobile, #mobile-menu-toggler').removeClass('active-menu').addClass('inactive-menu'); } jQuery("#mobile-menu-toggler").click(function () { jQuery("#mobile-menu-togg…
has comment: http://stackoverflow.com/comment/41204572
tagged with: settimeout
has comment: http://stackoverflow.com/comment/41201527
type: Question
has answer: http://stackoverflow.com/a/26266877
has comment: http://stackoverflow.com/comment/41205929
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41202134
answer count: 1
type: UnansweredQuestion
has title: Conflict between setTimeout and clicking outside the element detection
has comment: http://stackoverflow.com/comment/41202487

http://stackoverflow.com/q/26238236
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41155725
answer count: 2
has answer: http://stackoverflow.com/a/26240639
tagged with: javascript
has answer: http://stackoverflow.com/a/26251805
has comment: http://stackoverflow.com/comment/41155459
favorite count: 0
has comment: http://stackoverflow.com/comment/41158166
has body: Is it possible to update a razor variable using onclick on a element? MVC VIEW: @{ string iconNumber = "1"; } Console error: Uncaught ReferenceError: Invalid left-hand side in assignment Thanks
has comment: http://stackoverflow.com/comment/41159911
has title: Javascript update razor variable using onclick element
possible better answer: http://stackoverflow.com/a/26240639
upvote count: 1
downvote count: 1
tagged with: model-view-controller
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26251805

http://stackoverflow.com/comment/41276074
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26287632
has text: No i want both flag and guid, Can i append something in GUID? Is this right way to get GUID with flag in return?

http://stackoverflow.com/a/26327063
score: 0
has comment: http://stackoverflow.com/comment/41329620
has body: A single page cant have any two elements with same id, like #xxx. Use class instead of id. A EDIT: If you cant simply change id to class, you could use some js template to generate a dynamic id or a dynamic data-target. http://getbootstrap.com/javascript/#modals-sizes <a href="#myModal<%= count %>" data-toggle="modal">Select <div id="myModal<%= count %>" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">... <a data-target"myModal<%= count %>" data-toggle="modal">Select <div class="modal fade myModal<%= count %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">...
type: Answer
answers question: http://stackoverflow.com/q/26326980
accepted answer of: http://stackoverflow.com/q/26326980
type: AcceptedAnswer

http://stackoverflow.com/q/26250256
tagged with: select
type: Question
tagged with: javascript
has title: Changing inner html of div depending on selected dropdown option
score: 0
accepted answer: http://stackoverflow.com/a/26250329
answer count: 1
tagged with: events
has body: Hello there I have looked across this forum looking for the answer to this. I am using a select element to determine the HTML of a given div. I tried doing this with the option element but after reading some responses to other questions was told it is not cross browser friendly. Some of these answers I found worked but when I tried to adapt the answer it all fell apart! I am new to Javascript and the below looks perfectly logical to me! (I am guessing its not). Option #1 Option #2 Option #3 Option #4
has answer: http://stackoverflow.com/a/26250329
type: AnsweredQuestion

http://stackoverflow.com/a/26305202
score: 3
answers question: http://stackoverflow.com/q/26305074
upvote count: 3
has comment: http://stackoverflow.com/comment/41278669
downvote count: 0
has body: You need to use json.dumps(). Like this: import json return render(request, 'index.html', {'post_objs': json.dumps(response)}, content_type='text/html')
type: Answer

http://stackoverflow.com/a/26348730
accepted answer of: http://stackoverflow.com/q/26341842
type: Answer
has comment: http://stackoverflow.com/comment/74136035
answers question: http://stackoverflow.com/q/26341842
has comment: http://stackoverflow.com/comment/41368758
upvote count: 2
has body: In your Python view: mapping = [ ['Shanghai', 23.7], ['Lagos', 16.1], ['Instanbul', 14.2], ['Karachi', 14.0], ['Mumbai', 12.5], ['Moscow', 12.1], ['Sao Paulo', 11.8], ['Beijing', 11.7], ['Guangzhou', 11.1], ['Delhi', 11.1], ['Shenzhen', 10.5], ['Seoul', 10.4], ['Jakarta', 10.0], ['Kinshasa', 9.3], ['Tianjin', 9.3], ['Tokyo', 9.0], ['Cairo', 8.9], ['Dhaka', 8.9], ['Mexico City', 8.9], ['Lima', 8.9] ] return render_template('page.html', mapping=mapping) And the HTML: ... series: [{ name: 'Population', data:, dataLabels: { ... Define mapping as a list of lists, and then pass it to the template, using the safe filter.
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41207874
type: QuestionComment
has text: The code came from JSfiddle, http://jsfiddle.net/arunpjohny/4M3Qv/ I am sure this works, but I am unsure of how to implement it correctly.
type: Comment
comment on: http://stackoverflow.com/q/26266409
score: 0

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/26332570

http://stackoverflow.com/a/26227917
score: 2
accepted answer of: http://stackoverflow.com/q/26227763
answers question: http://stackoverflow.com/q/26227763
type: AcceptedAnswer
downvote count: 0
has body: I would recommend using jQuery event handlers... Having said that, this in the context of onclick will refer the the anchor element so function myFuncton(value) { alert(value); } ddd Using jQuery event handlers jQuery(function($) { $('.myanchor').click(function(e) { e.preventDefault(); var label = $(this).find('.testClass').text(); alert(label) }) }) some text
type: Answer
upvote count: 2

http://stackoverflow.com/comment/41203502
type: AnswerComment
comment on: http://stackoverflow.com/a/26264118
score: 0
type: Comment
has text: Glad I could help. And yes, that happens a lot :)

http://stackoverflow.com/a/38144492
type: Answer
has body: In my Ajax successCallBack I am trying to manipulate drop down list having id as reasonCode based on dynamicId (value get from server) as below: $('#reasonCode option[value='+dynamicId+']').prop('selected', true); but unfortunately this had not worked until I added another line after this as below: $('#reasonCode').selectpicker('refresh');
downvote count: 0
answers question: http://stackoverflow.com/q/26205248
score: 3
upvote count: 3

http://stackoverflow.com/comment/41189922
type: Comment
comment on: http://stackoverflow.com/q/26257230
type: QuestionComment
score: 2
has text: You could do what you want using Ajax

http://stackoverflow.com/comment/41214818
comment on: http://stackoverflow.com/a/26270139
score: 0
type: AnswerComment
has text: the date is written as the apps whant to have it, just like it work 3 years ago... i have modified the code.. no luck ! will check it out tomorrow i have been on this for too long now, i dont see anything right ! thanks.
type: Comment

http://stackoverflow.com/q/26331815
type: Question
has answer: http://stackoverflow.com/a/26332083
tagged with: javascript
score: 0
tagged with: function
answer count: 1
has body: I'm using Ajax/JQuery to send a var ($name) in a form to page1.php to page2.php without refreshing the page; it is working; it send me the var $name from page 1 to page2.php when I click the submit button. I'm using a JavaScript lib to make charts (amcharts), and it have a script that needs to load the data in a var (called chartData), and that data is the result of a query that prints it in a JSON format: Page1.php: var chart; // create chart AmCharts.ready(function() { // load the data var chartData = AmCharts.loadJSON('http://localhost/Proyect/chart.php'); .... Page2.php (chart.php) $name2=$_POST['name1']; $link = mysqli_connect("localhost", "root", "", "Name") or die("Error " . mysqli_error($link)); if ($resultado = mysqli_query($link, "SELECT DATETIME, Name, Ineffective_Attempts, Call_Setup_Success_Rate FROM adicional WHERE BSC ='$name2' GROUP BY DATETIME ORDER BY DATETIME")) { if ( !$resultado ) { // Nope $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . mysqli_query; die( $message ); } $prefix = ''; echo "[\n"; while ( $row = $resultado->fetch_assoc() ) { echo $prefix . " {\n"; echo ' "DATETIME": "' . $row['DATETIME'] . '", ' . "\n"; echo ' "Ineffective_Attempts": ' . $row['Ineffective_Attempts'] . ', ' . "\n"; echo ' "Call_Setup_Success_Rate": ' . $row['Call_Setup_Success_Rate'] . '' . "\n"; echo " }"; $prefix = ", \n"; } echo "\n]"; $resultado->close(); } mysqli_close($link); ?> It simply executes a query to my database and prints the result like a JSON format. The var chartData just gets the result of that print to build the chart. The point is, the data which result of the query on page2.php (chart.php), load it in that JavaScript var (chartData) in page1.php so it can build me the chart. Page1.php form Fill the name! Name: In this form someone can type a name; when they press the submit button it will get that name with an ajax/jquery function to send that like a variable to the page2.php (chart.php). The function in Java…
tagged with: jquery
has title: Retrieving data from a query to load it in a JavaScript var
tagged with: ajax
type: UnansweredQuestion
tagged with: var

http://stackoverflow.com/a/26212584
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26212554
has body: Use the below regex which uses negative lookahead. Don't forget to add multiline modifier if your regex contain anchors (^- which denotes the start of a line,$ - means the end of a line). ^Error;(?!.*?CIRCLE).*$ DEMO &gt; var r = "Error; 1 no match CIRCLE more.\nInfo; 2 should not match\nError; 3 should : match SHAPE 'abc'.\nDebug; 4 should not match\nError; 5 CIRCLE / again\nError; 6 TRIANGLE should match"; undefined &gt; var m = r.match(/^Error;(?!.*?CIRCLE).*$/gm) undefined &gt; console.log(m) [ 'Error; 3 should : match SHAPE \'abc\'.', 'Error; 6 TRIANGLE should match' ]
upvote count: 2
score: 2

http://stackoverflow.com/q/26221644
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26221684
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
tagged with: dom-manipulation
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41124817
upvote count: 3
has answer: http://stackoverflow.com/a/26221684
has answer: http://stackoverflow.com/a/26221675
tagged with: dom
has comment: http://stackoverflow.com/comment/41124899
possible better answer: http://stackoverflow.com/a/26221675
has body: These are some input fields which i need to remove, but i am not able to remove the label tag Unique Selling Proposition Remove USP $(".remove").live('click', function() { $(this).parent().remove(); $(this).parent().prev('label.prfx-row-title').remove(); }); Now only the div is remove but not the label? Anyone?
has title: jquery remove div and previous label?

http://stackoverflow.com/comment/41331705
comment on: http://stackoverflow.com/q/26333972
has text: bod is for body in jquery old versions
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26265209
accepted answer of: http://stackoverflow.com/q/26240788
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/54404498
type: Answer
score: 2
upvote count: 2
has body: Adam's answer never quite worked for me, for one reason or another. Instead, I went with the approach of creating a new div, appending all of my stuff to it, printing it, and then destroying it. That can be accomplished via something along these lines: var pdf = new jsPDF('p','pt','letter'); $("#printing-holder").append("&lt;div id='printingDiv' style='background-color: white;'&gt;&lt;/div&gt;"); ($('#foo')).clone().appendTo("#printingDiv"); _.each( $('.bar').children(), function(e) { $("#printingDiv").append('&lt;br/&gt;'); $(e).clone().appendTo("#printingDiv"); $("#printingDiv").append('&lt;br/&gt;'); }); pdf.addHTML(($("#printingDiv")[0]), {pagesplit: true}, function() { console.log("THING"); pdf.save(); $("#printingDiv").remove(); }); Note that the pagesplit option splits the image up if it is larger than one page, but (as of the date of this answer) seems to vastly lower the quality of the PDF generated.
answers question: http://stackoverflow.com/q/26240788

http://stackoverflow.com/comment/41313844
score: 0
type: AnswerComment
has text: You should call the slider in the template file. Check the updated answer :)
comment on: http://stackoverflow.com/a/26324541
type: Comment

http://stackoverflow.com/comment/41258452
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26294193
score: 0
has text: yeah quite odd indeed, maybe related http://stackoverflow.com/questions/21216391/prevent-json-encode-associative-array-sorting

http://stackoverflow.com/q/26306190
has title: Create Record using java script in crm 2011
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41512585
has body: I am using CRM2011 on-Premises I create a custom entity record on account form using json. It working fine for me but for other user it shows "Access Denied" note( user has same role like me) If anyone has an idea please share with me.
has answer: http://stackoverflow.com/a/26360260
type: Question
tagged with: dynamics-crm-2011
tagged with: crm
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/26306657
tagged with: handlebars.js
type: AnsweredQuestion
type: Question
tagged with: mongodb
answer count: 1
tagged with: javascript
tagged with: meteorite
has answer: http://stackoverflow.com/a/26307059
accepted answer: http://stackoverflow.com/a/26307059
has body: I have created an object in Meteorjs to hold the database info for N numbers of dice rolls, and then the dice are displayed using handlebars #each iterator. Here is some of my code: The global Mongo collection: Items = new Meteor.Collection('items');&lt;/code&gt; When I roll the dice, this is what happens to the collection when a button is clicked: //Don't want to bore you with all code, so here's just important parts... var randomNumber=Math.floor(Math.random() * numSides) +1); var numDice = 6;// It's really a variable passed in, but for here it's 6. for (var i = 0; i &lt; numDice; i++) { Items.insert(item: randomNumber) }; And then they display the info as dice because it displays numbers that I have CSS'd to look like Dice. But I'm straying here... Anyway, the dice rolling is awesome, but I want to clear the dice when I roll again. right now, they just keep adding up. And when I try to use any method to delete Mongo DB Items stuff, it crashes my app. Since I'm not sure how to debug very well yet in a browser, I need some help, and I'mm going to ask it here... Now, my main problem is, when the dice are rolled again, I want to purge the database and start again. I am new to JavaScript and Meteor, and come from Java &amp;&amp; Ruby land, so any suggestions are greatly appreciated. I've tried Items.removeIndexes(), Items.purge(), Items.remove({}) They all just freeze my app, and the numbers I displayed in the #each iterator are still there. I thought it would delete the stuff, and push the changes... No??? Please help. The code is on GitHub @ http://www.github.com/rabbitfighter81/DMware/
score: 0
tagged with: meteor
has title: Can't delete items from Mongo Database in Meteorjs

http://stackoverflow.com/comment/41232255
score: 2
comment on: http://stackoverflow.com/q/26280154
type: Comment
type: QuestionComment
has text: You can't. `arr[1]` and `sub` are both references to the same object, but `sub` is not pointer to the array itself.

http://stackoverflow.com/comment/41283901
has text: Can you use string instead of object for `answerType` in `Question`? Then you bind options to `answerOption.front as answerOption.back for answerOption in answerOptions`. In my opinion @Ninsly has the point.
comment on: http://stackoverflow.com/q/26307594
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26220560
has comment: http://stackoverflow.com/comment/41125300
has comment: http://stackoverflow.com/comment/41125247
type: Answer
has comment: http://stackoverflow.com/comment/41123347
has comment: http://stackoverflow.com/comment/41140445
has comment: http://stackoverflow.com/comment/41124378
score: 0
has body: appending HTML into the DOM does not cause the browser to evaluate any script tags in said appended HTML. eval($("#div2").find("script").text()); How to execute &lt;script&gt; code in a javascript append
has comment: http://stackoverflow.com/comment/41124591
answers question: http://stackoverflow.com/q/26220357

http://stackoverflow.com/q/26215417
has body: Please check this link here : http://www.edu-leaders.com/search?page=2&amp;per_page=8&amp;search=text&amp;sort=Relevance&amp;utf8=%E2%9C%93 you can notice that there is a pagination at the bottom of the page, which is wrong as the links are not along with their hostname. So I tried a fix to add the hostname dynamically using javascript. Now the thing is if you run this code: $('.pagination a').each(function(i) { var link = $(this).attr('href'); if ((/^\/\//).test(link)){ $(this).attr('href', link.replace(/\/\//,'/')); } }); from your console. Everything will become proper and the pages will start going to page 2 , 3 and so on. The same code is present in the source code , if you can see on the bottom of the page. wrapped inside document ready. But that doesnt seem to work. Can anybody find the reason for that ?
has title: Javascript not working even when it is present in the source code
upvote count: 2
accepted answer: http://stackoverflow.com/a/26215496
score: 2
type: AnsweredQuestion
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26215496

http://stackoverflow.com/comment/41344054
comment on: http://stackoverflow.com/a/26340669
type: AnswerComment
score: 0
type: Comment
has text: I know that 'foo' part.My question is how is the returned object an instance of the factory?

http://stackoverflow.com/q/26222176
has title: AmCharts line chart animation
downvote count: 0
favorite count: 0
upvote count: 2
tagged with: animation
has answer: http://stackoverflow.com/a/26424371
score: 2
type: AnsweredQuestion
tagged with: amcharts
possible better answer: http://stackoverflow.com/a/38171398
has answer: http://stackoverflow.com/a/38171398
type: Question
answer count: 2
has body: Is it possible to animate a line chart in AmCharts in a way that shows the line being drawn (either by connecting the bullets or drawing the line sequentially left to right)? I've played around with the startDuration, startEffect and sequencedAnimation properties but all of the options seem to animate the entire line as a whole, either sliding it down from the top or bouncing it upon entry. It's better than no animation and is perfect for column/bar graphs but it looks somewhat odd and unnatural for a line graph. Here is the relevant documentation for AmCharts.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26424371

http://stackoverflow.com/comment/41231760
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26263407
has text: Whenever you have that amount of data, you have to design your UI from the ground up to filter it down. Start with departments...

http://stackoverflow.com/a/26296409
answers question: http://stackoverflow.com/q/26295972
has body: Not sure, but you seem to keep adding to text the second time, so text will be something like buy food buy food walk the dog , which is invalid HTML by the way, but gets outputted anyway...
score: 0
type: Answer

http://stackoverflow.com/comment/41303809
comment on: http://stackoverflow.com/q/26319170
score: 1
type: QuestionComment
has text: Is your second `res` a typo? It seems you are using `response` instead ...
type: Comment

http://stackoverflow.com/comment/41293557
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26313640
has text: @SNEHICHANCHAL Sorry, didn't quite understand question. Is this what you wanted?

http://stackoverflow.com/comment/75859156
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26339239
has text: `$event.target.attributes.getNamedItem('value').textContent` helped me. thanks
type: Comment

http://stackoverflow.com/comment/115934739
has text: Please consider adding a brief explanation of your code, and translate the comments into English, or just suppress them
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/65572606

http://stackoverflow.com/comment/41272531
has text: Now I'm not I understand you. I have tasks in my gulp file that require that a given file exists and others that process a variable number of files. If the number of files to process is given gulp.src should also really process this predefined number. In practice this means that if gulp.src receives a list of "flat" files, would like to test if each file really exists.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26282107

http://stackoverflow.com/comment/41096769
type: Comment
comment on: http://stackoverflow.com/a/26206781
type: AnswerComment
has text: @MaximOrlovsky Works nicely! Thanks again for quick respond! I am not certain though if I should use this now concidering it may confuse some users.
score: 0

http://stackoverflow.com/a/26244944
type: Answer
answers question: http://stackoverflow.com/q/26244871
score: 0
has body: Try alert(sentence); or console.log(sentence); instead of return sentence. alert() will display the string in an alert message box where as console.log will log the string in the browser console.

http://stackoverflow.com/a/26343774
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26342648
has body: Quote OP: "... the problem is that the .validate method is only triggered when the submit button is clicked. I would like to have it triggered at onfocus and onblur, as I believe is the default for jQuery.validate()." There are no such events in this plugin as onfocus and onblur. Actually, the default behaviors are onfocusout and onkeyup. HOWEVER, these two behaviors only start working after an initial click of the submit button. Your existing code: http://jsfiddle.net/bu7ukmvy/ This default behavior is called "Lazy Validation" as opposed to "Eager Validation", which is what you seem to be requesting. You can modify the onfocusout and onkeyup callback functions to ignore if the user already clicked the submit button and instead have them get triggered upon the first blur and key-up. $("#edit_researcher").validate({ // rules &amp; options, ...., onfocusout: function (element) { this.element(element); }, onkeyup: function (element, event) { this.element(element); } }); Working DEMO: http://jsfiddle.net/bu7ukmvy/1/
answers question: http://stackoverflow.com/q/26342648
has comment: http://stackoverflow.com/comment/41349689
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41349598

http://stackoverflow.com/comment/41131732
comment on: http://stackoverflow.com/a/26224785
type: AnswerComment
type: Comment
has text: Se my updates, you can try it out with the jsFiddle link at the bottom.
score: 0

http://stackoverflow.com/comment/41194117
type: Comment
has text: i got half of it...i need to run it in localhost.....how to do that?
type: QuestionComment
comment on: http://stackoverflow.com/q/26257813
score: 0

http://stackoverflow.com/q/26211573
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/34209909
accepted answer: http://stackoverflow.com/a/26211704
answer count: 5
has answer: http://stackoverflow.com/a/40534190
upvote count: 67
tagged with: angularjs
score: 67
has answer: http://stackoverflow.com/a/26212028
has answer: http://stackoverflow.com/a/28896048
type: AnsweredQuestion
tagged with: angular-ngmodel
has title: Angularjs: select not updating when ng-model is updated
has body: I've created the following example so you can see exactly what is happening: http://jsfiddle.net/8t2Ln/101/ The same thing happens if I use ng-options. I have a different reason for doing it this way, but for the simplification of the example left that part out. As you can see it has by default two options. I'm displaying the selected value of the ng-model next to the select so you can see what it is. When you use the top piece to add a third option it sets the value to the value of that new option as is evidenced by the displayed ng-model value next to the select, but the select itself doesn't change to show the correct value selected. Below is the sample code at the link: var testApp = angular.module('testApp', ['ngRoute']); testApp.controller('Ctrl', function ($scope) { $scope.newInput = ''; $scope.inputDevice = [ { value: '1', label: 'input1' }, { value: '2', label: 'input2' } ]; $scope.selectedDevice = ''; $scope.addType = function () { var newElem = { label: $scope.newInput, value: '3' }; $scope.inputDevice.push(newElem); $scope.selectedDevice = newElem.value; }; }); And here is the html: Add Type {{ i.label }} - {{ i.value }} {{ selectedDevice }}
has answer: http://stackoverflow.com/a/26211704
possible better answer: http://stackoverflow.com/a/26212028
type: Question

http://stackoverflow.com/comment/41426596
comment on: http://stackoverflow.com/a/26265729
type: AnswerComment
score: 0
type: Comment
has text: @sigur This is the most straightforward way to accomplish this in a language with closure and first-class functions. You will find that this is a very common pattern.

http://stackoverflow.com/comment/41082796
type: Comment
type: QuestionComment
has text: @quorve: Eh, yes. It is supposed to loop in time by the interval. That works. It is the same in both versions of the function for (re)starting the interval timer. The code run in `doIt` does some XMLHttpRequest calls and changes the document. All the code is not mine so I am not sure exactly what is done (other code may run in parallelt), but it works as expected if I do not use the function variable version.
comment on: http://stackoverflow.com/q/26199076
score: 0

http://stackoverflow.com/a/26306018
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26305891
has body: If you want to cycle through those images, I'd make an array and swap the position of the elements in it like: var imgs = ["2.jpg", "3.jpg", "1.jpg"]; function changeImage() { document.getElementById("imgClickAndChange").src = imgs[0]; imgs.push(imgs.shift()) } jsFiddle example
answers question: http://stackoverflow.com/q/26305891
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41265596
score: 0
type: Comment
type: QuestionComment
has text: it is not possible to change my approach. De database i am working on gives a list of resources that has to be loaded. The output format is an array. I need to load the files when the callback function is triggerd
comment on: http://stackoverflow.com/q/26297585

http://stackoverflow.com/comment/41102975
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26209890
has text: *facepalm* I added that snippet you gave to the second form and not the one I was testing. THANKS A MILLION!

http://stackoverflow.com/comment/41181441
comment on: http://stackoverflow.com/q/26252272
score: 0
type: Comment
type: QuestionComment
has text: if you dont want to show states first then hide them 'display:none'

http://stackoverflow.com/comment/41314565
comment on: http://stackoverflow.com/a/26317260
type: Comment
has text: Thank you for explaining! Can you also explain, how we get the value of "var i" in var countryIndex = Math.min(Math.max(i+offset, 0), countryHtml.length-1);
score: 0
type: AnswerComment

http://stackoverflow.com/q/26204190
has body: When I change the color for a line in a graph, the legend does not update with the same color. It stays the same as default color. Is there something I need to do to update the color in the legend to display the same color as the graph? Both the code and the jsfiddle is the same example. http://jsfiddle.net/ye0ny57j/ Flotr2
has answer: http://stackoverflow.com/a/27497675
tagged with: flotr2
answer count: 1
tagged with: javascript
has title: Flotr2, color changed on graph, legend does not update
score: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/26278602
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26268674
has body: There are a couple of minor issues with your code. Otherwise, it works fine. First, mySprite.location should be mySprite.position. Perhaps an earlier version of Three.JS used 'location'? The second issue is the reference to 'scene' is not defined. In a script, you can call 'this.getThreeScene()' to return the reference to the THREE.Scene that the object that this script is attached to is part of.
answers question: http://stackoverflow.com/q/26268674
has comment: http://stackoverflow.com/comment/41248377
type: AcceptedAnswer

http://stackoverflow.com/a/31551119
score: 9
has comment: http://stackoverflow.com/comment/115404588
upvote count: 9
has comment: http://stackoverflow.com/comment/115402697
downvote count: 0
has body: This is the as Владимир Корнилов's example except I changed the shader a little. I'm not sure what he was going for with the dot(vNormal, vNormel). Doing abs(dot(vNormal, vec3(0, 0, 1)) will give you something that is brighter when facing toward or away from the view. Making it 1.0 - abs(dot(vNormal, vec3(0, 0, 1)) will flip that so perpendicular to the view is brighter. Then add the pow and it looks better to me but I guess that's subjective var human; var $ = document.querySelector.bind(document); var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(45, 1, 0.1, 1000); var renderer = new THREE.WebGLRenderer({antialias: true, alpha: true}); renderer.setClearColor(0x000000, 1.0); lookAt = scene.position; lookAt.y = 15; camera.lookAt(lookAt); document.body.appendChild(renderer.domElement); var customMaterial = new THREE.ShaderMaterial( { uniforms: { p: { type: "f", value: 2 }, glowColor: { type: "c", value: new THREE.Color(0x84ccff) }, }, vertexShader: $('#vertexShader').text, fragmentShader: $('#fragmentShader').text, side: THREE.DoubleSide, blending: THREE.AdditiveBlending, transparent: true, depthWrite: false }); var loader = new THREE.ColladaLoader(); loader.options.convertUpAxis = true; loader.load('http://greggman.github.io/doodles/assets/woman.dae', function (collada) { dae = collada.scene; dae.traverse( function ( child ) { if (child instanceof THREE.Mesh) { console.log(child); child.material = customMaterial; } } ); dae.scale.x = 0.2; dae.scale.y = 0.2; dae.scale.z = 0.2; human = dae; scene.add(human); }); function resize() { var canvas = renderer.domElement; var width = canvas.clientWidth; var height = canvas.clientHeight; if (canvas.width !== width || canvas.height !== height) { renderer.setSize(width, height, false); camera.aspect = width / height; camera.updateProjectionMatrix(); } } // call the render function function render(time) { time *= 0.001; resize(); camera.position.x = -20 * (Math.cos(time)); camera.position.z = (20 * (Math.si…
has comment: http://stackoverflow.com/comment/115404376
type: Answer
has comment: http://stackoverflow.com/comment/115404505
answers question: http://stackoverflow.com/q/26336585

http://stackoverflow.com/q/26251023
duplicate of: http://stackoverflow.com/q/3455405
has comment: http://stackoverflow.com/comment/41179317
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26251041
accepted answer: http://stackoverflow.com/a/26251041
type: Question
linked to: http://stackoverflow.com/q/3455405
tagged with: arrays
downvote count: 0
has body: I have the following JavaScript array : [#ad: Array[0]] #ad: Array[0] #image_upload: Array[0] 13b7afb8b11644e17569bd2efb571b10: "This is an error" 69553926a7783c27f7c18eff55cbd429: "Yet another error" d3042d83b81e01d5c2b8bbe507f0d709: "Another error" Array[0] #image_url: Array[0] 2b4a9847e26368312704b8849de9247a: "URL error" This is the array representation in my browser console. Unfortunatelly I cannot find a way to remove the elements of the $errors['#ad']['#image_upload'] based on the md5 keys. In example, let's say I like to remove the message "Yet another error" by using the corresponding md5 key 69553926a7783c27f7c18eff55cbd429. I have try the method indexOf but this is not the correct one, as return the index of the value in the array. What I need is the opposite, I need to remove the value directly by using the index of the value. How can I perform this task ? Any idea ?
tagged with: javascript
answer count: 1
favorite count: 0
score: 8
has title: Remove array item by index (not numeric index but string)
upvote count: 8

angularjs-routing
tags question: http://stackoverflow.com/q/26330112
tags question: http://stackoverflow.com/q/26308020
type: Tag
tag name: angularjs-routing
tags question: http://stackoverflow.com/q/26283457
tags question: http://stackoverflow.com/q/26273808
tags question: http://stackoverflow.com/q/26285239
tags question: http://stackoverflow.com/q/26198348

http://stackoverflow.com/q/26243745
accepted answer: http://stackoverflow.com/a/26244176
has comment: http://stackoverflow.com/comment/41166605
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41166827
has comment: http://stackoverflow.com/comment/41166400
type: Question
has answer: http://stackoverflow.com/a/26244176
has comment: http://stackoverflow.com/comment/41166913
possible better answer: http://stackoverflow.com/a/26244010
has comment: http://stackoverflow.com/comment/41166974
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26249274
answer count: 3
has comment: http://stackoverflow.com/comment/41166657
has title: Angular.js with JSON not working?
has comment: http://stackoverflow.com/comment/41166664
has answer: http://stackoverflow.com/a/26244010
has body: I wonder if you could help me out. I've been trying to get JSON to work with Angular.js but I've been having a rough time with the specifics of a JSON $http.get() call. I would like to simply just have each person's name show up under the 'people' heading on the webpage but my JSON call doesn't want to work. I know it's probably a stupid small syntax error but I can't seem to find it. All help appreciated. Here is my code: HTML: People Webpage People {{person.name}} JSON: { { 'name' : 'Jack', 'age' : '28', 'weight' : '75kg'}, { 'name' : 'Jill', 'age' : '25', 'weight' : '66kg'} } JAVASCRIPT: var app = angular.module('People',[]); app.controller('PeopleController',[ '$http' ,function($http){ var names = this; names.people = []; $http.get('people.json').success(function(data){ names.people = data; }); }]); I tried alert(data); in the success callback and I'm receiving the JSON as this: "{{ 'name' : 'Jack', 'age' : '28', 'weight' : '75kg'},{ 'name' : 'Jill', 'age' : '25', 'weight' : '66kg'}}" However, if try to call an alert on a JavaScript object created like so: var people = [ { 'name' : 'Jack', 'age' : '28', 'weight' : '75kg'}, { 'name' : 'Jill', 'age' : '25', 'weight' : '66kg'} ]; alert(people); I receive something to the effect of : {{ object : Object, object : Object, object : Object}, { object : Object, object : Object, object : Object}} Is this relevant to my issue?
has comment: http://stackoverflow.com/comment/41166935
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41166326
tagged with: getjson
type: AnsweredQuestion

http://stackoverflow.com/a/55817416
answers question: http://stackoverflow.com/q/26296497
score: 4
downvote count: 0
type: Answer
upvote count: 4
has body: As T.J. Crowder said, using defineProperty again does the trick. You may consider the following variation, where the setter itself overrides the property: Foo = function () {} Foo.prototype = { // computes, but only knows odd die sides get bar() { console.log("getter invoked") return (Math.random() * 6) | 1 }, // fix it set bar(value) { console.log("setter invoked") Object.defineProperty( this, 'bar', {writable: true, enumerable: true, configurable: true} ) this.bar = value } } var x = new Foo console.log(x.bar) // =&gt; eg. 5 x.bar = 4 // by fair dice roll console.log(x.bar) // =&gt; 4 x.bar = 2 // no setter, no getter console.log(x.bar) I hope you'll pardon me to rewrite in a slightly different syntax. It does not change anything to the trick. I was actually just looking for a way to override an inherited getter when I came to this post.

http://stackoverflow.com/a/26273902
type: Answer
answers question: http://stackoverflow.com/q/26273833
has body: You need to include jquery library for that.Like this. You need to include this 1st, then write $.ajax to execute.
upvote count: 35
type: AcceptedAnswer
downvote count: 0
score: 35
accepted answer of: http://stackoverflow.com/q/26273833

http://stackoverflow.com/q/26284784
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26285033
has answer: http://stackoverflow.com/a/26285237
accepted answer: http://stackoverflow.com/a/26285237
has title: Delete a div within a form
tagged with: javascript
has body: In the below form I am trying to delete the entire div addedtrans and then add a button near the button nonpayment. Below is the HTML and the jQuery function in question: Complete Transaction Transaction Date: Transaction Amount Transaction Type choice one Credit $(function(){ $("#cancelcreditrx").click(function(){ var addbutton = $(" ").attr('type','button').attr('id','addTrx').attr('name','addTrx').attr('value','Add Cable Transaction').addClass("buttonlarge"); $(".addedtrans").remove(); $("#nonpayment").append(addbutton); }) })
type: Question
score: 0
has answer: http://stackoverflow.com/a/26285150
tagged with: jquery
has answer: http://stackoverflow.com/a/26284845
possible better answer: http://stackoverflow.com/a/26285033
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26285104
has comment: http://stackoverflow.com/comment/41241655

http://stackoverflow.com/a/26221535
has body: Why not have it like calling a javascript function on 'onclick' of a tag rather than the href. And using window.location to change the page if needed. Refer to the fiddle :- http://jsfiddle.net/Lpx7epf2/5/ Code is as follows :- (HTML) &lt;a href="#" onclick="gender('boy')"&gt; &lt;IMG STYLE="position:absolute; TOP:250px; LEFT:100px; WIDTH:300px; HEIGHT:300px" SRC="images/boy0023.png"/&gt;&lt;/a&gt; &lt;a href="#" onclick="gender('girl')"&gt; &lt;IMG STYLE="position:absolute; TOP:250px; LEFT:600px; WIDTH:300px; HEIGHT:300px" SRC="images/girl0023.png"/&gt;&lt;/a&gt; (JavaScript) function gender(str){ alert(str);//Use the value any way you want window.location="website.html?gender="+str; }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26220532

dom
tags question: http://stackoverflow.com/q/26233933
type: Tag
tags question: http://stackoverflow.com/q/26321432
tags question: http://stackoverflow.com/q/26221644
tags question: http://stackoverflow.com/q/26284020
tags question: http://stackoverflow.com/q/26353600
tags question: http://stackoverflow.com/q/26326980
tags question: http://stackoverflow.com/q/26266675
tags question: http://stackoverflow.com/q/26238434
tags question: http://stackoverflow.com/q/26195091
tags question: http://stackoverflow.com/q/26246209
tags question: http://stackoverflow.com/q/26214338
tags question: http://stackoverflow.com/q/26259285
tags question: http://stackoverflow.com/q/26316325
tags question: http://stackoverflow.com/q/26253211
tags question: http://stackoverflow.com/q/26314226
tags question: http://stackoverflow.com/q/26229255
tags question: http://stackoverflow.com/q/26331906
tags question: http://stackoverflow.com/q/26290288
tags question: http://stackoverflow.com/q/26302455
tags question: http://stackoverflow.com/q/26238138
tags question: http://stackoverflow.com/q/26336198
tags question: http://stackoverflow.com/q/26328774
tags question: http://stackoverflow.com/q/26288949
tags question: http://stackoverflow.com/q/26250353
tags question: http://stackoverflow.com/q/26347742
tags question: http://stackoverflow.com/q/26268880
tags question: http://stackoverflow.com/q/26265920
tags question: http://stackoverflow.com/q/26245974
tags question: http://stackoverflow.com/q/26273269
tags question: http://stackoverflow.com/q/26252144
tags question: http://stackoverflow.com/q/26269474
tags question: http://stackoverflow.com/q/26324990
tags question: http://stackoverflow.com/q/26251990
tags question: http://stackoverflow.com/q/26329807
tags question: http://stackoverflow.com/q/26352435
tag name: dom
tags question: http://stackoverflow.com/q/26262838
tags question: http://stackoverflow.com/q/26214068
tags question: http://stackoverflow.com/q/26325278
tags question: http://stackoverflow.com/q/26236275
tags question: http://stackoverflow.com/q/26246106
tags question: http://stackoverflow.com/q/26214560
tags question: http://stackoverflow.com/q/26314175
tags question: http://stackoverflow.com/q/26266435
tags question: http://stackoverflow.com/q/26207683
tags question: http://stackoverflow.com/q/26260015
tags question: http://stackoverflow.com/q/26201019

http://stackoverflow.com/a/26351001
has comment: http://stackoverflow.com/comment/41467755
accepted answer of: http://stackoverflow.com/q/26350697
type: Answer
answers question: http://stackoverflow.com/q/26350697
has body: I love this way: $(function() { if (Modernizr.history) { // history is supported; do magical things // hijack the nav click event $(".flatflipbuttons").on( "click", "a", function(event) { event.preventDefault(); _href = $(this).attr("href"); // change the url without a page refresh and add a history entry. history.pushState(null, null, _href); // load the content loadContent(_href); // fear not! we're going to build this function in the next code block }); } else { // history is not supported; nothing fancy here } }); // set up some variables var $mainContent = $("#principal"), $pageWrap = $("#main"), baseHeight = 0; // calculate wrapper heights to prevent jumping when loading new content $pageWrap.height($pageWrap.height()); baseHeight = $pageWrap.height() - $mainContent.height(); function loadContent(href) { $mainContent .find("#main-content") .fadeOut(200, function() { // fade out the content of the current page $mainContent .hide() .load(href + " #main-content", function() { // load the contents of whatever href is $mainContent.fadeIn(200, function() { $pageWrap.animate({ height: baseHeight + $mainContent.height() + "px" }); }); }); }); } Some changes to HTML <?PHP include ("menu.php"); ?> // Main content goes here... <?PHP include ("footer.php"); ?> // menu.php ... This answer is taken from CSS-Tricks
has comment: http://stackoverflow.com/comment/41385444
has comment: http://stackoverflow.com/comment/41383982
has comment: http://stackoverflow.com/comment/41389072
has comment: http://stackoverflow.com/comment/41429676
has comment: http://stackoverflow.com/comment/41384503
has comment: http://stackoverflow.com/comment/41383248
has comment: http://stackoverflow.com/comment/41400571
has comment: http://stackoverflow.com/comment/41385632
has comment: http://stackoverflow.com/comment/41392262
has comment: http://stackoverflow.com/comment/41382827
has comment: http://stackoverflow.com/comment/41428677
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41362471

http://stackoverflow.com/q/26320926
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How To Center Javascript Onclick In Center of Screen
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26321033
tagged with: onclick
has answer: http://stackoverflow.com/a/26321035
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I need help centering my javascript pop up in the screen. When I scroll down my screen and click the link that activates the onclick popup it comes up at the top of my page (where I can't see the popup). How can I get this to pop up in the center of my screen even when I'm scrolled down. &lt;a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"&gt;

http://stackoverflow.com/comment/41093723
type: Comment
type: QuestionComment
has text: @gummage both. An array is an object too.
comment on: http://stackoverflow.com/q/26205071
score: 0

http://stackoverflow.com/comment/41291182
score: 0
type: Comment
has text: Thank you very much for your support. the script is working perfectly now. Once again thank you for your valuable time.
comment on: http://stackoverflow.com/a/26310801
type: AnswerComment

http://stackoverflow.com/comment/41119308
comment on: http://stackoverflow.com/q/26217898
has text: @JamieDixon Have you tried the following: var module = angular.module('myApp', ['uiRouter']);
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26331443
tagged with: css
favorite count: 0
score: 2
tagged with: cordova
upvote count: 2
type: UnansweredQuestion
has title: Position Other DIVs based on the position of a specific DIV in css
has body: I am still new to web so this is kinda tricky for me. I have a class greenApple01 .greenApple01 { width: 256px; height: 256px; background-image: url("fingertwisterimages/newimages/spritesheet_greenApple.png"); border: 1px solid red; position: absolute; top: 290px; right: 130px; } And I have another div yellowApple03. Now what I want to achieve is this: How can I position yellowApple03 based on greenApple01's position? Also, I am developing for mobile and can you give me ideas on how to utilize media queries?
has comment: http://stackoverflow.com/comment/41326652
type: Question
has answer: http://stackoverflow.com/a/26331483
answer count: 2
has answer: http://stackoverflow.com/a/26331661
linked to: http://stackoverflow.com/q/5078239
downvote count: 0
has comment: http://stackoverflow.com/comment/41326668
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41332696
has text: No error, just when i click nothing happen. I am trying different solution. thank you
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26313792

http://stackoverflow.com/a/26315547
score: 0
type: Answer
has body: You need to find the submit button in the DOM first and disable it and then attach an event listener to the textarea, wherein you disable/enable the submit button based on whether the textarea is empty or not: document.getElementById("submit").disabled = true; document.getElementById("author_message").addEventListener('change', func, false); function func(){ document.getElementById("submit").disabled = (document.getElementById("author_message").value==='') ; } Here is the JsFiddle.
answers question: http://stackoverflow.com/q/26315296

http://stackoverflow.com/comment/41181631
comment on: http://stackoverflow.com/a/26246021
has text: @Sam if my answer solved your question, then consider marking it as correct to close your question and let other people find it easily.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41231408
type: QuestionComment
has text: Yes, but this /\w{0,} \[*\w{0,}\]/.test('aaa [bbb!]'); fails
comment on: http://stackoverflow.com/q/26279673
score: 0
type: Comment

http://stackoverflow.com/q/26351488
tagged with: include
type: UnansweredQuestion
tagged with: php
has body: Hi i'm having a problem with inclusion of javascripts specifically Google maps API. I have a page for example that includes the library: &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;libraries=places,visualization"&gt;&lt;/script&gt; //some page contents $this-&gt;widget('MyWidgetThatIncludesGoogleAPI',array( .. )); The problem arises when I call my widget which also includes google maps api, and even if I don't initially include the maps api in this page. Calling the widget twice does the same. I get an error saying that Google Maps API has been loaded multiple times, is there a programmatic way to handle duplicate inclusion of js?
has comment: http://stackoverflow.com/comment/41363606
has comment: http://stackoverflow.com/comment/41363347
type: Question
tagged with: google-maps
tagged with: javascript
score: 0
answer count: 1
has title: PHP : Preventing multiple javascript inclusions
has answer: http://stackoverflow.com/a/26351531

http://stackoverflow.com/a/26264430
score: 0
answers question: http://stackoverflow.com/q/26264283
has body: Lots of different ways to go about it: http://jsfiddle.net/cusygh4o/2/ $('form').on('submit', function(e) { alert($(this).find('select').val()); });
type: Answer

http://stackoverflow.com/comment/41305082
type: Comment
type: QuestionComment
has text: This looks very much like the lesson learnd here http://webdriver.io/guide.html do you stick to the steps described there?
comment on: http://stackoverflow.com/q/26319633
score: 0

http://stackoverflow.com/a/26505153
has comment: http://stackoverflow.com/comment/46302023
has comment: http://stackoverflow.com/comment/82599841
has body: While the two answers above will work for a small or single variable API, the correct answer is to write a type declaration file for your JavaScript file. The type declaration file for your example would be named myjsfile.d.ts, where the .d.ts suffix is what tells the TypeScript compiler that it's parsing a declaration file. If you use Visual Studio, your declaration file will be recognized by the TypeScript compiler as long as it is somewhere (anywhere) in the project you are working on. Declaration files store metadata about JavaScript variables, functions and objects so the TypeScript compiler can do its job. If your JavaScript file happens to be a library or framework in common use, DefinitelyTyped is definitely the place to find the definition file you need. If your JavaScript is your own work or less well known, you'll have to write your own type declaration file. See the section Writing .d.ts files in The TypeScript Handbook. If the name declaration file sounds intimidating, don't worry - they are far easier to write than programs. Also, remember that you don't need to specify all metadata for your JavaScript file, just the functionality you need. Let me know if you need any help!
type: Answer
upvote count: 43
has comment: http://stackoverflow.com/comment/56558300
downvote count: 0
has comment: http://stackoverflow.com/comment/82599896
answers question: http://stackoverflow.com/q/26274278
has comment: http://stackoverflow.com/comment/57866633
score: 43

http://stackoverflow.com/comment/41247522
has text: Isn't this exactly the same as my answer? What value is there having two answers which are the same?
type: Comment
comment on: http://stackoverflow.com/a/26287926
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41203895
type: Comment
has text: @AmitJoki - Apologies for backtracking, after having accepting your answer, but I've encountered an error: `Failed to execute 'querySelectorAll' on 'Document': 'img[^=http://www.domain.com]' is not a valid selector.`
comment on: http://stackoverflow.com/a/26241583
type: AnswerComment
score: 0

http://stackoverflow.com/q/26283556
downvote count: 1
type: Question
has body: I wrote this Javascript application for a 15-puzzle. The entire application is contained in the file below. Whenever I render a new board, I'm trying to store the initial configuration in the initialBoard variable so I can replay the same game later. However, initialBoard variable always seems to equal the currentBoard variable. I'm new to Javascript and any help will be greatly appreciated. 15 Puzzle START
tagged with: javascript
has comment: http://stackoverflow.com/comment/41246151
tagged with: scope
score: 0
has answer: http://stackoverflow.com/a/26283845
answer count: 1
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/26283845
type: AnsweredQuestion
has title: PUZZLE TROUBLE - trying to save initial board

http://stackoverflow.com/q/26313788
has body: I am rather curious. When a member is asking a question in Stack Overflow, within a textbox, the member can enter tags which will change into a graphical form automatically. There is even an 'X' button to the side of each tag which will allow the tag to be deleted. How is this implemented in HTML? I thought only pure text is allowed in a textbox.
has comment: http://stackoverflow.com/comment/41294047
has answer: http://stackoverflow.com/a/26313822
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26313823
score: 0
has comment: http://stackoverflow.com/comment/41293997
answer count: 3
has answer: http://stackoverflow.com/a/26313823
accepted answer: http://stackoverflow.com/a/26313822
has answer: http://stackoverflow.com/a/26313814
favorite count: 0
has comment: http://stackoverflow.com/comment/41294006
has comment: http://stackoverflow.com/comment/41294013
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/14083272
has title: How to display tags in a HTML textbox?
downvote count: 2
type: Question

http://stackoverflow.com/comment/41172944
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26246745
type: AnswerComment
has text: I also came up with this but I think the regex expression is wrong cause it takes any url: `if(document.URL == url || (url + '/?param=*/'))`

http://stackoverflow.com/q/26273843
has comment: http://stackoverflow.com/comment/41221783
type: Question
tagged with: javascript
has title: Ajax not returning success result in Wordpress
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41220975
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41221448
has answer: http://stackoverflow.com/a/26279898
has body: I am trying to get a return value from a when the database is updated. I used AJAX to send the data to a function inside functions.php by one of the Wordpress plugins' folder. I tried to alert on both success and fail function, and it has always invoked the fail function. How do I know if the AJAX response is successful so that i could do some additional code when it is successful. SCRIPT function removeUser( department , user ){ var value = { user_id: user , dep_name: department.id }; $('#'+department.id+ user +"_div").hide(); $.ajax({ type: "POST", data: value }); } functions.php function removeUser(){ if(isset($_POST['user_id'])){ //echo $_POST['user_id']; //echo $_POST['dep_name']; $user_meta = get_user_meta($_POST['user_id'], 'wpwf_quotation_position'); $user_department = json_decode ($user_meta[0]); //print_r ($user_department); //echo (json_encode($user_department)); foreach ($user_department as $key =&gt; $value){ if ($value == strtolower($_POST['dep_name'])){ //print_r ($user_department); unset($user_department[$key]); $user_department = array_values($user_department); //print_r ($user_department); //echo (json_encode($user_department)); //print_r (json_encode($user_department)); update_user_meta( $_POST['user_id'], 'wpwf_quotation_position', json_encode($user_department)); break; } //echo $key." : ". $value ." - " . strtolower($_POST['dep_name'])."&lt;br&gt;"; } //echo 'ssss'; wp_send_json($_POST); } } add_action('init', 'removeUser'); The above code run well, but what I actually want to do is as below, but the success function is not called. What am i missing here or have done wrongly? function removeUser( department , user ){ var value = { user_id: user , dep_name: department.id }; $.ajax({ type: "POST", data: value, success:function() { $('#'+department.id+ user +"_div").hide(); } }); }
tagged with: wordpress

http://stackoverflow.com/q/26222739
tagged with: jquery
linked to: http://stackoverflow.com/q/10312963
favorite count: 0
type: Question
duplicate of: http://stackoverflow.com/q/10312963
linked to: http://stackoverflow.com/q/13304471
answer count: 1
has title: Run a JavaScript command every X minutes
has comment: http://stackoverflow.com/comment/41126907
tagged with: javascript
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/26222766
has comment: http://stackoverflow.com/comment/41126927
downvote count: 4
duplicate of: http://stackoverflow.com/q/13304471
upvote count: 0
has body: I have this JavaScript function /* Use this method to send a message to the active chatwindow */ function sendMessageToActiveWindow(message) { swfobject.getObjectById('lightIRC').sendMessageToActiveWindow(message); } I want to set up an array of messages and then every X minutes use sendMessageToActiveWindow(message) with a randomly selected message from the array. Is it possible to do such a thing in JavaScript/jQuery etc. and any examples?

http://stackoverflow.com/q/26231105
tagged with: sql
has comment: http://stackoverflow.com/comment/41144711
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26233629
accepted answer: http://stackoverflow.com/a/26231583
has title: Javascript on .each class getval
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26231583
has comment: http://stackoverflow.com/comment/41145076
tagged with: mysql
has comment: http://stackoverflow.com/comment/41143501
type: Question
possible better answer: http://stackoverflow.com/a/26233629
has comment: http://stackoverflow.com/comment/41145145
has comment: http://stackoverflow.com/comment/41144836
has body: thanks for looking at this question. I have a issue as I got few text field Their id is as followed Row 1: height_1,weight_1,cost_1 Row 31: height_31,weight_31,cost_31 Row 61: height_61,weight_61,cost_61 Total will have 90 rows.. so the problem in the past is Its work because I will use the javascript below to calculate the total of this 90 rows. for(i=1;i<=90;i++) { $('.height').each(function () { heightTotal += Number($(this).val()); }) $("#height_row_A").html(heightTotal); $('.weight').each(function () { weightTotal += Number($(this).val()); }) $("#weight_row_A").html(weightTotal); //cost is just about the same so I leave it out } So the problem now is, in the past the 90 rows are calculated together and append to this span id height_row_total and weight_row_total But now I need to calculate row 1 to 30, row 31 to 60 , row 61 to 90 Each have their on row span at the top of their row which followed like this Row 1 height_row_A,weight_row_A Row 2 height_row_B,weight_row_B Row 3 height_row_C,weight_row_C How do I change my this $('.height').each(function () { heightTotal += Number($(this).val()); }) $('.weight').each(function () { weightTotal += Number($(this).val()); }) to only get row 1 to 30, instead of every value with the id height and then to get row 31 to 60 and 61 to 90 My code segment is something like this example of a field. the 1 will change to 2 on the next row, there is total 30 rows x 3 column 1 For Row 2 2 What I wanna to do is fetch the total height for row 1 - 30 , and display in a span id "total_height_for_col_1" and the same for weight Then row 31-60 will be for col_2 and 61-90 will be for col_3 My JsFiddle , for the JsFiddle example, I got 4 boxes. With the javascript, I wanted to able calculate the total for box 1 and 2, then box 3 and 4. This example used only 4 boxes, in reality I got 90 boxes, and split by 30 per span id
score: 0
has comment: http://stackoverflow.com/comment/41143176
answer count: 2

http://stackoverflow.com/a/26293107
has comment: http://stackoverflow.com/comment/41256359
has comment: http://stackoverflow.com/comment/41256281
has body: This is because you have mixed the array notation for injected dependencies in your controller and in your module. Controller.js 'use strict'; var app = angular.module('app.controllers', []); app.controller('CalculatorCtrl', ['$scope', '$http', 'CalculatorService', function($scope, $http, CalculatorService){ console.log('in CalculatorCtrl...'); $scope.doSquare = function() { $scope.answer = CalculatorService.square($scope.number); }; $scope.doCube = function() { $scope.answer = CalculatorService.cube($scope.number); }; }]); UPDATE: Remove $scope and CalculatorService in functions doSquare and doCube, they are already included as dependencies in your controller. Updated version above.
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/41256511
has comment: http://stackoverflow.com/comment/41256209
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26292970
answers question: http://stackoverflow.com/q/26292970
type: Answer

http://stackoverflow.com/comment/41217636
type: AnswerComment
comment on: http://stackoverflow.com/a/26269797
type: Comment
score: 1
has text: You'd create the component like any other, e.g. `<Wrap icons={<Icons />} />`. `this.props.children` is actually either a single component or an array of components. There is a helper function available that will always return an array, but I can't remember it right now. If you pass two children, you can access the first one with `this.props.children[0]` and the second one with `this.props.children[1]`.

http://stackoverflow.com/comment/41116907
comment on: http://stackoverflow.com/a/26217624
type: AnswerComment
score: 0
type: Comment
has text: Nice try but look i want for some reason to do this only in the control's code at front not codebehind

http://stackoverflow.com/q/26347501
has comment: http://stackoverflow.com/comment/41356503
has body: In my cloud code below Im trying to set the variable leanBody equal to a certain string but it keeps returning a weird array [object Object]. I dont know why it is doing this. in my efforts to debug and find where this array is being set from I have tried to(SEPARATELY): Set leanBody equal to an arbitrary string in the global declaration then i tried to set it to an arbitrary string in the varReset function then i even commented out leanBody = (results.get("messageBody")); in the afterSave function still i keep getting a log saying that it equals [object Object]. var leanBody = ""; var leanSenderName = ""; var leanSenderId = ""; var randUsers = []; function varReset(leanBody, leanSenderName, leanSenderId, randUsers){ leanBody = ""; leanSenderName = ""; leanSenderId = ""; randUsers = []; console.log("The variables were set"); } Parse.Cloud.afterSave("Lean", function(leanBody, leanSenderName, leanSenderId, randUsers, request) { varReset(leanBody, leanSenderName, leanSenderId, randUsers); var leanQuery = new Parse.Query("Lean"); leanQuery.first({ success: function(leanBody, results){ console.log("The first object was retrieved"); console.log("leanBody = " + leanBody); leanBody = (results.get("messageBody")); }, error: function(error){ } }); });
favorite count: 0
tagged with: parse-platform
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: object
score: 1
has comment: http://stackoverflow.com/comment/41356510
type: Question
has comment: http://stackoverflow.com/comment/41387541
downvote count: 0
tagged with: javascript
tagged with: parse-cloud-code
has title: Parse.com log keeps returning string as [object Object]

http://stackoverflow.com/comment/41270111
type: Comment
comment on: http://stackoverflow.com/a/26299934
score: 0
has text: in the setDate line phpdate has to be a date object so this doesn't work. the solution below by Guillaume works but all the other responses do not. Really appreciate everyone's help
type: AnswerComment

http://stackoverflow.com/q/26276130
type: UnansweredQuestion
tagged with: node.js
has body: I am messing aroung with mongoose and I am simply trying to return an object that is in my collection (which to my understanding is the equivalent of a row that is in an SQL table). In the video I am watching it says that all callbacks from mongoose return error and results but I am only able to return the results never an error (logs as undefined) even when I force an error nothing happens. How do I find out when I have an error? here is the code I have. app = require("../server") dashboard = require("../models/dashboard") app.get('/request', (req, res)-&gt; dashboard.users.find({}).exec().then (users, err) -&gt; console.log err res.send users ) The 2nd parameter always comes out undefined no matter what I name it. Also this is written in coffeescript I'll have a javascript version below var app, dashboard; app = require("../server"); dashboard = require("../models/dashboard"); app.get('/request', function(req, res) { return dashboard.users.find({}).exec().then(function(users, err) { console.log(err); return res.send(users); }); });
tagged with: coffeescript
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/26279652
tagged with: mongoose
tagged with: javascript
score: 0
answer count: 1
has title: Mongoose query doesn't return an error

http://stackoverflow.com/a/26280473
has comment: http://stackoverflow.com/comment/42062058
score: 0
answers question: http://stackoverflow.com/q/26279431
type: Answer
has body: As per the question linked by James Donnelly above, calling toString() on methods exported from asm.js modules will return 'function method() { [native code] }' if the module has been compiled successfully and the JS source otherwise.

http://stackoverflow.com/comment/41607274
type: AnswerComment
has text: @salivan not sure what do you mean with *I do notice timeout kicking in sometimes*. In any case, you don't have to use `timeOut`, you could use a timer instead, as [pagePiling.js](https://github.com/alvarotrigo/pagePiling.js/blob/master/jquery.pagepiling.js#L371) is doing or even [one-page-scroll](https://github.com/peachananr/onepage-scroll/blob/master/jquery.onepage-scroll.js#L264). I'm not quite sure how your solution works yet, I'll test it this afternoon.
type: Comment
comment on: http://stackoverflow.com/a/26454511
score: 0

http://stackoverflow.com/q/26282107
tagged with: javascript
has comment: http://stackoverflow.com/comment/41290556
has comment: http://stackoverflow.com/comment/41290592
tagged with: glob
tagged with: node.js
has comment: http://stackoverflow.com/comment/41290609
has comment: http://stackoverflow.com/comment/41272531
answer count: 0
type: UnansweredQuestion
has body: I'm looking for a method to determine if the object submitted to glob is actually a glob pattern or just a list of one or more flat files. function tellMeIfGlob(p) { ... } tellMeIfGlob('file.txt') -&gt; false tellMeIfGlob(['file1.txt', 'file2.txt']) -&gt; false tellMeIfGlob('*.js') -&gt; true tellMeIfGlob(['*.js', 'src/**/*.css']) -&gt; true
has comment: http://stackoverflow.com/comment/41275927
has comment: http://stackoverflow.com/comment/41249237
has comment: http://stackoverflow.com/comment/41290423
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41241060
has comment: http://stackoverflow.com/comment/41247293
has title: Test if parameter to glob is actually a npm glob pattern or a simple flat file

http://stackoverflow.com/q/26229579
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41140570
has answer: http://stackoverflow.com/a/26230455
has comment: http://stackoverflow.com/comment/41177512
tagged with: asp.net
has body: I am using 3 javascript functions for textfield validation, validate all the fields once all the fields are properly entered yes/cancel confirmation should be also along with a pop up window with the textfilled values which are display in a pageto verify entered values are correct Once i select yes my button click event should occur if no is selected nothing sholud happen. pop up window can be closed by the user Here is my js script, I am getting all my textfields validated and getting confirmation box yes/cancel but popup window page is not displaying &lt;script type="text/javascript"&gt; function UserDetailsConfirmation() { return confirm("Are you sure you want to add this ?"); return openwin(); } function openwin() { window.open('PopupForConfirm.aspx?name1=' + name + '&amp;age1=' + age + '&amp;gen=' + gender + '', 'open_window', ' width=640, height=480, left=0, top=0'); } function validate() { var name= document.getElementById('&lt;%=this.txtname.ClientID %&gt;'); var age= document.getElementById('&lt;%=this.txtage.ClientID %&gt;'); var gender= document.getElementById('&lt;%=this.txtgender.ClientID %&gt;'); if (name.value) == "") { alert("Please Enter Name"); name.focus(); return false; } else if (age.value) == "") { alert("Please Enter age"); age.focus(); return false; } else if (gender.value) == "") { alert("Please enter gender"); gender.focus(); return false; } else if (!UserDetailsConfirmation()) { return false; } else { return true; } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41177447
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41177262
has title: perform 3 javascript functions on single button click
has answer: http://stackoverflow.com/a/26247471
has comment: http://stackoverflow.com/comment/41140425
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26229623

http://stackoverflow.com/comment/41337462
type: QuestionComment
has text: You specified that it needs to work in older browsers - how old?
comment on: http://stackoverflow.com/q/26337011
score: 0
type: Comment

http://stackoverflow.com/comment/41125293
comment on: http://stackoverflow.com/a/26221916
score: 0
type: Comment
type: AnswerComment
has text: Ooooops... I finally saw it. Thanks. I was about to delete the question but you answered it :/

http://stackoverflow.com/comment/41240239
type: Comment
type: QuestionComment
has text: `var linkprev = getElementsByClassName('portfolio-navigation')` should be `var linkprev = document.getElementsByClassName('portfolio-navigation')`. Same for the other one too. [DEMO](http://jsfiddle.net/6e2zbhgk/)
comment on: http://stackoverflow.com/q/26284164
score: 0

http://stackoverflow.com/q/26325608
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41316882
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/132750791
has body: I am developing a game using HTML5 Canvas and JavaScript. Initial fps is decent but as the game continues the fps decreases. The initial fps is around 45 fps but it reduces to 5 fps. Following is my gameloop var last_draw = Date.now(); //To track when last time GameDraw was called last time var fps; function gameloop() { var elapsed = Date.now() - last_draw; last_draw = Date.now() fps = 1000/elapsed; context.clearRect(0,0,canvas.height,canvas.width);// This function clears the canvas. GameUpdate();// This function updates property of all game elements. GameDraw(); //This function draws all visible game elements in the canvas. window.requestAnimationFrame(gameloop); //Requests next frame } window.requestAnimationFrame(gameloop); It have tested this in following browsers: Mozilla Firefox 32.0.3 Google Chrome 38.0.2125.101 m My questions are: Why rAF is calling it less frequently as the game continues? Is it due to Memory leak? Is it because time taken by GameDraw and GameUpdate is very high? Is time to execute Gamedraw function is different from time taken to actually draw elements in canvas. Gamedraw calls draw function of each game element.
tagged with: performance
linked to: http://stackoverflow.com/q/11150779
type: Question
tagged with: canvas
has answer: http://stackoverflow.com/a/26326516
has comment: http://stackoverflow.com/comment/41316287
tagged with: requestanimationframe
has title: HTML5 Game refresh rate with requestAnimationFrame

http://stackoverflow.com/comment/41361166
has text: @PSL Yep, turns out the issue was a misunderstanding of Jasmine's `toEqual` all along.
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26350376

http://stackoverflow.com/comment/41094918
has text: `alert('(1, 2, 3, 4)'.search(/\d/) !== -1);`
score: 1
comment on: http://stackoverflow.com/q/26205927
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26353002
type: Question
has comment: http://stackoverflow.com/comment/41365935
has comment: http://stackoverflow.com/comment/41365883
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/26353120
accepted answer: http://stackoverflow.com/a/26353120
answer count: 1
favorite count: 0
has body: function jQueryValidatorWrapper(formId, rules, messages) { var validator = $("form:visible[id='" + formId + "']").validate({ onchange: false, messages: messages, rules: rules }); this.validate = function (hideErrors) { var showErrorMessage = hideErrors ? false : true; // What does 'validator' refer to? var result = validator.form(); }; } When I execute this, var validatorObj = new jQueryValidatorWrapper('testForm', [], []); validatorObj.validate(); The jQueryValidatorWrapper function had only one method declared with this, so when the constructor executed, it simply created an object with the validate method. What happens to validator variable declared inside jQueryValidatorWrapper? It is not prefixed with this so it is not part of the object being constructed. Is the validator variable a global? or is it part of the closure which is the validate method?
type: AnsweredQuestion
downvote count: 0
score: 1
has title: How are variables declared in constructor functions in JavaScript treated?

http://stackoverflow.com/comment/41167111
has text: Marc B, any thoughts?
comment on: http://stackoverflow.com/q/26224658
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26215058
answer count: 3
has body: I am building a password checker - I have a simple requirement for at least three lowercase non-consecutive letters for now and either I have a large misunderstanding of regexes, or something else. I have written the following code: var password = 'mYpAsSwOrD', r = new RegExp('[a-z]{3,}', 'g'); console.log(password.match(r)); // null console.log(r.test(password)); // false Also, is the 'g' flag needed? Does the quantifier not provide the same functionality effectively? What is the better comparison? Matching the regex against the string (first example); or testing the string against the regex (second example)?
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41111995
has comment: http://stackoverflow.com/comment/41111895
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41111871
has comment: http://stackoverflow.com/comment/41111849
tagged with: regex
has answer: http://stackoverflow.com/a/26215133
has answer: http://stackoverflow.com/a/26215100
has comment: http://stackoverflow.com/comment/41111873
has title: Why does this simple JavaScript password regex not work?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41112018
has answer: http://stackoverflow.com/a/26215756
tagged with: javascript

http://stackoverflow.com/comment/41133865
type: QuestionComment
type: Comment
score: 0
has text: I can't imagine it would be possible to *not* overlap the content on the current page with the bottom bar. Does every web page fit on one screen? No way. There will be many pages that will require scrolling, which means the bottom bar will be covering some of the information on the page.
comment on: http://stackoverflow.com/q/26226161

http://stackoverflow.com/comment/41158491
score: 0
type: Comment
has text: Thank you! its working fine, but what to write in controller because now I need to write /games/sayHello/(IDHERE), I would like to only need to write /games/(IDHERE)
comment on: http://stackoverflow.com/a/26238265
type: AnswerComment

http://stackoverflow.com/q/26229221
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/26229265
tagged with: c#
tagged with: javascript
has title: Get JavaScript Array in ASP.Net ArrayList as a parameter of a function
has answer: http://stackoverflow.com/a/26229265
tagged with: arraylist
upvote count: 1
has body: I am working on a project and have to send a JavaScript Array as a parameter of a ASP.Net function which parameter is ArrayList. Below is my code, JavaScript : var propertyArray = new Array(); propertyArray.push("2"); propertyArray.push("3"); $.ajax({ type: 'POST', url: 'Default.aspx/SaveTextProperty', contentType: 'application/json; charset=utf-8', data: { propertyArray: propertyArray }, dataType: 'json', success: function (response) { var result = "Done"; alert(result); } }); Default.aspx : [WebMethod] public static bool SaveTextProperty(ArrayList propertyArray) { //Some code return true; } Here I need to get JavaScript propertyArray as ASP.Net function named SaveTextProperty's parameter. How can I get it? Thank you.
answer count: 1
tagged with: asp.net
favorite count: 0
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26223386
has body: I have couple of thumbnails on a page (wrapped in and tags). I am highlighting thumbnails on hover by increasing padding and changing bg color of the s, using jQuery. //echoing through php loop $film_name here is my jQuery: This code is working fine, but transitions on hover are happening too quickly and appear jittery. I'd like it to slow down. I tried delay(), but it didn't seem to work. I want the padding increase to be less noticeable.
answer count: 6
has answer: http://stackoverflow.com/a/26223492
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26223556
has answer: http://stackoverflow.com/a/26223643
has answer: http://stackoverflow.com/a/26223527
tagged with: css
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26223508
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26223559
has title: extending the execution time of jquery method
type: Question

http://stackoverflow.com/comment/41134076
has text: Dude, I don't need the #. I'm using Ember CLI and URLs in my application don't need it.
comment on: http://stackoverflow.com/q/26226017
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41146981
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26204750
has text: Hi, Thanks for the answer. Tried but could not read the id. Also tried using $_server[HTTP_REFERRER], but no success.
type: AnswerComment

http://stackoverflow.com/comment/41137675
has text: What is difference with async false?
score: 0
comment on: http://stackoverflow.com/a/26228347
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26302134
has answer: http://stackoverflow.com/a/26302311
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26302201
type: AnsweredQuestion
has title: How to view the source of a JSP file client side
tagged with: java
has body: I have been writing c#, html, js, jquery for awhile and been using F12 in chrome and IE to look at the html code to help me with some dom manipulation. I am curious if there is a way to do something similar to that context to look at a jsp page and manipulate it with javascript. For example: viewsource on a jsp page and fill out a textbox on the jsp page with javascript. I hope the question is clear and the example makes sense. I am not working on anything with this so I don't have a real example. This is more of curiosity. I know javascript but I am not familiar with java at all.
type: Question
possible better answer: http://stackoverflow.com/a/26302250
has answer: http://stackoverflow.com/a/26302250
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26302201
answer count: 3

http://stackoverflow.com/comment/41134761
type: Comment
score: 0
has text: I added this to my code. Same error. Both times the output for req.url was /newauthor/. Firebug just says "aborted" at a certain point but a second POST request does not seem to be sent. Any other ideas?
type: AnswerComment
comment on: http://stackoverflow.com/a/26226714

http://stackoverflow.com/q/26323285
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: event-listener
has title: Hammer.js only triggered in window.onload?
downvote count: 0
tagged with: javascript
tagged with: hammer.js
tagged with: tizen
tagged with: http://stackoverflow.com/tag/html
has body: all I have a main html And if the notification things happened I have to show up noti.html and if I click the cancel button in noti.html I should come back to main html again... To show noti.html, I changed main.xml 's body tag to noti.html... And If i click the cancel button I switched again. But when I come back to main.xml I can't use gesture thing(hammer.js). It doesn't work because its event-listener is in window.onload function. So I tried to change event 'load' to 'pageshow' error occured like this ... "js/hammer/js TypeError: 'null' is not an object (evaluating 'a.addEventListener')" Does hammer.js event listener only can triggered in onload function??? If it is... any other ideas ?? ... I want to pop up my notification... without disturbing gesture event listner(hammer.js)... Help me!! (I'm developing tizen wearable..) Thank you!
favorite count: 0
answer count: 0

http://stackoverflow.com/q/26270903
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41216090
has comment: http://stackoverflow.com/comment/41216113
tagged with: css
has body: I'm currently putting together a website for a buddy and myself. I purchased a template (mind all the silly placeholders and obvious space issues) to help get the ball rolling as I didn't have very much time available to put in to the project. On the store section of the page you have that little gallery of products, when you scroll down a bit more it removes itself from the page (page jitters, clicking from store to about works funny). This is causing an issue with my Jquery waypoints setup. I can't for the life of me figure out what's removing it from the page when I'd like to keep it there at all times. Any help is appreciated. http://lovedrugfrontend.herokuapp.com/
has answer: http://stackoverflow.com/a/26271144
type: AnsweredQuestion
type: Question
has title: CSS/Javascript - Div removing itself from Page
has comment: http://stackoverflow.com/comment/41216016
accepted answer: http://stackoverflow.com/a/26271144
score: 0
has comment: http://stackoverflow.com/comment/41216258
answer count: 1

http://stackoverflow.com/comment/41155596
comment on: http://stackoverflow.com/q/26238188
has text: I don't get it. How is `/[:={}]+/` supposed to test if a string is javascript or not? For example it matches `::::` which is definitely not javascript. Care to tell us more about the actual problem?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26292702
answers question: http://stackoverflow.com/q/26292572
type: Answer
has body: you wrote: I found two insignificant errors: line 774, column 26: XML parsing error: :774:26: undefined entity [help] &lt;name&gt;Brabant Bar and Caf&amp;Atilde;&amp;copy;&lt;/name&gt; XML parsing errors are major problems with XML. XML parsers fail on them. If you encode your entities correctly, it works. &lt;Placemark id="placemark19147"&gt; &lt;name&gt;Brabant Bar and Caf&amp;amp;Atilde;&amp;amp;copy;&lt;/name&gt; &lt;styleUrl&gt;#Beer Bar&lt;/styleUrl&gt; &lt;description&gt;&lt;![CDATA[ &lt;a href="http://beermapping.com/maps/reviews/reviews.php?locid=19147"&gt;Brabant Bar and Caf&amp;amp;Atilde;&amp;amp;copy;&lt;/a&gt;&lt;br /&gt; Beer Bar&lt;br /&gt; San Diego, CA 92104&lt;br /&gt; United States&lt;br /&gt; ]]&gt;&lt;/description&gt;
has comment: http://stackoverflow.com/comment/41255460
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26292572

http://stackoverflow.com/comment/41231461
score: 0
type: Comment
type: QuestionComment
has text: @Pointy: "Functions are objects, but they're also functions; they have an intrinsic nature beyond that of their simple 'objectness'" That clears it up a lot.
comment on: http://stackoverflow.com/q/26279539

http://stackoverflow.com/q/26301377
answer count: 2
tagged with: radio-button
accepted answer: http://stackoverflow.com/a/26301690
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26301646
has comment: http://stackoverflow.com/comment/41271736
type: Question
has answer: http://stackoverflow.com/a/26301646
has answer: http://stackoverflow.com/a/26301690
has body: I have a radio buttons group, and I trying to show button if 5 radio checked, but i cant do that. Here is my code: $(document).ready(function () { $('#vote_submit_button').hide(); var unanswered = new Array(); $('table').each(function () { var question = $(this).find('input').attr('name'); if (!$(this).find('input').is(':checked')) { unanswered.push(question); } }); if (unanswered.length &gt; 0) { } else { $('#vote_submit_button').show(); } }); Help please)
tagged with: javascript
tagged with: jquery
has title: Radio buttons group
score: 0

http://stackoverflow.com/q/26309573
has comment: http://stackoverflow.com/comment/41289255
possible better answer: http://stackoverflow.com/a/26371635
type: Question
has answer: http://stackoverflow.com/a/26371635
accepted answer: http://stackoverflow.com/a/26414246
has comment: http://stackoverflow.com/comment/41286725
has body: I am using this service for notifications: https://github.com/jirikavi/AngularJS-Toaster Is working perfectly. Already configured for that anywhere in my application I create a pop () button, clicking the trigger notification toaster. What I need now is any controller in my application, can call triggering the notification method. For example, within the controller ProductController, I call pop () at any time and then the notification would be triggered. Despite any view the pop () method function within the controller does not work at all. Is there some detail I'm not watching? My index.html My App My view when the notification toaster is fire by click 'pop()' (it works perfectly): Universities Create Nome Save pop() My controller: 'use strict'; angular.module('app.controller-university', ['ngCookies']) .controller('UniversityCtrl', ['$stateParams', '$scope', '$window', 'University', function($stateParams, $scope, $window, University ) { $scope.pop(); }]); The file controllers.js. Where is the AppCtrl: 'use strict'; /* Controllers */ angular.module('app.controllers', ['pascalprecht.translate', 'ngCookies']) .controller('AppCtrl', ['$rootScope', '$scope', '$translate', '$localStorage', '$window', 'toaster', function( $rootScope, $scope, $translate, $localStorage, $window, toaster ) { // add 'ie' classes to html var isIE = !!navigator.userAgent.match(/MSIE/i); isIE && angular.element($window.document.body).addClass('ie'); isSmartDevice( $window ) && angular.element($window.document.body).addClass('smart'); $scope.toaster = { type: 'success', title: 'Title', text: 'Message' }; $scope.pop = function(){ toaster.pop($scope.toaster.type, $scope.toaster.title, $scope.toaster.text); }; }]) This is my app.js 'use strict'; // Declare app level module which depends on filters, and services var app = angular.module('app', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngStorage', 'ui.router', 'ui.bootstrap', 'ui.load', 'ui.jq', 'ui.validate', 'oc.lazyLoad', 'pascalprecht.translate'…
tagged with: javascript
upvote count: 13
answer count: 3
has answer: http://stackoverflow.com/a/26414246
has answer: http://stackoverflow.com/a/35570137
has comment: http://stackoverflow.com/comment/41305134
has title: Fire notification toaster in any controller angularjs
favorite count: 0
tagged with: angularjs
score: 13
has comment: http://stackoverflow.com/comment/41286893
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/128846380
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26336794
type: Comment
has text: Instead of `update` use `updateMany` now.

http://stackoverflow.com/comment/41079876
comment on: http://stackoverflow.com/q/26197378
score: 0
type: Comment
type: QuestionComment
has text: @city How about simply adding anchors in your regex http://regex101.com/r/dK1bJ3/2 ?

http://stackoverflow.com/comment/61614616
type: Comment
has text: @Gilsha You might be able to help me with a very similar question http://stackoverflow.com/questions/37031238/using-d3-js-to-modify-c3-js-chart
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26235078

http://stackoverflow.com/a/26254506
has body: You can use on() method to attach events for dynamically generated elements, and a css animation for blinking it: $(document).on("blur",":input",function () { $(this).addClass('highlight'); }).on("focus",":input",function () { $(this).removeClass('highlight'); }) input.highlight { -webkit-animation: blink 1s linear 3; -ms-animation: blink 1s linear 3 ; -moz-animation: blink 1s linear 3; animation: blink 1s linear 3; } @-webkit-keyframes blink { from { box-shadow:0 0 0px 0 red; } 50% { box-shadow:0 0 10px 0 red; } to { box-shadow:0 0 0px 0 red; } } @keyframes blink { from { box-shadow:0 0 5px 0 #000; } 50% { box-shadow:0 0 0px 0 #000; } to { box-shadow:0 0 5px 0 #000; } } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="text" /&gt;&lt;br/&gt; &lt;input type="text" /&gt;
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26254044
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41198751
comment on: http://stackoverflow.com/q/26261712
score: 0
has text: @j08691 I did, thanks. It is exactly the same just slower to launch the preview in the browser?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41254925
type: Comment
has text: `this` is special in JS, and has various uses. From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this :"When a function is used as an event handler, its `this` is set to the element the event fired from ...". This behaviour is overriding how you are trying to use `this` and therefore creates an issue.
score: 0
comment on: http://stackoverflow.com/q/26292269
type: QuestionComment

http://stackoverflow.com/comment/41223724
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26275197
has text: @Jerodev I want it work work mainly in Chrome
score: 0

http://stackoverflow.com/comment/41176162
type: QuestionComment
comment on: http://stackoverflow.com/q/26249163
has text: So this is basically a "like" box. Are you saving the results in a database? Because if not you have a long way to go before you have to worry about the button only being pressed once.
score: 0
type: Comment

http://stackoverflow.com/q/26198656
linked to: http://stackoverflow.com/q/448981
accepted answer: http://stackoverflow.com/a/26198668
score: 2
type: AnsweredQuestion
has title: Javascript this.id to differentiate objects of the same class
has answer: http://stackoverflow.com/a/26198668
has answer: http://stackoverflow.com/a/26198705
type: Question
answer count: 2
has body: I have a css class (.SideOption) which has multiple instances on a page and I want to have something to differentiate between them (so I chose ID), but I can't get JS to get the ID, it just returns undefined in the alert box. JS; function CreateBox() { $MyID = this.id; alert($MyID); } $(document).ready(function() { $(".SideOption").click(function() { CreateBox(); }) }) This is what the SideOption looks like for example. &lt;div class="SideOption" id="1"&gt; &lt;/div&gt;
tagged with: javascript
tagged with: jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/41081892
downvote count: 0
possible better answer: http://stackoverflow.com/a/26198705
favorite count: 0

http://stackoverflow.com/q/26213439
has body: For my debugging, I'm trying to load a javascript file from the console. I've tried several options: var ns = document.createElement("script"); ns.type = 'text/javascript'; ns.src = 'http://localhost/test.js'; document.getElementsByTagName("head")[0].appendChild(ns); and also: $.getScript('http://localhost/test.js'); Neither worked as expected. I can see the &lt;script&gt; tag added in the DOM tree but the script is not execute and the Network tab in the developer's tools does not show the script being loaded. How can I get it to execute? UPDATE: Interestingly, the code works fine on Chrome, but not on FireFox (I'm on Ubuntu 12.04).
has comment: http://stackoverflow.com/comment/41110380
tagged with: dynamic
score: 1
has comment: http://stackoverflow.com/comment/41110731
type: Question
has title: Dynamically loaded javascript not executing
has comment: http://stackoverflow.com/comment/41109467
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41109984
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41108981

http://stackoverflow.com/q/26344936
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41352005
has comment: http://stackoverflow.com/comment/41351439
has title: Condition when pressing radio button
has answer: http://stackoverflow.com/a/26345082
type: Question
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/11504059
type: UnansweredQuestion
has body: How do i make my page do this in particular. I have 2 choices LBC and PickUp, If the user selects LBC, it would proceed to the next page to select payment options. but if the user selects the PickUp radio option, it would be redirected immediately to the last page, since the payment option is no longer applicable. I have this javascript function that enables a button, but other than that, i have no idea how do do it. Redirecting the page depending on what radio button is pressed. If LBC no problem, if Pickup proceed to next page after payment page, so it would skip the payment page. Please help thank you. <?php echo " "; $i = 0; $qry="SELECT * FROM shipping"; $result= @mysql_query($qry); while ($row=mysql_fetch_assoc($result)){ if ($i > 0 && $i % 3 == 0) { echo " "; } echo " "; ?> <input type="radio" name="carrier" <?php if (isset($carrier) && $carrier=="$row[ship_name]") echo "checked";?> value="<?php echo $row['ship_name']; ?>"> <?php echo ' '; ?> <?php echo $row['ship_desc']; ?> Additional ₱ <?php echo $row['ship_price']; ?> <?php echo " "; $i++; } echo " "; ?>

http://stackoverflow.com/comment/41281002
has text: @rss81 correct ! You understand the code I see, welldone :) I updated the answer as promised
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26300043

http://stackoverflow.com/q/26332382
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26332940
score: 0
has answer: http://stackoverflow.com/a/26332940
tagged with: asp.net
has body: I'm really stuck in a problem of saving image. I'm developing a website (asp.net, VB) that will enable users to save signature image in the database. My code works(saves image in the database) when I run in localhost, but published website doesn't save. Please help me to resolve this. canvas class="roundCorners" id="txtSignature" style="position: relative; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; display: block; border: 1px solid #c4caac; background-color:#fff" > &lt;script type="text/javascript" &gt; signatureCapture(); &lt;/script&gt; JavaScript for canvas is: function signatureCapture() { var canvas = document.getElementById("txtSignature"); var context = canvas.getContext("2d"); canvas.width = 600; canvas.height = 200; context.fillStyle = "#fff"; context.strokeStyle = "#444"; context.lineWidth = 1.5; context.lineCap = "round"; context.fillRect(0, 0, canvas.width, canvas.height); var disableSave = true; var pixels = []; var cpixels = []; var xyLast = {}; var xyAddLast = {}; var calculate = false; { //functions function remove_event_listeners() { canvas.removeEventListener('mousemove', on_mousemove, false); canvas.removeEventListener('mouseup', on_mouseup, false); canvas.removeEventListener('touchmove', on_mousemove, false); canvas.removeEventListener('touchend', on_mouseup, false); document.body.removeEventListener('mouseup', on_mouseup, false); document.body.removeEventListener('touchend', on_mouseup, false); } function get_coords(e) { var x, y; if (e.changedTouches &amp;&amp; e.changedTouches[0]) { var offsety = canvas.offsetTop || 0; var offsetx = canvas.offsetLeft || 0; x = e.changedTouches[0].pageX - (offsetx); y = e.changedTouches[0].pageY - (offsety); } else if (e.layerX || 0 == e.layerX) { x = e.layerX; y = e.layerY; } else if (e.offsetX || 0 == e.offsetX) { x = e.offsetX; y = e.offsetY; } return { x : x, y : y }; }; function on_mousedown(e) { e.preventDefault(); e.stopPropagation(); canvas.addEventListener('mouseup', on_m…
has title: Byte image is not being saved in the database from client browser
tagged with: vb.net
type: AnsweredQuestion
tagged with: image
type: Question
tagged with: canvas
answer count: 1

http://stackoverflow.com/q/26284254
tagged with: javascript
score: 0
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41240605
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41240183
answer count: 0
has comment: http://stackoverflow.com/comment/41240244
has title: jquery and ajax file uploader won't work
has body: I try to follow the sample code of jquery and ajax file uploader but i've got some error. actually i cannot figure out the error because when i press the submit button, nothing happens. Please help me about this error. The Controller: <?php class Upload extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('files_model'); $this->load->database(); $this->load->helper('url'); } public function index() { $this->load->view('upload'); } public function upload_file() { $status = ""; $msg = ""; $file_element_name = 'userfile'; if (empty($_POST['title'])) { $status = "error"; $msg = "Please enter a title"; } if ($status != "error") { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png|doc|txt'; $config['max_size'] = 1024 * 8; $config['encrypt_name'] = TRUE; $this->load->library('upload', $config); if (!$this->upload->do_upload($file_element_name)) { $status = 'error'; $msg = $this->upload->display_errors('', ''); } else { $data = $this->upload->data(); $file_id = $this->files_model->insert_file($data['file_name'], $_POST['title']); if($file_id) { $status = "success"; $msg = "File successfully uploaded"; } else { unlink($data['full_path']); $status = "error"; $msg = "Something went wrong when saving the file, please try again."; } } @unlink($_FILES[$file_element_name]); } echo json_encode(array('status' => $status, 'msg' => $msg)); } public function files() { $files = $this->files_model->get_files(); $this->load->view('files', array('files' => $files)); } public function delete_file($file_id) { if ($this->files_model->delete_file($file_id)) { $status = 'success'; $msg = 'File successfully deleted'; } else { $status = 'error'; $msg = 'Something went wrong when deleteing the file, please try again'; } echo json_encode(array('status' => $status, 'msg' => $msg)); } } ?> The Model: <?php class Files_Model extends CI_Model { public function insert_file($filename, $title) { $data = array( 'file_name' => $filenam…
has comment: http://stackoverflow.com/comment/41240738
type: Question

http://stackoverflow.com/q/26341532
has answer: http://stackoverflow.com/a/26350072
accepted answer: http://stackoverflow.com/a/26350072
favorite count: 0
tagged with: kendo-ui
has title: How to create Grid with with nested DropDownList in C# / Razor / KendoUI?
tagged with: kendo-asp.net-mvc
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
tagged with: c#
has body: I retype the grid attached below from JavaScript to Razor, but for example column "ActorInvoicingParamsFreePeriod" contains DropDownList . I can't attach it to the grid. I found only examples in JavaScript or without Kendo UI. I can code grid witout DropDownList. Can You help me? function populateGridWithInvoicingMethod() { $("#grid").show(); $("#grid").html(""); $("#grid").kendoGrid({ columns: [ { field: "Name", title: "@CTA.DealerName", width: 100, }, { field: "InvoicingPeriod", title: "@CTA.InvoicingMethod", values: InvoicingMethodEnumArray, editor: invoicingMethodDropDownEditor, width: 50 }, { field: "ActorInvoicingParamsNumberOfMonths", title: "@CTA.NumberOfMonths", format: "{0:d}", width: 30 }, { field: "ActorInvoicingParamsFreePeriod", title: "@CTA.StandardPackageFreeInvoicingPeriod", values: FreeInvoicingPeriodArray, editor: freeinvoicePeriodDropDownEditor, template: "#= ActorInvoicingParamsFreePeriod != -1 ? ActorInvoicingParamsFreePeriod : 'Not set' #", width: 30 }, { field: "ParentActorActorId", title: "@CTA.InvoicingRegion", values: InvoicingRegionArray, width: 30 }, { field: "ExportToGlif", title: "@CTA.ExportToGlif", template: '&lt;input class="checkbox" type="checkbox" #= ExportToGlif ? checked="checked" : "" # disabled="disabled"/&gt;', width: 20 } ], dataSource: { transport: { read: { url: baseUrl + "api/PriceListApi/GetInvoicingMethodList", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8" }, update: { url: baseUrl + "api/PriceListApi/UpdateInvoicingMethodList", dataType: "json", async: false, type: "POST", contentType: "application/json; charset=utf-8" }, parameterMap: function (options, operation) { if (operation !== "read" &amp;&amp; options) { return kendo.stringify(options); } else { return kendo.stringify(createInvoicingMethodRequest()); } } }, schema: { model: { id: "ActorId", fields: { Name: { editable: false }, ExportToGlif: { editable: false }, InvoicingPeriod: { editable: false }, ActorInvoicingParamsNumberOf…
tagged with: kendo-grid
tagged with: javascript
upvote count: 2
answer count: 1

http://stackoverflow.com/q/26219034
accepted answer: http://stackoverflow.com/a/26219258
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41119587
tagged with: css
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41119596
has answer: http://stackoverflow.com/a/26219258
has body: Basically, I need to display the last child div inside its parent at all times using a jQuery's scroll effect. The content of parent div is generated via PHP by the way. Here is my current code so far: HTML CODE: PHP GENERATED CONTENT GOES HERE PHP GENERATED CONTENT GOES HERE PHP GENERATED CONTENT GOES HERE PHP GENERATED CONTENT GOES HERE PHP GENERATED CONTENT GOES HERE PHP GENERATED CONTENT GOES HERE JavaScript that I use inside an ajax for the scroll effect: $('html, body').animate({ scrollTop: $(document).height() }, 'slow'); JavaScript that I tried to use to display the last div child at all times:
has comment: http://stackoverflow.com/comment/41120111
has comment: http://stackoverflow.com/comment/41119643
has comment: http://stackoverflow.com/comment/41119898
tagged with: javascript
tagged with: jquery
has title: How to display the last child div at all times?
has comment: http://stackoverflow.com/comment/41119680
has comment: http://stackoverflow.com/comment/41119784

http://stackoverflow.com/comment/41188892
has text: will need to show where you call this. Consider passing record count to html as `data-` attribute and checking that value in your click handler
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26256526
type: Comment

http://stackoverflow.com/a/26238126
downvote count: 0
has body: You're writing to $scope.myValues, and using that in the ng-repeat directive - but you're sorting the data only in getData() on the table params object. getData() doesn't ever change $scope.myValues, it only uses it to return a sorted array. What you really want to do is: Don't make the full dataset available on the scope, but store it in a variable inside the controller: var data = [{name: "Moroni", age: 50}, ...] $defer.resolve($filter('orderBy')(data, params.orderBy())); Use $data inside the HTML code, because this is what accesses getData(): &lt;tr ng-repeat="user in $data"&gt;
score: 3
answers question: http://stackoverflow.com/q/26237405
upvote count: 3
type: Answer

http://stackoverflow.com/q/26253570
has answer: http://stackoverflow.com/a/26253697
has answer: http://stackoverflow.com/a/26253702
type: Question
has answer: http://stackoverflow.com/a/26253733
accepted answer: http://stackoverflow.com/a/26253733
possible better answer: http://stackoverflow.com/a/26253697
tagged with: javascript
has body: i have a html webpage with some pics. The pics are on the local pc. The problem is there are two possible locations for the pic. So i wonder if its possible to add an alternative picture path if the first path doesn´t exists. I know it´s possible with php but it would be nice if there is another solution. Thx
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: alternative picture source for html webpage
type: AnsweredQuestion

http://stackoverflow.com/q/26309382
tagged with: mailchimp
has title: mc:edit do not work in Mailchimp template with Mandrill Javascript API
type: Question
tagged with: mandrill
has body: I'm trying to send emails through the Mandrill API with Mailchimp templates. I am doing this in the cloud code with Parse.com, see here https://www.parse.com/docs/cloud_modules_guide#mandrill. The emails are sent just fine, however, the mc:edit fields are never updated. This is the only content in the template now: ship_id This is what my call in Javascript looks like, hope somebody sees my mistake. I'm running this in Parse.com cloud code if that makes any difference. Thanks a lot! var Mandrill = require('mandrill'); Mandrill.initialize('api-key'); Mandrill.sendTemplate({ template_name: "Drip campaign", template_content: [{ name: "ship_id", content:"Test Test" }], message: { text: "Hi", subject: "You have new mail", from_email: "info@example.com", from_name: "Thomas", to: [ { email: "answer@example.com", name: "Fred" } ], "headers": { "Reply-To": "answer@example.com" }, "important": false, "track_opens": true, "track_clicks": true, }, async: true },{ success: function(httpResponse) { response.success("Email sent!"); }, error: function(httpResponse) { console.error(httpResponse); response.error("Uh oh, something went wrong"); } }); }
tagged with: javascript
has comment: http://stackoverflow.com/comment/41295099
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41291800
favorite count: 0
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/41293924
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26325571
score: 3
has answer: http://stackoverflow.com/a/26314942
upvote count: 3

http://stackoverflow.com/q/26320794
upvote count: 3
possible better answer: http://stackoverflow.com/a/26321127
has title: Repeating a set of s in the same table row using AngularJS
has comment: http://stackoverflow.com/comment/41307203
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26321288
type: Question
has answer: http://stackoverflow.com/a/26321766
downvote count: 0
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: I want to create a table that, in its header, contains the names of each player for two teams in each . The scope has a variable teams which is a list of Team objects, each one having list of Player objects as an attribute. This is turning out to be way harder than I expected. {[ player.name ]} Partial Score Total Score is the easiest thing I have in mind - but this doesn't work. can't be placed inside a according to W3C (from what I understand), so the browser just takes the div and places it outside the table. I've tried directives as well - but these don't help. This is an example of my directive file. {[ player.name ]} Partial Score Total Score For example, if I have a <player-initials> directive with replace: 'false', the browser expels the non- element out of the table. Setting replace: 'true', fixes that, but then I get an error because there's more than one root element in the directive. I can't wrap the elements in the directive with anything because that would result in invalid HTML (as above). I've tried all combinations of element and attribute directives and replace, nothing gives me what I want. Any help?
tagged with: css
has answer: http://stackoverflow.com/a/26321127
favorite count: 0
accepted answer: http://stackoverflow.com/a/26321766
tagged with: angularjs

http://stackoverflow.com/comment/41263657
type: AnswerComment
score: 0
type: Comment
has text: You have to call `$(this).html(parseInt($(this).index())+1);` not only at `$(document).ready();` but each time the user add a line too. Like this you will see the right order.
comment on: http://stackoverflow.com/a/26297038

http://stackoverflow.com/comment/41270014
score: 0
has text: No, I mean detect it server side, just from the request of the browser...
comment on: http://stackoverflow.com/q/26300562
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41392701
type: AnswerComment
has text: dear if you are using double quotes within double quotes then it will show you error as PHP .to overcome from this problem you have to use backslash(\) befor inner double quote everywhere.Ex->echo "a \"apple\"" ; ->result-> a "apple"
type: Comment
comment on: http://stackoverflow.com/a/26337254
score: 0

http://stackoverflow.com/a/26353800
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26353751
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26353751
type: Answer
downvote count: 0
has body: $("#btnDelete").click(function () { $('#filterTable').find("tr:last-child").remove(); }); $("#btnClear").click(function () { $('#filterTable').html("") ; }); http://jsfiddle.net/842ur4zw/3/

http://stackoverflow.com/a/26244140
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26244055
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41167371
answers question: http://stackoverflow.com/q/26244055
has body: A plausible guess is that you've somehow bumped your version of IE to emulate IE8, which doesn't support indexOf() (see Why doesn&#39;t indexOf work on an array IE8?). You can do this (accidentally or otherwise) in various ways - see this answer here: https://stackoverflow.com/a/17877416/68231.
has comment: http://stackoverflow.com/comment/41167076

http://stackoverflow.com/q/26260449
has comment: http://stackoverflow.com/comment/41196505
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41196268
downvote count: 0
tagged with: duplicates
has comment: http://stackoverflow.com/comment/41196207
upvote count: 8
type: Question
has answer: http://stackoverflow.com/a/53489989
has comment: http://stackoverflow.com/comment/41196279
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41196086
has title: JavaScript: Removing duplicates in an array of arrays
has answer: http://stackoverflow.com/a/26261010
accepted answer: http://stackoverflow.com/a/26261010
has body: Currently using JavaScript and I need to go through an array of arrays to determine if there are any duplicate arrays, and then deleting those duplicated arrays. Runtime is of the essence in this case, so I was wondering what the most EFFICIENT way of doing this is. Is using a hash table desirable in this case? The scope of this would be to hash each sequence and then use the hash to determine whether that sequence occurs again. Hence, each sequence is an array within the master array, and any duplicates would be other arrays within the same array. Furthermore, it is extremely important that all individual arrays remain ordered themselves (i.e. the elements in the individual arrays must always keep their position). Also, all elements in the individual array are string values. Example: Assume that there is an array A whose elements are in turn the following arrays: A[0] = ["one", "two", "three", "four"] A[1] = ["two", "one", "three", "four"] A[2] = ["one", "two", "three", "four"] In the above example, A[0] and A[2] are duplicates and so the function should return A[0] and A[1], such that there is only one instance of the same array.
answer count: 3
has comment: http://stackoverflow.com/comment/41195942
has answer: http://stackoverflow.com/a/26261890
favorite count: 0
score: 8
tagged with: hash
tagged with: multidimensional-array
possible better answer: http://stackoverflow.com/a/26261890

http://stackoverflow.com/a/26293633
answers question: http://stackoverflow.com/q/26293517
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41257307
upvote count: 2
has comment: http://stackoverflow.com/comment/41271618
has comment: http://stackoverflow.com/comment/41257276
has comment: http://stackoverflow.com/comment/41261432
has body: Unfortunately, I believe it is impossible to make an exact match (group 0) in JavaScript for this. However, (?:[^y]|^)(y{3})(?!y) should match the group 1 to your requirements for all situations, including two instances being separated by a single non-y, start of string and end of string. Equivalently, ([^y]|^)(y{3})(?!y)/ will match the group 2, leaving group 1 to restore the first character that needs to be consumed by the regular expression if you are doing replacement. Example: var re = /([^y]|^)(y{3})(?!y)/g; "yyy0yyy0000yyyyyy00yy0yyyy0000yyy".replace(re, "$1---") // =&gt; "---0---0000yyyyyy00yy0yyyy0000---" "[yyy]zyyyyz[yyy]zyyyyyyyyz[yyy]".replace(re, "$1---") // =&gt; "[---]zyyyyz[---]zyyyyyyyyz[---]" "yyyzyyyyzyyyzyyyyyyyyzyyy".replace(re, "$1---") // =&gt; "---zyyyyz---zyyyyyyyyz---"
type: Answer

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/26219485
tags question: http://stackoverflow.com/q/26218823
tags question: http://stackoverflow.com/q/26315813
tags question: http://stackoverflow.com/q/26345223
tags question: http://stackoverflow.com/q/26341910
tags question: http://stackoverflow.com/q/26265745
tags question: http://stackoverflow.com/q/26230795
tags question: http://stackoverflow.com/q/26278030
type: Tag
tags question: http://stackoverflow.com/q/26253858
tags question: http://stackoverflow.com/q/26348053
tags question: http://stackoverflow.com/q/26328841
tags question: http://stackoverflow.com/q/26335538
tags question: http://stackoverflow.com/q/26284168
tags question: http://stackoverflow.com/q/26345996
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/26223490
tags question: http://stackoverflow.com/q/26323948
tags question: http://stackoverflow.com/q/26341766
tags question: http://stackoverflow.com/q/26215452
tags question: http://stackoverflow.com/q/26332087
tags question: http://stackoverflow.com/q/26306102
tags question: http://stackoverflow.com/q/26271289
tags question: http://stackoverflow.com/q/26251750
tags question: http://stackoverflow.com/q/26339110

http://stackoverflow.com/comment/41095123
has text: Note `input` elements have no content, so you can use ` ` or ` `, but not ` `.
comment on: http://stackoverflow.com/q/26205691
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41157975
has text: possible duplicate of [How to populate a cascading Dropdown with JQuery](http://stackoverflow.com/questions/18351921/how-to-populate-a-cascading-dropdown-with-jquery)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26239460

http://stackoverflow.com/a/26228928
answers question: http://stackoverflow.com/q/26228855
has comment: http://stackoverflow.com/comment/41139092
has comment: http://stackoverflow.com/comment/41138803
downvote count: 0
has body: Your problem is a failure to understand AJAX. Below is a $.post() example. First let's make the page that you want your Client (the Browser user) to see: viewed.php <?php $out = ''; // you could even do your initial query here, but don't have to ?> <?php /* if initial query took place */ echo $out; ?> Now you need your JavaScript in whatever.js. $(function(){ function getData(){ $.post('whatever.php', function(data){ // var htm = do a bunch of stuff with the data Object, creating HTML $('#output').html(htm); }); } getData(); // don't need if PHP query takes place on original page load setInterval(getData, 10000); // query every 10 seconds }); On whatever.php: <?php // $assocArray = run database queries so you can create an Associative Array that can be converted to JSON echo json_encode($assocArray); ?> The JSON generated by PHP shows up in the data argument, back in the JavaScript that created your PHP request: $.post('whatever.php', function(data){
has comment: http://stackoverflow.com/comment/41139467
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41138825
upvote count: 1
has comment: http://stackoverflow.com/comment/41139282
has comment: http://stackoverflow.com/comment/41140009
has comment: http://stackoverflow.com/comment/41139416

http://stackoverflow.com/comment/41226063
has text: @Johan the question states: "I solved this by looping, but I wanted to know if there is another way to do it.". OP is effectively asking if there's a better way to achieve the code which has already been written - which isn't displayed in the question.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26276767

http://stackoverflow.com/q/26281961
has answer: http://stackoverflow.com/a/26282083
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
favorite count: 0
has body: I am trying to make a table where when the user clicks on a value, to allow the user to edit the entry without having to go to a different area with HTML and JavaScript. I got basically everything I need, except I don't know why the focus keeps disappearing when clicking in the textbox/dropdown. Could someone help me out here? function valid_number() { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)) { return false; } else { return true; } } function getID(oObject, type, objname) { var id_fetched = oObject.id; var visit_id; var var_name; var old_value; var type; var objname; raw_values = id_fetched.split("|"); visit_id = raw_values[0]; var_name = raw_values[1]; old_value = raw_values[2]; var edit_id = document.getElementById("edit_id").value; var reason_for_change = document.getElementById("reason").value; //has the reason been filled out? if (reason_for_change === "") { alert('Cannot edit yet, must fill out reason for edit first!'); } else { //reason given, proceed with edit if (type === "text") { document.getElementById(id_fetched).innerHTML = "&lt;input type='text' name='" + objname + "' value='" + old_value + "' /&gt;"; }; if (type === "numeric") { document.getElementById(id_fetched).innerHTML = "&lt;input type='text' name='" + objname + "' value='" + old_value + "' onkeypress=\"return valid_number(event)\" /&gt;"; }; if (type === "yes_no") { document.getElementById(id_fetched).innerHTML = "&lt;select name='" + objname + "'&gt;&lt;option value='0'&gt;NO&lt;/option&gt;&lt;option value='1'&gt;YES&lt;/option&gt;&lt;/select&gt;"; }; if (type === "yes_no_opt") { document.getElementById(id_fetched).innerHTML = "&lt;select name='" + objname + "'&gt;&lt;option value='0'&gt;NO&lt;/option&gt;&lt;option value='1'&gt;OPT&lt;/option&gt;&lt;option value='2'&gt;REQ&lt;/option&gt;&lt;/select&gt;"; }; } } &lt;/script&gt; Then the table is: &lt;form method="GET"&gt; &lt;table id="visit_table" name="visi…
type: Question
has comment: http://stackoverflow.com/comment/41235703
has title: JavaScript losing focus on edit
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/41150452
has text: Add your script and js files into footer.php after wp_footer(). Try this, it may be solved your issue.
score: 0
comment on: http://stackoverflow.com/q/26235444
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41158243
comment on: http://stackoverflow.com/a/26239290
type: Comment
has text: I gave that a try and it didn't seem to have any effect. What's really weird is: the ng-model="dt" seems to work and update on other elements. For example, if I use the example date input field provided: I can see the value of that field update as I update the datepicker. But it won't output the date to the tag in the example.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26319444
upvote count: 0
has comment: http://stackoverflow.com/comment/41362038
answers question: http://stackoverflow.com/q/26307734
score: -1
has body: I have made an app like this for Android, it's called "Toggelis Newsreader". You need to parse the incoming Rss feed with a sax parser for example, keep track of the news the user already read, keep a list of feeds the user wants to follow etc. As for the update intervals, I let the user chose 15min, 30min, 1h etc or "auto". Auto adapts the frequency to the sites activity: frequent new infos --> interval down and vice versa. You should not permit intervals &lt; 15min as this could be perceived as aggressive by the scanned sites.
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41328599
type: Comment
comment on: http://stackoverflow.com/a/26332358
score: 2
has text: [Modified to not need the extra li element](http://plnkr.co/edit/2WhHz4KK4RXT42Y6PwXG?p=preview)
type: AnswerComment

http://stackoverflow.com/a/31289420
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26314836
downvote count: 0
has body: jsFiddle. Snippet: var container = document.querySelector('.container'); var items = document.querySelectorAll('.item'); var duration = 0.6; var ease = Expo.easeOut; var numItems = items.length; var i; container.addEventListener('click', onContainerClicked, false); for (i = 0; i &lt; numItems; i += 1) { (function(index){ items[index].timeline = new TimelineMax({ paused: true }); items[index].timeline.fromTo(items[index], duration, { y: 0, autoAlpha: 0.4 }, { y: -104, autoAlpha: 1, ease: ease }); items[index].addEventListener('click', onItemClicked, false); }(i)); } function onContainerClicked() { reverseAll(); } function onItemClicked(e) { reverseAll(); e.target.timeline.play(); } function reverseAll() { for (i = 0; i &lt; numItems; i += 1) { items[i].timeline.reverse(); } } html, body { margin: 0; padding: 0; } .container { background: #444; width: 512px; height: 104px; } .item { float: left; margin: 2px 0 0 2px; width: 100px; height: 100px; } .item:nth-child(odd) { background: #0cc; } .item:nth-child(even) { background: #cc0; } &lt;script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.17.0/TweenMax.min.js"&gt;&lt;/script&gt; &lt;div class="container"&gt;&lt;/div&gt; &lt;div class="item"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="item"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="item"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="item"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="item"&gt;&amp;nbsp;&lt;/div&gt;

http://stackoverflow.com/comment/41242694
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26285580
type: Comment
has text: mhm alright, seems like a viable solution, ill look into the lib and try it out.

http://stackoverflow.com/q/26332502
has body: I just found this little bug when I wanted to show 1 single point using line chart.. I don't know why it didn't show the point. Here is the screenshot: Here is how I created my object: avg_payment = { labels: ["Jan"] datasets: [ { label: "Average_payment" fillColor: "rgba(220,220,220,0.5)" strokeColor: "rgba(220,220,220,0.8)" highlightFill: "rgba(220,220,220,0.75)" highlightStroke: "rgba(220,220,220,1)" data: [65] } ] } This is my current workaround, eventhough it still gives me the same result: if avg_payment.labels.length is 1 max_val = Math.max(avg_payment.datasets[0].data) opt = { scaleOverride : true scaleSteps : 2 scaleStepWidth : 1 scaleStartValue : max_val - 1 } myLineChart = new Chart(ctx1).Line(avg_payment, opt) Is there any workaround for this issue ?
has answer: http://stackoverflow.com/a/26352767
type: Question
tagged with: charts
tagged with: chart.js
upvote count: 5
score: 5
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26352767
tagged with: javascript
favorite count: 0
has title: ChartJS - Line chart issue with only 1 point
type: AnsweredQuestion

http://stackoverflow.com/q/26250291
has answer: http://stackoverflow.com/a/26250793
downvote count: 1
accepted answer: http://stackoverflow.com/a/26250373
favorite count: 0
has comment: http://stackoverflow.com/comment/41193093
has answer: http://stackoverflow.com/a/26250395
has answer: http://stackoverflow.com/a/26250373
tagged with: checkbox
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26250395
score: 1
has title: Passing checkbox values of a form as JSON?
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41190914
has body: Html code : Information First Name Last Name Do you offer any of the services? BI services Resell vendor's services Consulting Services Other servies No services Apply Now Json Code: In the above code am able to take the values of each textbox but when it comes to checkbox,i want to retrive multiple checkbox values inside json and want to pass it to Ajax.Can anyone tell me how can i take the multiple checkbox values in to Json??Any Help would be Appreciated..
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3

http://stackoverflow.com/comment/41363011
has text: How do you loop through it? `forEach` isn't working.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26351415

http://stackoverflow.com/comment/41084123
has text: I have changed `script(src='js/lib/socket.io.min.js')` to `script(src='http://localhost:3000/socket.io/socket.io.js')` and I have a different bug now, I get thousands of get requests; `GET /socket.io/?EIO=3&transport=polling&t=1412486327064-0 200 36.028 ms - 1552 GET /js/lib/socket.io.min.js?_=1412486327107 200 2.517 ms - 44814 GET /socket.io/?EIO=3&transport=polling&t=1412486327174-1 200 36.062 ms - 1552 GET /socket.io/?EIO=3&transport=polling&t=1412486327301-2 200 20.293 ms - 1552 GET /socket.io/?EIO=3&transport=polling&t=1412486327327-3 200 21.198 ms - 1552 .... `
comment on: http://stackoverflow.com/q/26198157
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26199948
tagged with: javascript
has comment: http://stackoverflow.com/comment/41084872
tagged with: jquery
has comment: http://stackoverflow.com/comment/41084602
has comment: http://stackoverflow.com/comment/41084470
has body: I have a controller which I used to save records into the database. I noticed that everytime the I save a record the entire view will flicker or postback. So I researched and I realized that I need to use a PartialView and an AJAX script to avoid from view postback. So far, what I've got are the details below but somehow I encountered trouble using them. Using the details below, when you post a comment, the div element named "ajaxcom" in the view where my initial comments are displayed will be gone and the comments were not even saved anymore into the database but instead I want to display my partial view into the ajaxcom div element after when you click the Post Comments button so that the entire view will not postback and just automatically displays the new comments within the ajaxcom div element. So I suspected there must have been something wrong with my ajax script below. How do I fix this? and what am I been missing?...Thanks AJAX Script: $(function () { $("#addcomment").on("submit", function (e) { e.preventDefault(); $.ajax({ url: this.action, type: this.method, data: $(this).serialize(), success: function (data) { // ajaxcom is the id of the div element where I want to display my partialview $("#ajaxcom").html(data); } }); }); }); Controller: [HttpPost] public ActionResult AjaxComments(CommentModel com) { if (ModelState.IsValid) { comrepository.InsertComment(com); //this is to insert the records } var vModel = new CreateViewModel(); vModel.Comments = comrepository.GetAllComments().ToList(); // AddComments is my partialview return PartialView("AddComments", vModel); } View: @using (Html.BeginForm("AjaxComments", "Profile", FormMethod.Post, new { id = "addcomment" })) { CommentModel Name Post your Comment here: } Comments @foreach (var item in Model.Comments ) { @Html.DisplayFor(modelItem => item.name) @Html.DisplayFor(modelItem => item.comment) }
has comment: http://stackoverflow.com/comment/41084561
score: 0
has comment: http://stackoverflow.com/comment/41084396
has comment: http://stackoverflow.com/comment/41084523
has comment: http://stackoverflow.com/comment/41084464
has comment: http://stackoverflow.com/comment/41084257
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41084841
has comment: http://stackoverflow.com/comment/41084749
has comment: http://stackoverflow.com/comment/41084267
has comment: http://stackoverflow.com/comment/41084456
has comment: http://stackoverflow.com/comment/41084683
linked to: http://stackoverflow.com/q/227624
tagged with: c#-4.0
has comment: http://stackoverflow.com/comment/41084298
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41084329
answer count: 0
has title: How to use ajax script to prevent from postback view when saving records into the database?
has comment: http://stackoverflow.com/comment/41084502
type: Question
has comment: http://stackoverflow.com/comment/41084344
has comment: http://stackoverflow.com/comment/41084727
has comment: http://stackoverflow.com/comment/41084496

http://stackoverflow.com/q/26297481
has comment: http://stackoverflow.com/comment/41264054
has answer: http://stackoverflow.com/a/26297744
has answer: http://stackoverflow.com/a/26297589
has answer: http://stackoverflow.com/a/26298183
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26297589
type: Question
has body: I am currently using a bootstrap collapsed navigation for when my site is viewed on a mobile. I want to hide my logo from the top of the page and put it inline with my toggle button to save some screen space. When I try to place my image into the navbar it doesn't seem to display, all that displays is my ALT text. Here is the code i'm currently using. Toggle navigation <?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'depth' => 2, 'container_class' => 'collapse navbar-collapse', 'menu_class' => 'nav nav-pills nav-justified', 'walker' => new wp_bootstrap_navwalker() )); ?>
accepted answer: http://stackoverflow.com/a/26297744
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41264045
has title: PNG Image not displaying
has comment: http://stackoverflow.com/comment/41264158
tagged with: css
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/41101509
type: Comment
score: 1
has text: you want to return a list of lists correct?
comment on: http://stackoverflow.com/q/26209291
type: QuestionComment

http://stackoverflow.com/a/26325033
has comment: http://stackoverflow.com/comment/41384466
upvote count: 1
has comment: http://stackoverflow.com/comment/41380226
score: 1
answers question: http://stackoverflow.com/q/26322831
has comment: http://stackoverflow.com/comment/41379924
downvote count: 0
has body: Try this: Within your jqplot you are missing seriesColors. Use it something like below: $.jqplot('chart3', [s1, s2, s3], { seriesColors:['#000000', '#ffffff', '#000000'], seriesDefaults:{ renderer:$.jqplot.BarRenderer, blah blah
type: Answer
has comment: http://stackoverflow.com/comment/41409310

http://stackoverflow.com/q/26230555
has body: I'm a novice attempting to use Angular JS to read Kickstarter json data and display it on a page. I have a code pen showing the basic code I'm using with a working sample data source, and then a not working example with the kick-starter source. http://codepen.io/anon/pen/KmCsc HTML First Project ID: {{kickstarter.projects[0].id}} Total hits: {{kickstarter.total_hits}} Javascript function recent($scope, $http) { $http.get('https://www.kickstarter.com/discover/recently-launched?format=json'). success(function(data) { $scope.kickstarter = data; }); } I might be making a mistake in how I reference the variable, I've been banging my head against a wall for several hours and can't see it. Your expertise is greatly appreciated. For reference Kickstarter recent project data is available in json format here: https://www.kickstarter.com/discover/recently-launched?format=json Thanks in advance for your help.
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/24097484
has answer: http://stackoverflow.com/a/26230843
has title: How to Read Kickstarter json with Angular JS
tagged with: arrays
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26230843
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
tagged with: kickstarter

http://stackoverflow.com/a/26257535
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26257322
has body: The correct way of doing it, is through popover options, as you can see on bootstrap documentation Could be something like this: $('.pop').popover( { container: 'body', placement: 'top', trigger: 'click' } ); As you can see, you can specify here multiple options, like where to append it, placement or trigger. Note, you must include this on a document ready block. Here is a jsfiddle.

http://stackoverflow.com/comment/41326652
comment on: http://stackoverflow.com/q/26331443
score: 0
type: QuestionComment
type: Comment
has text: Any reason to use `absolute` positioning?

http://stackoverflow.com/q/26290079
favorite count: 0
has comment: http://stackoverflow.com/comment/41251278
has title: How to prevent a base64 encoding from hanging the browser?
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41251527
type: Question
downvote count: 0
tagged with: javascript
tagged with: base64
tagged with: android
has body: At my 9-to-5 we regularly Base64 images when we work with image uploads for forms/apps etc for it's 'simplicity' in transmitting over AJAX and some other minor reasons. However we regularly have issues when using this method with 'old' Android devices. The browser sometimes hangs - displays an available memory error message and just restarts. Other times it just restarts without popping any alerts. This happens only on large images and on old Android devices that have a lot of apps running etc, etc. One solution is to reduce the size of the image before DataUrl'ing the whole thing - but sometimes this is not enough - we need the image to be of a relative size, e.g we can't use a pinhead size of an image. How can we prevent the browser from hanging over this? I have thought of a solution where I would use WebWorkers to asynchronously encode it in the background - but I am thinking what difference would that make? The UI might not freeze but memory is being used anyway. Are there any other possible solutions? Note: We are targeting only Android 4.1+ and iOS6+ Anyway, This is the function we currently use for resizing and encoding to Base64. function resizeCanvasImage(img, maxWidth, maxHeight) { var imgWidth = img.width, imgHeight = img.height; var ratio = 1, ratio1 = 1, ratio2 = 1; ratio1 = maxWidth / imgWidth; ratio2 = maxHeight / imgHeight; // Use the smallest ratio that the image best fit into the maxWidth x maxHeight box. if (ratio1 &lt; ratio2) { ratio = ratio1; } else { ratio = ratio2; } var canvas = document.createElement("canvas"); var canvasContext = canvas.getContext("2d"); var canvasCopy = document.createElement("canvas"); var copyContext = canvasCopy.getContext("2d"); var canvasCopy2 = document.createElement("canvas"); var copyContext2 = canvasCopy2.getContext("2d"); canvasCopy.width = imgWidth; canvasCopy.height = imgHeight; copyContext.drawImage(img, 0, 0); // init canvasCopy2.width = imgWidth; canvasCopy2.height = imgHeight; copyContext2.drawImage(canva…

http://stackoverflow.com/comment/41303953
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26267582
has text: @Eliseod'Annunzio, you should be able to move your code from the `onclick` into the function. Also your Analytics code doesn't put `_gaq` in the global namespace?

http://stackoverflow.com/comment/41236006
type: AnswerComment
type: Comment
score: 0
has text: @squint Could you name some? I'd like to know which ones.
comment on: http://stackoverflow.com/a/26281951

http://stackoverflow.com/comment/41099620
type: Comment
type: QuestionComment
has text: switches are quicker than if then's but you are having to write more lines with a switch to accomplish the same result and for very very insignificant performance.
comment on: http://stackoverflow.com/q/26207772
score: 0

http://stackoverflow.com/q/26280386
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26280625
has title: How to right use promises and $q to handle asynchronous calls in Angular?
type: Question
answer count: 2
tagged with: javascript
score: -1
downvote count: 1
has body: I have code with following structure (pseudocode): Page init (app starts): a] getDateRange -> Get array of date range (for example array with 10 items) b] getResultFromDatabaseForDateRange -> Assync task which return JSON object after each call I would like to call method b in for each cycle and each returned JSON Array object store into class global variable. After receiving the all responses from b i would like to set whole filled object into scope. Could somebody give me the example how can I do it in Angular right way? Thanks for any advice. I tried to do this by this way but it doesn't works (code is simplified because of length): $scope.getDateRange = function(direction) { console.log('Trying to set date range for ' +direction); switch(direction) { case 'today': console.log("Trying to set date range for this week - "+countOfWeeksInPast+" weeks"); dateTo = moment().day(7).format('YYYY-MM-DD'); dateFrom = moment().day(1).format('YYYY-MM-DD'); console.log(dateTo); console.log(dateFrom); // CREATE THIS WEEK - 10 WEEKS RANGE IN PAST for (var i = 0; i &lt; countOfWeeksInPast; i++) { var row = {}; if(i==0) { row.ID = i; row.DATE_TO = dateTo; row.DATE_FROM = dateFrom; dateRanges.push(row); } else { row.ID = i; row.DATE_TO = dateTo = moment(dateTo).subtract(7, 'days').format('YYYY-MM-DD'); row.DATE_FROM = dateFrom = moment(dateFrom).subtract(7, 'days').format('YYYY-MM-DD'); dateRanges.push(row); } } $scope.getResultFromDatabaseForDateRange('create_new').then(function(result){ // THIS GIVES THE VALUE: //alert("Result is" + JSON.stringify(result)); console.log("Returned Result is: " + JSON.stringify(result)); //return result; }, function(e){ $ionicLoading.show({ template: $translate.instant('ERROR_DATABASE'), duration:1000 }); }); } }; $scope.getResultFromDatabaseForDateRange = function(listAction) { console.log('trying to get data for selected date ranges'); // SHOW LOADING MESSAGE $ionicLoading.show({ template: 'Loading data' }); var deferred = $q.defer(); // INSTANTIA…
tagged with: asynchronous
favorite count: 0
has answer: http://stackoverflow.com/a/26280710
tagged with: angularjs
type: UnansweredQuestion
tagged with: angular-promise
upvote count: 0

http://stackoverflow.com/a/26286902
upvote count: 2
type: Answer
has body: Based on @Blackhole's suggestion, you can work this out by cancelling your original $timeout. Here is how you would do it: var timer; $scope.change = function(){ $timeout.cancel( timer ); timer = $timeout(function() { redraw_graph() },2000); } Check below plunker to see how it works. An alert box (only one) will popup 2 seconds after you are done with all your changes on the input field. That is, if you change the input field before 2 seconds, you delay the popup by another 2 seconds. http://plnkr.co/edit/v08RYwCDVtymNrgs48QZ?p=preview EDIT While above is one method of doing it, AngularJS has come up with its own implementation for this particular feature in v1.3+. ngModelOptions can be used.
has comment: http://stackoverflow.com/comment/109053134
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26286403

http://stackoverflow.com/q/26208980
score: 0
answer count: 1
has title: Query entire class vs first object in the class
tagged with: javascript
tagged with: parse-cloud-code
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26211912
tagged with: parse-platform
type: Question
accepted answer: http://stackoverflow.com/a/26211912
has body: In my cloud code I want to retrieve the first object in the "Messages" class. Then i want to grab some information from that object, send it to another class, and finally delete that object from the "Messages" class i originally pulled it from. My question is do i need to query the entire "Messages" class just to get the first object in it? I don't want to slow down my app due to inefficient code. Parse.Cloud.afterSave("sendMessage", function(Parse.Message, response) { var body = null; var senderName = null; var senderId = null; var randUsers = []; var query = new.Parse.Query(Parse.Message); query.find({ success: function(results){ body.push(results[1].get("messageBody")); senderName.push(results[1].get("senderName")); senderId.push(results[1].get("senderId")); response.success(getUsers); }, error: funtion(error){ response.error("Error"); } }); }); to avoid confusion: "getUsers" is an arbitrary function call.

http://stackoverflow.com/q/26330646
tagged with: javascript
tagged with: jquery
tagged with: tomcat
score: 0
has body: We have a mobile app which only runs on ipad. In the app, user submits a form and the app will use js/jquery to call a restful service on server. The server is a tomcat 6 and web application uses spring + hibernate frameworks. at the dev server we have encountered the cors problem and i added the corresponding filter in web.xml INSIDE my app and of course the jar files. It went well on the dev, qa and live server and the app could communicate with the server in harmony. But later today i just got a error report from the client that the app can't upload the data to server unless reinstall the app, in which way all the data saved in app would be gone. I tested using either javascipt and also inside the app. The weird thing is I always got the exception using the script: XMLHttpRequest cannot load https://mobilesso.vw.com.cn/ssso/scc/registerSCCF. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. and always am able to upload the data to server via app. I was wondering why it is happening right now. The mobile app and the web appliation works togother fine for like a week and why it stops from now on. And why there is no issue inside the app but js does. Any advice would be helpful. There is the client test code: test the connectivity And i used following maven dependency: com.thetransactioncompany cors-filter 1.9.3 And set the WEB-INF/web.xml: CORS com.thetransactioncompany.cors.CORSFilter CORS /*
answer count: 0
type: UnansweredQuestion
has title: Access-Control-Allow-Origin suddently doesn't work
type: Question
has comment: http://stackoverflow.com/comment/41325648
has comment: http://stackoverflow.com/comment/41325236
has comment: http://stackoverflow.com/comment/41325383

http://stackoverflow.com/comment/41148339
score: 4
has text: What kind of security risk are you talking about?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26234625

http://stackoverflow.com/a/26272273
upvote count: 1
answers question: http://stackoverflow.com/q/26268984
has comment: http://stackoverflow.com/comment/41256689
has comment: http://stackoverflow.com/comment/41235191
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41239126
has comment: http://stackoverflow.com/comment/41252155
has comment: http://stackoverflow.com/comment/41272774
type: Answer
has body: Looks like u need nested model here: Here is an prototype to catch the idea, for more info checkout this post 1) create model and collection for items var Item = Backbone.Model.extend({ defaults: { "title": "no-title", "color": "no", "type": [], "price": "0" } }); var ItemsCollection = Backbone.Collection.extend({ model: Item }); 2) create parent model, looks like page in your case: var PageModel = Backbone.Model.extend({ defaults: { page: 0, date: 'now', total: 0, items: [] }, initialize: function() { var items = this.get('items'); this.set('items', new ItemsCollection(items)); } }); If you have an array in JSON resp, u can create PageCollection as well.
score: 1
accepted answer of: http://stackoverflow.com/q/26268984

http://stackoverflow.com/comment/41314004
comment on: http://stackoverflow.com/a/26324741
has text: @T.J.Crowder - Right :-) I didn't see that!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26265827
has body: I have a list of elements in an array in Javascript as follows: myArray = ["Datastore one - free space 34.23GB", "Datastore two - free space 56.23GB",...] and so on. I would like to sort the array on the freespace, so in the example above Datastore two would be the first element in the array. The array is always constructed with "- free space xx.xxGB", but the free space could be 5 digits in some cases, so xxx.xxGB for example. Can anyone help provide a way of sorting the array please? I see I can use something like "*- free space\s[1-9][0-9]*GB" So would this be like myArray.sort("*- free space\s[1-9][0-9]*GB") ? Is this correct or how would I do this? Many thanks in advance.
score: 0
answer count: 3
tagged with: arrays
tagged with: javascript
has title: Sorting Javascript array with strings and numbers
accepted answer: http://stackoverflow.com/a/26265897
possible better answer: http://stackoverflow.com/a/26265884
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26265897
has answer: http://stackoverflow.com/a/26266014
type: Question
has answer: http://stackoverflow.com/a/26265884

http://stackoverflow.com/q/26234481
has answer: http://stackoverflow.com/a/26234545
has body: I'd like to replace .html extensions with JavaScript for links inside a web page which not contain protocols like http:// and https:// to ensure they are local links. I've tried something like this but won't work properly: The string Replace me DON'T replace me DON'T replace me The regex /href="^(http:|https:)(.*?).html"/gm It's not clear for me how to negate protocols inside regex, if I place them nothing is matched.
type: Question
accepted answer: http://stackoverflow.com/a/26234550
tagged with: javascript
has title: Replace href links extensions if are local
tagged with: replace
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26234563
tagged with: regex
has answer: http://stackoverflow.com/a/26234550
possible better answer: http://stackoverflow.com/a/26234545
type: AnsweredQuestion

http://stackoverflow.com/comment/41256696
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26279398
has text: You know what @Reinmar? I found the answer in the link you provided on my first post. Cheers! :)

http://stackoverflow.com/q/26195091
possible better answer: http://stackoverflow.com/a/26195244
upvote count: 20
has answer: http://stackoverflow.com/a/26195244
tagged with: javascript
has answer: http://stackoverflow.com/a/30021867
score: 20
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I am trying to find out the path through which an event has bubbled. For example , I have a mark up like Now if btn2.3.1 was clicked, I wish to see the entire path the event has bubbled up through which is btn2.3.1 -> div2.3 -> div2 ->container . Is there a way of doing this with only putting a handler on the container ? (No Jquery please) I found a event.path array.Which does this stuff, but couldn't find much details about it.Is it cross browser? What is the correct way to achieve this ?
favorite count: 0
answer count: 5
accepted answer: http://stackoverflow.com/a/30021867
has answer: http://stackoverflow.com/a/58213393
has answer: http://stackoverflow.com/a/61322347
type: AnsweredQuestion
has title: determine event path in DOM Event bubbling
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/48828932
linked to: http://stackoverflow.com/q/39245488

http://stackoverflow.com/comment/41233328
has text: Please note that there is a big difference between `sub.c = "x"` and `sub = null`. In the first case you are *reading* the value of `sub` and mutate the object, in the second you are *writing* a new value to `sub`.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26280154

http://stackoverflow.com/comment/41306938
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26320778
has text: Yes I just have a toggle button and I want it to display in real time how long it has been since you initially pressed the button, until you stop it. That's why I need a setInterval, for it to look for changes and display them.

http://stackoverflow.com/comment/41314568
has text: Your JavaScript looks like it creates multiple ` ` elements that share the `'btnDelete'` `id`? Could you show an example of the HTML/DOM that's generated by that script?
type: Comment
comment on: http://stackoverflow.com/q/26325035
type: QuestionComment
score: 0

http://stackoverflow.com/q/26215739
possible better answer: http://stackoverflow.com/a/26216120
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26216120
has title: passing variable to javascript function fails in asp:dropdownlist
linked to: http://stackoverflow.com/q/553813
type: Question
has answer: http://stackoverflow.com/a/26216154
tagged with: javascript
has comment: http://stackoverflow.com/comment/41113361
score: 0
answer count: 3
tagged with: onchange
has answer: http://stackoverflow.com/a/26216157
tagged with: drop-down-menu
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/26216154
has body: Currently I have a function called in the following way: &lt;script type="text/javascript"&gt; getCities('&lt;%=BusinessID %&gt;'); &lt;/script&gt; This works without any problem, now I want to do the same on an onchange event in a asp:dropdownlist as following: &lt;asp:DropDownList ID="ddlAddressSPC" runat="server" clientidmode="Static" AutoPostBack="False" onchange="javascript:getCities('&lt;%=BusinessID %&gt;');" Width="306px" CssClass="txt12NormalLeft" ToolTip="Select State|Province|County" /&gt; But now the ASP.net variable isn't evaluated and is passed as &lt;%=BusinessID %> instead of the value. If I do the same code in a normal HTML select it isn't a problem. What am I missing here?

http://stackoverflow.com/q/26288241
answer count: 4
has answer: http://stackoverflow.com/a/26289757
type: AnsweredQuestion
downvote count: 0
tagged with: innerhtml
has title: How can I make inputs display inline?
type: Question
accepted answer: http://stackoverflow.com/a/26290283
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/26290283
has answer: http://stackoverflow.com/a/26288514
has answer: http://stackoverflow.com/a/65193622
favorite count: 0
has body: I can't seem to figure out how to display the two inputs in the following code as {display: inline} format so that they appear next to each other rather than on separate lines. I've looked at other posts and have tried jQuery, &lt;style&gt; tags, .setAttribute etc. in order to try and add this CSS style. I've also tried to create a class in the HTML with the requisite display: inline command in the CSS. I created this function to open up once a button on my homepage is clicked. Everything works fine, I just want the two inputs (text and button) to line up next to each other. Any idea of where I am going wrong? I am a beginner. var counter = 1; var limit = 2; var newdiv = document.createElement('div'); function addInput(divName){ if (counter == limit) { (counter); } else { nFilter.className = 'input'; newdiv.setAttribute("style", "display: inline;"); newdiv.innerHTML = "&lt;br&gt;&lt;input type='text' placeholder='Postal Code' name='myInputs[]'&gt; " + " &lt;input type='button' value='Lets Go!' onclick='url(file:///C:/Users/Joy/Documents/ZapList/HoldingPage.php)'&gt;"; document.getElementById(divName).appendChild(newdiv).span; counter++; } }
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26289757
upvote count: 4
tagged with: css

http://stackoverflow.com/q/26203750
upvote count: 1
has body: I design input box for insert tags using select2 plugin like this : HTML : &lt;input id="tags" class="text-input form-control" type="text" name="tags" size="24" placeholder="tags" &gt; JS:(in docs) $(document).ready(function () { $("#tags").select2({ tags: ["red", "green", "blue"], maximumInputLength: 10 }); }); this worked for me and show drop down for default red, green,blue. but i need to remove tags from default drop down. my mean is i design my input without default tags in dropdwon. how do create this ? Demo FIDDLE
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41090962
has answer: http://stackoverflow.com/a/26204305
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
tagged with: jquery-select2
accepted answer: http://stackoverflow.com/a/26204305
type: AnsweredQuestion
has title: jQuery select2 tags without default value
score: 1

http://stackoverflow.com/a/26249475
score: 2
downvote count: 0
has body: Try to this $(document).ready(function(){ $('.booklist&gt;li&gt;a').click(function(){ $('.booklist&gt;li&gt;a + article').slideUp(); $(this).next('article').slideDown(); }); }); Demo ----------------- Updated Code here $(document).ready(function(){ $('.booklist&gt;li&gt;a').click(function(){ $(this).next('article').slideToggle(); $(this).closest('li').siblings('li').find('article').slideUp(); }); }); Updated Demo
upvote count: 2
answers question: http://stackoverflow.com/q/26249418
type: Answer

http://stackoverflow.com/q/26276939
type: Question
has answer: http://stackoverflow.com/a/26278866
answer count: 2
has title: Meteor: define server-functions that are available for methods
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: meteor
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26277409
has body: What I'm trying to do is the following: function doSomething(query){ //code } Meteor.methods({ methodOne: function() { var res = doSomething("1"); //some stuff return res; }, methodTwo: function() { return doSomething("2"); } }); If this all is written in the same file everything is okay. But if the function is defined in a different file, the method will end with an exception of a missing function. My aim is to define this function in a Meteor package and call it from another package with an method. The function itself should be not accessible for clients, only by given calls - so the methods are the interface for the user. Any ideas how to solve that? Maybe with JS object with functions bound, that is only exported to the server by the package? Any help is appreciated! Thanks in advance
upvote count: 1
tagged with: methods

http://stackoverflow.com/comment/41280645
has text: http://www.codelord.net/2014/04/15/improving-ng-repeat-performance-with-track-by/
comment on: http://stackoverflow.com/q/26306102
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/26321214
type: Answer
score: 0
has body: To access the element that triggered the event you can do this element.onkeyup = function(e){ var targetElement = e.target; }
answers question: http://stackoverflow.com/q/26321056

http://stackoverflow.com/comment/41082007
has text: Yeah that method works as well thanks for you're help
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26198615

http://stackoverflow.com/comment/41271715
type: Comment
comment on: http://stackoverflow.com/q/26301453
has text: RTM: http://support.sharethis.com/customer/portal/articles/475019-open-widget-in-new-window-
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41163267
has text: Yes, tried that. Same errors happen. IE: blocks script and Firefox provides an error that says:"The address wasn't understood." Chrome handles it fine.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26227399
type: QuestionComment

http://stackoverflow.com/a/26325313
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41315227
has body: HTML File upload form: &lt;input type="file" id="fileinput" name="fileinput"&gt; Event listener for file upload form: document.getElementById('fileinput').addEventListener('change', showLength); Callback for listener: function showLength(fileUploadEvent) { var linesArray; var reader = new FileReader(); // set up the event handler for when the file is loaded reader.onload = function() { console.log("Total file length: " + this.result.length); linesArray = this.result.split('\n'); for (var i=0, l=linesArray.length; i&lt;l; i++) { console.log("Line #" + i + " Length: " + linesArray[i].length); } } // fire off the loading of the file as a text file reader.readAsText(fileUploadEvent.target.files[0]); } Full plunkr example here http://plnkr.co/edit/Kcf4LAlxN5Hqgjg0cEJb
type: Answer
accepted answer of: http://stackoverflow.com/q/26325036
downvote count: 0
answers question: http://stackoverflow.com/q/26325036

http://stackoverflow.com/comment/41112583
has text: @Jonny5 yep the first one take 13 steps to finish whether the second lookahead takes 15 steps to finish.
comment on: http://stackoverflow.com/a/26215100
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41135816
has text: @dev-m I just don't understand what is not working... :(
type: AnswerComment
comment on: http://stackoverflow.com/a/26225277
score: 0
type: Comment

http://stackoverflow.com/comment/41288445
comment on: http://stackoverflow.com/q/26310468
type: Comment
type: QuestionComment
has text: I combined the text because I have a lot of other html between the head and the text input. I placed in the jquery.autocomplete.js an alert() function on load and it popped up. I tried two different jquery.autocomplete.js files from the jquery website too.
score: 0

http://stackoverflow.com/comment/129701364
has text: Be wary using `parseInt(...)` here, because there could be floating point values when the user zoomed his/her browser in/out.
comment on: http://stackoverflow.com/a/26252323
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41200827
comment on: http://stackoverflow.com/q/26262502
has text: Vertical images do not need to be adjusted They drop in perfectly
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41334054
score: 0
has text: @T.J.Crowder why? What if someone else also added something with the same name? Or is it because it's so rare?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26296097

http://stackoverflow.com/a/45504329
score: 0
has body: Looking for the solution for same issue last couple of hours, dig out every possible way but finally got the solution by Renaming angular module name 'app' to something else i.e 'myApp'. then it start working. Amended code here define([ 'require', 'angular', 'app', 'routes' ], function (require, ng) { 'use strict'; require(['domReady!'], function (document) { ng.bootstrap(document, ['myApp']); }); }); My app.js file: define([ 'angular', './controllers/index', './directives/index', './filters/index', './services/index' ], function (ng) { 'use strict'; return ng.module('myApp', [ 'app.services', 'app.controllers', 'app.filters', 'app.directives', 'ngFx', 'ngRoute' ]).config(function ($urlRouterProvider) { $urlRouterProvider.otherwise('/'); }); });
type: Answer
answers question: http://stackoverflow.com/q/26293546

http://stackoverflow.com/a/27721256
type: Answer
score: 3
answers question: http://stackoverflow.com/q/26278701
upvote count: 3
has body: An interesting side effect of how the typeahead directive position works, let's you do this with a simple template overwrite. The active difference is: ", width: position.width+'px'" of course the effect is global. angular.module("template/typeahead/typeahead-popup.html").run(["$templateCache", function($templateCache) { $templateCache.put("template/typeahead/typeahead-popup.html", " \n" + " \n" + " \n" + " \n" + " \n" + ""); }]);
downvote count: 0

http://stackoverflow.com/comment/133094492
type: QuestionComment
has text: Instead of using socket.io in possibly unsupported ways (non standard api can break overtime), it may be better to use events.EventEmitter() instead. All listeners will instead use the eventEmitter.on(), and your emitLocally + actual emit will both call the proxy.
score: 0
comment on: http://stackoverflow.com/q/26324169
type: Comment

http://stackoverflow.com/comment/41269217
has text: Well the first thing I would say is that it's not really necessary to create flat models. This is one of the main benefits of JSON, that it allows you to serialize more complex data objects simply. It's extremely rare that I ever find the need for flat data models. I think that mindset is an outdated leftover from old relational database design, where a row of data was always retrieved in a flat de-normalized format.
score: 0
comment on: http://stackoverflow.com/q/26268984
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26348477
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41357904
type: Question
tagged with: c#
answer count: 1
tagged with: javascript
upvote count: 1
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/26348638
has comment: http://stackoverflow.com/comment/41357985
has title: asp.net execute javascript function after finishing the button click
has answer: http://stackoverflow.com/a/26348638
type: AnsweredQuestion
has body: I have this asp.net button &lt;asp:Button ID="okButton" runat="server" Text="Okay" OnClick="okButton_Click" /&gt; this is the onButton_Click function protected void okButton_Click(object sender, EventArgs e){ //bla bla bla //bla bla bla } I have also this javascript function function callCenterDailyChartYMC() { //bla bla bla } My question How can I execute that javascript function after finishing executing the button on click function? Thanks

http://stackoverflow.com/q/26208116
answer count: 1
has title: Change div background image, js works in chrome but not ie or firefox?
favorite count: 0
has body: Basically I want the user to be able to click and change the background, and for there to be multiple backgrounds, for a specific div. This works perfectly in Google Chrome but not in IE or Firefox. HTML: CSS: #palette { border: 2px solid white; width: 25px; } #palette div { height: 25px; width: 25px; } .lightblue { background: lightblue url(http://www.textureking.com/content/img/stock/big/DSC_4279.JPG); } .gold { background: gold url(http://www.textureking.com/content/img/stock/big/DSC_4287.JPG); } .aqua { background: aqua url(http://www.textureking.com/content/img/stock/big/DSC_4274.JPG); } JS: $(document).ready(function() { // attach onclick event to your palette colors $('#palette div').on('click', function() { // get background of selected palette color var bg = $(this).css('background'); // change the background of the body $('#primary').css({ 'background': bg }); }); }); http://jsfiddle.net/KNutQ/1/ It's not showing any errors and other javascripts run, so I'm not really sure what the problem is. If it's easy to fix please leave an answer, if not I will try it this way: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_backgroundimage
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26251368
tagged with: internet-explorer
score: 1
upvote count: 1
type: Question
tagged with: firefox
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41099154

http://stackoverflow.com/a/26238961
answers question: http://stackoverflow.com/q/26238703
has comment: http://stackoverflow.com/comment/41157462
score: 0
type: Answer
has body: You need to add a trigger for the events that arent firing, just like you have for the rest of them. if (jQuery(this).attr("value") == "answer4") { jQuery(".answer3").show("slow"); jQuery(".answer4").show("slow"); jQuery(".answer1and2").show("slow"); } if (jQuery(this).attr("value") == "answer6") { jQuery(".answer1and2").show("slow"); jQuery(".answer3").show("slow"); jQuery(".answer4").show("slow"); jQuery(".answer5").show("slow"); }`

http://stackoverflow.com/q/26246666
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: datatables
linked to: http://stackoverflow.com/q/25207147
upvote count: 1
has title: datatables | fnreloadajax() is not working properly
type: Question
has body: Im trying to reload the datatables from new ajax source. i mean on page load it loads from 1 source, but after some action on page, it needs to be loaded from another source. i am trying it through fnreloadajax() but it is not working, i mean all fnreload ajax do, it reloads the table but not from the new source?? i did read the docs for fnreloadajax() http://www.datatables.net/plug-ins/api/fnReloadAjax but when i tried like this. var GroupID = e.val; url = "admin/usersManagePermissions/listFormsInGroups_DT/"+GroupID; oTable.fnReloadAjax(url); i got no error, but also datatables dont reload the table from new source. it only loads the table from previous/original source which was defined to it. what is wrong here?
score: 1
has answer: http://stackoverflow.com/a/33141874
has comment: http://stackoverflow.com/comment/41171813
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26247230
tagged with: javascript
score: 0
tagged with: validation
tagged with: submit
answer count: 1
tagged with: button
has body: This code seems to be doing what I want it to, until the part where the user clicks submit and a validateInput() function is supposed to either submit the form or send an error alert message. I can't figure out what is wrong with the code. Can anyone help? This is the link to the actual code -- http://ciswebs.smc.edu/cis55/naruse_kevin_k/week2/default.html Week 2 cis 55 <body First Name: Last Name: Street City State Zip
has answer: http://stackoverflow.com/a/26247632
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41173039
has comment: http://stackoverflow.com/comment/41172893
has title: debugging issue in javascript with submit button function
tagged with: forms
type: Question

http://stackoverflow.com/a/26261382
has comment: http://stackoverflow.com/comment/41199294
has comment: http://stackoverflow.com/comment/41198436
has comment: http://stackoverflow.com/comment/41197988
has comment: http://stackoverflow.com/comment/41197873
has comment: http://stackoverflow.com/comment/41198178
score: 0
answers question: http://stackoverflow.com/q/26260444
has comment: http://stackoverflow.com/comment/41198563
has comment: http://stackoverflow.com/comment/41198428
has comment: http://stackoverflow.com/comment/41198092
has comment: http://stackoverflow.com/comment/41199154
has comment: http://stackoverflow.com/comment/41199116
has body: In your use case I would use the injector manual to keep a reference to $http in a closure. var $http = angular.injector(['ng']).get('$http'); Here is an updated plunk. This way you can keep the private things inside your controller. EDIT: just noticed that is way similar to @PSL solution. Sorry, I didn't notice his first solution. However, I'm bringing the manual injector, so I'm keeping this answer if that's ok by you! EDITEDIT: Updated the plunker to be a bit more testable.
type: Answer
has comment: http://stackoverflow.com/comment/41199662

http://stackoverflow.com/comment/41231409
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26279398
type: AnswerComment
has text: Just added config.allowedContent = true; but the result is still the same :/

http://stackoverflow.com/comment/42961692
type: QuestionComment
has text: @TRiG I have clearly mentioned what is not working. The functionality of triggering a label click event is not working. Please read the full question carefully. And in the question the update was the fix according to rohit. But it didnot work as well. So I have posted my fix in the answer which helped me to fix the issue.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26339380

http://stackoverflow.com/q/26200084
type: Question
has comment: http://stackoverflow.com/comment/41084775
tagged with: javascript
tagged with: ajax
has body: Been searching all day, found items similar but completely stuck... I want to pass a Google Maps Autocomplete Result (latlng) into a PHP Form along with PHP variables through one submit (not two buttons, i.e. to put JS variable in hidden field then submit form via submit button) Code at present: &lt;?php if (isset($_POST['submit'])) { // echo vars if they are working... echo "passed data &lt;br&gt;"; echo $_POST['first_name'] . "&lt;br&gt;"; echo $_POST['geocode'] . "&lt;br&gt;"; // Get variables, check data and store into DB... } ?&gt; Then: &lt;script type="text/javascript"&gt; var geocoder; function initialize() { // Search options var searchOptions = { componentRestrictions : {country: 'nz'}, types: ['geocode'] }; var input = document.getElementById('pac-input'); var autocomplete = new google.maps.places.Autocomplete(input, searchOptions); geocoder = new google.maps.Geocoder(); } function codeAddress() { var address = document.getElementById('pac-input').value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { document.getElementById('geocode').value = (results[0].geometry.location); } else { //alert('Geocode was not successful for the following reason: ' + status); } }); } google.maps.event.addDomListener(window, 'load', initialize); function submitthis() { codeAddress(); } &lt;/script&gt; &lt;script&gt; $(function(){ // Document Ready }); &lt;/script&gt; Finally: &lt;form id="myForm" name="myForm" action="google-text-input.php" method="post" &gt; First Name&lt;input name="first_name" type="text"&gt;&lt;br&gt; Address&lt;input id="pac-input" class="controls" type="text" placeholder="Search Box"&gt;&lt;br&gt; &lt;input id="geocode" name="geocode" type="text" value="null"&gt;&lt;br&gt; &lt;!-- to be hidden --&gt; &lt;input name="submit" type="submit" value="Submit" onclick="submitthis()"&gt;&lt;br&gt; &lt;/form&gt; I'd preferably like when I hit the Submit button it stores Google Maps result into h…
score: 0
has comment: http://stackoverflow.com/comment/41084621
answer count: 1
has title: Pass Javascript and PHP variables through PHP Form
tagged with: php
has answer: http://stackoverflow.com/a/26200634
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26200634

http://stackoverflow.com/comment/41266062
comment on: http://stackoverflow.com/a/26298111
type: Comment
has text: Just a query is it possible to always return minimum 30 random numbers before exiting, and Yeah, you are right i was just stuck at the random generation of number so i asked about that and of course it will have and exit part thanks for adding that in your code. Hope your piece of code will work in my module. :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26249163
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Blog editing problems
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26249191
has body: I am a novice blogger and i wanted to create a counter on my blog which will increase value when the button is click so far after searching for long on web i came up with this result &lt;script src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $('#AddButton').click( function() { var counter = $('#TextBox').val(); counter++ ; $('#TextBox').val(counter); }); }); &lt;/script&gt; now what i need is that people may click on the button twice so i want to make sure a person clicks only once from a browser and that value should be saved at least on the text box even for other people, please help me...
has comment: http://stackoverflow.com/comment/41176353
has comment: http://stackoverflow.com/comment/41176162
type: AnsweredQuestion
tagged with: counter
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26249191

http://stackoverflow.com/q/26226220
tagged with: highcharts
downvote count: 0
linked to: http://stackoverflow.com/q/3768895
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/31007084
has answer: http://stackoverflow.com/a/31007084
type: Question
has body: I am trying to create some json that will render a highchart graph with python/django. here is what my view looks like so far: class LineHighChart(object): title = {} def weight_graph(request): print 'weight graph' highchart = LineHighChart() title = { 'title': { 'text': 'Weight Chart', 'x': -20 } } highchart.title = title print highchart return JsonResponse(highchart, safe=False) This prints: &lt;shared.linehighchart.LineHighChart object at 0x1038a6890&gt; I then get the error: TypeError: &lt;shared.linehighchart.LineHighChart object at 0x1038a6890&gt; is not JSON serializable From the highcharts example, this needs to be embedded in a highcharts object like this: highcharts({ title: { text: 'Monthly Average Temperature', x: -20 //center }, How do I make my highcharts object look like the highcharts example?
accepted answer: http://stackoverflow.com/a/26231634
score: 1
has title: how to create highcharts formatted json structure with python
answer count: 2
tagged with: django
upvote count: 1
tagged with: python
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26231634
type: AnsweredQuestion

http://stackoverflow.com/q/26226843
has title: Define native method to sort array based on property in array
score: 0
has body: Been working with this simple task for a bit now and I just can't seem to figure out what the issue is. I have an array of objects, each object has a SetIndex property and I want to insert objects and maintain the array ordered by the objects Set Indices. I thought this was fairly simple but it does not seem to be working as I had expected. The native method inserts, but the chunk that checks if the array is empty always seems to evaluate to true, and overwrites index 0 every time and does not execute the splice. I think it is something simple about JS I am missing, but I can't seem to figure it out. Array.prototype.insertAtIndex = function(item) { for (i = 0; i &lt; this.length; i++) { if(i+1 &gt; this.length) { if(this[i].SetIndex &lt;= item.SetIndex &amp;&amp; this[i+1].SetIndex &gt;= item.SetIndex) { this.splice(i,0,item); } } } if(this[0].length == 0); { this[0] = item; } }; I run the following to test the function item1 = {SetIndex: 0,name: 'item1'}; item2 = {SetIndex: 1,name: 'item2'}; item3 = {SetIndex: 2, name: 'item3'}; item4 = {SetIndex: 3, name: 'item4'}; item5 = {SetIndex: 4, name: 'item5'}; console.log(item1.SetIndex); my_array = []; my_array.insertAtIndex(item2); console.log(my_array); my_array.insertAtIndex(item1); console.log(my_array); my_array.insertAtIndex(item5); I have tried using if(this[0] == undefined) as well to check if the array is empty but nothing works as I planned
answer count: 1
tagged with: javascript
tagged with: web
has answer: http://stackoverflow.com/a/26226949
has comment: http://stackoverflow.com/comment/41135431
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41134868
has comment: http://stackoverflow.com/comment/41134891
type: Question

http://stackoverflow.com/q/26201803
type: Question
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26201850
has title: jQuery push/join not storing in empty array
type: AnsweredQuestion
tagged with: arrays
has body: I am busy with a timer that is controllable by using the space bar. Press space bar x1 and it starts running, press it again, it stops and then it stores a value inside a container so that it can calculate an average of 5 eventually BUT I use the .push() method in jQuery to actually push it into an error called: scores = []; and then using a for loop that loops through the array and for some reason, it does it, but I think personally that the .push() function overwrites it... because without 5 values I am unable to calculate an average of 5... jQuery Please remind that I want that the value it gets when the timers stop to be pushed into the array scores = []; and stays and not to be overwritten and when the array has a value of 5 times, it calculates an average of 5. var int, ms=0, s=0, m=0; $('#swatch').text("00:00:00"); function swatch(){ var startTime = new Date().getTime(); int = setInterval(function(){ var time = new Date().getTime(); var dif = time-startTime; ms= dif%100; s = Math.floor(dif/1000)%60; m = Math.floor(dif/1000/60)%60; if(ms &lt; 10) { ms = '0'+ms; } if(s &lt; 10) { s = '0'+s; } if(m &lt; 10) { m = '0'+m; } $('#swatch').text(m+':'+s+':'+ms); },1); } $(document).on('keydown', function(e){ var scores = []; var result = $('#swatch').text(); if(e.keyCode == 32 &amp;&amp; !int){ swatch(); } else if (e.keyCode == 32){ clearInterval(int); int=0; scores.push(result); for (var i = 0; i &lt; scores.length; i = i + 1) { $('#score ol').append('&lt;li&gt;' + scores[i] + '&lt;/li&gt;'); } console.log(scores, scores.length); if(scores.length == 1) { console.log("You've got an average!"); } } });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26201850

http://stackoverflow.com/comment/41197892
score: 0
type: Comment
has text: this is really good.. thanks Amit. Only issue is that now when it shows the third 'leermat' id which is the last content div, if the user clicks on 'pag-next' again it hides the third content div and since there is nothing to replace it with the page goes blank. Is there a way to make the 'pag-next not work after it has showed 'leermat3'. so that from there it can only go back 'page-prev'.
comment on: http://stackoverflow.com/a/26260066
type: AnswerComment

http://stackoverflow.com/a/26232105
type: Answer
has comment: http://stackoverflow.com/comment/41148036
score: 2
accepted answer of: http://stackoverflow.com/q/26231811
has comment: http://stackoverflow.com/comment/41144441
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41144336
has body: Add flag isAdmin to profile object: Accounts.createUser({ username:'Greg', password:'default', profile:{ isAdmin: 1 } }); See docs Accounts.createUser methods allows to add ONLY fields username, password, email and profile to user object. Meteor.methods({ makeUser: function(attributes) { var user = Meteor.user(); if (user.profile &amp;&amp; user.profile.isAdmin) Accounts.createUser(attributes) else console.log('User ' + user.username + ' created a player.') } }) Update Consider using package roles.
upvote count: 2
answers question: http://stackoverflow.com/q/26231811

http://stackoverflow.com/a/26345544
downvote count: 0
type: Answer
has body: It is appending the class error to the class that becomes 'errorerror' so CSS does not work. result.className += 'error '; This should work for you or you can check before adding class that if it has the class error or not then add accordingly
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26345441

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/26263704
tags question: http://stackoverflow.com/q/26245389
type: Tag
tags question: http://stackoverflow.com/q/26285923
tags question: http://stackoverflow.com/q/26249606

http://stackoverflow.com/a/26719681
score: 1
has body: you can use jquery toggle function to avoid extra "if" statement $('.wp-video').on('click', function() { $('.video-title').toggle(2000); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26217323
upvote count: 1

http://stackoverflow.com/comment/41148411
type: AnswerComment
has text: @Sukima: Yes, it could, but `filter` isn't supported in as many browsers as `concat`. For example IE 5.5 supports `concat` but you need IE 9 or later to get support for `filter`.
type: Comment
comment on: http://stackoverflow.com/a/26234175
score: 0

http://stackoverflow.com/comment/41286723
has text: I have mentioned my cakephp version in the post it is 2.4.5 and what about the URL ? should I keep the way it is ? I am going to check debug and ->is('ajax'). by the way what if I leave the if statement for checking if it is ajax ? I want first of all see data in controller coming from ajax post.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26309360

http://stackoverflow.com/comment/41095345
comment on: http://stackoverflow.com/q/26205541
score: 1
type: Comment
type: QuestionComment
has text: Have you seen [this question](http://stackoverflow.com/questions/17394006/adding-circles-to-multiline-graph-with-d3-js)?

http://stackoverflow.com/a/26207640
answers question: http://stackoverflow.com/q/26207453
has body: The problem is not JavaScript, but your understanding of table, tr, and td. You also have a double << that has no sense. In general, you need to know how HTML works. · table is just a mark to start a table. · tr is to create a new row. · td is not create a new column. (The same as th) Important! Note that each opening tag has to have a closing tag with /, for example , and has to be closed in the inverted order, so closing them this way is an error. So, looking at your code, your table will be made this way (considering that ALEast has a length of 3, for example): Line #01: Line #02: N 10*N 100*N 1000*N Line #03: ' + ALEast[0] + ' Line #04: ' + ALEast[1] + ' Line #05: ' + ALEast[2] + ' Line #06: 1 < Line #07: 2 < Line #08: 3 < Line #09: 4 < Line #10: 5 < Line #11: 6 < Line #12: I'll explain what you have a bit: In the line #01 you are creating the table, everything fine with this. In the line #02 you are creating the header. As you see you have created a new row (tr) and created a new colum for each header with (th). Everything is fine with this too. Now in the lines from #03 to number #05 (The first loop), for each item you are just creating a new row with tr and each row will only have 1 colum (only one td) And the second loop (from line #06 to line #11), each time you are creating 2 rows (2 tr). Note that the first tr don't have the closing tag /tr so the second row is created inside the first row (rowception), this is an error. Also the same with the next, you are creating 2 colums with 2 td and the second column is created inside the first colum because it don't has the closing tag /td. After that you put the count and close the row (?) with /tr, then you put a double << (? again) and close 2 columns with /td. After all this aberration, you end your table with in the line #12. So, in general, when you design/program you must understand what you are doing. For this you need an high dose of HTML coding tutorials. Start here: http://www.w3schools.com/html/
has comment: http://stackoverflow.com/comment/41099640
has comment: http://stackoverflow.com/comment/41101905
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41098482
score: 0
has comment: http://stackoverflow.com/comment/41114266
accepted answer of: http://stackoverflow.com/q/26207453
type: Answer

http://stackoverflow.com/q/26271127
has answer: http://stackoverflow.com/a/26499164
favorite count: 0
tagged with: space-tree
tagged with: angularjs
has title: How to Remove Previously Drawn InfoVis Space Tree
has comment: http://stackoverflow.com/comment/41216285
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26499164
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has body: I am using InfoVis to generate a space tree visualization in one of my projects. Since this is an interactive web site, the Space Tree needs to be regenerated each and every time the user has changed preferences. This requires the Space Tree to be completely cleared and re-draw a new tree on the same space. In addition, the charting area can be re sized as the page size varies. This requires re-draw of the Space Tree. I came across several issues while trying to clear the previously drawn Space Tree before drawing the new one. I am using the following code segment to clear the previous drawing, but it's failing miserably. st.clearNodesInPath(); st.labels.clearLabels(true); st.canvas.clear(); If anyone can guide me how to resolve this that would be great as this is blocking my progress. Thanks in advance.
tagged with: infovis
tagged with: thejit

http://stackoverflow.com/a/26239674
answers question: http://stackoverflow.com/q/26237999
type: Answer
has body: I found the answer to how to get the lists to sort I changed the line in base.html from: to that seemed to do the trick. I'd definitely love to get feedback from others on how this could be improved generally
score: 0

http://stackoverflow.com/comment/41150717
type: QuestionComment
comment on: http://stackoverflow.com/q/26234940
has text: The accepted answerer was able to do it within 9 minutes of me posing the question so I think there was enough information available.
score: 0
type: Comment

http://stackoverflow.com/q/26199194
accepted answer: http://stackoverflow.com/a/26201317
has body: Building a site where each swipe makes the site transition between full-screen-sized divs. The actual framework is built to have each full-sized divs take up the full viewport with no overflow. THis is the nature of the framework. However, I have an interior div that has overflow content that can be scrolled. However, when the site detects a touchswipe up or down, it transitions to the next screen, versus letting you scroll on the overflow div. Is there a way to turn off touchswipe on a certain div and allow normal scrolling action? Can provide code example if needed
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41083286
favorite count: 0
has title: Turn off Touchswipe on Div
has answer: http://stackoverflow.com/a/26201317
downvote count: 3
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: swipe
score: -2
tagged with: javascript

http://stackoverflow.com/comment/41363820
type: Comment
comment on: http://stackoverflow.com/q/26351422
has text: @veronicageorge - Ecommerce sites should load in 3 seconds or less. Anything over 3 seconds will see a dramatic drop in conversion. Lowering you page load times will give you an infinite increase in conversion (and sales) over worrying about getting a slider working.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26257954
tagged with: serializable
has body: there is a problem when send json data to serializable class. On client side when i check data on browser it is true but on server side the fields of serializable class are null. Client side (using dojo) : on the debugger line fileds of ticket object are assigned var Ticket = { ProductId: productId, Type: ticketType }; DataService.xhrPageMethodJson("api/Tickets/MyTickets" , dojo.toJson(Ticket) , { success: function (data) { debugger loadSubPage(getRoot("Support/Tickets.aspx?mode=list")); }, error: function (err) { LoadingOverlay.hide(); } }); Web Method: On this method ticket.ProductId, ticket.Type fields has default value or null. [HttpPost] [AcceptVerbs("POST")] [ActionName("MyTickets")] [Authorize] public void MyTickets([FromBody]Ticket ticket) { DataTable myTickets = db.Tickets.MyTickets(Globals.LogonUser.User.Id, ticket.ProductId, ticket.Type); WebContext.Session["Tickets"] = myTickets; } Ticket class: [Serializable] [EntityTable(Name = "Tickets")] public class Ticket : Entity { public override int Id { get; set; } public string Subject { get; set; } public string Message { get; set; } public DateTime SentDate { get; set; } [JoinField(typeof(User), "Id")] public int SenderUserId { get; set; } [JoinField(typeof(Product), "Id")] public int ProductId { get; set; } [JoinField(typeof(TicketImportanceLevel), "Id")] public int ImportanceLevel { get; set; } public int Analyze { get; set; } public int SolutionTransactionId { get; set; } [JoinField(typeof(TicketType), "Id")] public int Type { get; set; } public int Status { get; set; } public int AssignedUserId { get; set; } public float Score { get; set; } }
has title: how to send json data to serializable class
score: 0
answer count: 1
tagged with: dojo
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32425962
accepted answer: http://stackoverflow.com/a/32425962
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: .net
tagged with: javascript

http://stackoverflow.com/q/26280430
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26285063
answer count: 1
downvote count: 0
has title: How I can listen for a keyword in a web browser with Javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: voice-recognition
type: AnsweredQuestion
has body: How I can listen for a keyword from web browser and when it catched - do something using JavaScript like it implemented in google search app for android with their "Ok, google"?
score: 1
upvote count: 1
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/26285063

http://stackoverflow.com/comment/41303202
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26316335
has text: I forgot to tell, that I am new on creating plugins, also the complete code can you check it on http://jsfiddle.net/elavado/t5fnozc2/
type: Comment

http://stackoverflow.com/a/26328740
upvote count: 2
answers question: http://stackoverflow.com/q/26242728
type: Answer
has comment: http://stackoverflow.com/comment/41347417
has body: Unfortunately, can't comment because I'm new to stackoverflow. I would want a bit of clarification on your particular use case, but here's a general answer. A Element You should never use the 'a' tag for anything that isn't an actual link i.e. it goes to another page, or goes to a name linked (using #namedlinked), both of which change your focus anyway. If you're changing something within a page (e.g. show/hide link, web app navigation), you should always use a button even if you style it to look like a link. So really, this goes back to the guideline that you should be using the HTML elements in a semantically correct way if you want your site to be accessible. Button When you have buttons, the Chrome behaviour such as in the slideshow example of the codepen is not incorrect. Don't forget that in the list of pseudo-classes, aside from :hover, and :focus, there is also :active. Here's a simple example: button:focus { border-color: green; color: green; } button.a:active { background: red; } Something like this will always have styling on focus (before or after clicking), and then any buttons with the "a" class will make your button red when clicking on it. See quick demo at http://jsfiddle.net/434ps28f/5/ This works exactly the same way for me in both Chrome and Firefox (latest Windows versions). As to the other example where :focus overrides .current. It should do that as long as the user has focus on that element. That's how the user knows they still have focus there. Once the focus moves off of that element .current is still applied. I don't suggest it, but if for some reason you want the user to see the .current styling regardless of whether they have focus, then you could add an extra rule: .current { border-color: orange; } .current:focus { border-color: orange; } See updated jsfiddle
score: 2
has comment: http://stackoverflow.com/comment/41352725
downvote count: 0

http://stackoverflow.com/q/26221438
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41124582
has comment: http://stackoverflow.com/comment/41125662
has comment: http://stackoverflow.com/comment/41124507
has comment: http://stackoverflow.com/comment/41128404
has body: I have the below code that works fine in development (new window opens as expected) but in production instead of opening a new window it opens a new tab. $(document).ready(function(){ $(".tweet-share").on("click", function(){ var url = $(this).attr("href"); window.open(url, "twitter", "width=800, height=300"); }); }); Can anyone help?
has comment: http://stackoverflow.com/comment/41124546
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41126137
has comment: http://stackoverflow.com/comment/41124380
tagged with: ruby-on-rails-4
tagged with: javascript
tagged with: jquery
has title: window.open does not work in production
has comment: http://stackoverflow.com/comment/41125686
answer count: 0

http://stackoverflow.com/comment/41110680
has text: `reverse` is optional - you can drop it
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26214232

http://stackoverflow.com/comment/41237995
has text: Maybe a `style`-attribute must already exists, or you will become an error that `style` is `undefined`.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26283122

http://stackoverflow.com/comment/41240105
type: Comment
comment on: http://stackoverflow.com/a/26281656
has text: i tried this, and it gave my item an id but when i added one new item it got the same id as the frist one. @giorgio
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41353907
score: 0
comment on: http://stackoverflow.com/q/26346246
type: Comment
type: QuestionComment
has text: Because in my situation @A.Wolff I have a list of buttons, of which when I press one, it will make all the other buttons 'deactivated' and my selected class 'active' via changing applying classes. Hope that helps. :)

http://stackoverflow.com/comment/41621684
score: 0
type: Comment
type: QuestionComment
has text: @SamBraslavskiy we are all waiting for it :)
comment on: http://stackoverflow.com/q/26326958

http://stackoverflow.com/comment/41125294
type: Comment
has text: Thanks so much. i 'll try and feedback the results
comment on: http://stackoverflow.com/a/26209655
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41131366
type: Comment
has text: How do you flatten the nested array?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26207218

http://stackoverflow.com/q/26328093
tagged with: google-chrome-extension
answer count: 1
tagged with: events
has body: I'm reformulating my question since it wasn't clear the first time and I've already edited my other question too many times. I think it's sufficiently different that it shouldn't be considered a repeat question due to the browser extension clarification. This event listener is for a browser extension interacting with a personal webpage that has the element updated via the server after the page was loaded (I'm just using a prompt to simulate the delayed update of an element here). This is a debugging script to add an input event listener for an element so as to call another function once the element was given its input programmatically, right now, the event listener only runs when it get's its input manually. If everything was being called within one script, I could have skipped the extra event listener and simply call the function after updating the element, but the extension execution flow is separate so the event listener needs to be separate. HTML Webpage Press Me Javascript document.getElementById("pressMe").addEventListener("click",doSomething); function doSomething () { var something = prompt("Please enter something", "something"); if (something !== null) { document.getElementById("fI").innerHTML = something; } } Browser Extension Content Script document.getElementById("fI").addEventListener("input", blabla); function blabla() { var something = document.getElementById("fI").innerHTML; document.getElementById("example2").innerHTML = something+" continue the rest of the script here"; }
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26328356
has title: Change and Input events on Programmatic injection
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26328356

http://stackoverflow.com/a/26260684
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26260608
type: Answer
downvote count: 0
score: 1
has body: A likely solution, based off the limited information you've provided, is to wait for the window's load event to fire. If dijit is still undefined have a look in your console and check to make sure the external/internal library is being requested properly. Also, if dijit is being loaded AMD style, make sure you've referenced it as a dependency. window.addEventListener('load', function(){ dijit.byId("assettypeselect").set('value',queryObject.assettypeselect); }, false); The load event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images, scripts, links and sub-frames have finished loading. https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onload#Notes
answers question: http://stackoverflow.com/q/26260608
has comment: http://stackoverflow.com/comment/41197837
upvote count: 1

http://stackoverflow.com/comment/41229407
score: 0
type: Comment
type: QuestionComment
has text: @user3840869 Are you sure, this error is not on the function userTurn it could be somewhere else. And only show when you call some functions
comment on: http://stackoverflow.com/q/26278550

http://stackoverflow.com/comment/41230539
type: Comment
comment on: http://stackoverflow.com/a/26279155
type: AnswerComment
has text: I will edit my answer and put some note on the code. Feel free to mark it as resolved if so.
score: 0

http://stackoverflow.com/q/26310308
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/12420635
score: 2
has answer: http://stackoverflow.com/a/52624604
has title: Spreadsheet formulas are not updating after the pages are copied using Google script. How do I fix this issue
type: Question
tagged with: google-apps-script
answer count: 2
tagged with: google-sheets
downvote count: 0
tagged with: javascript
favorite count: 0
has body: First off, here are two basic spreadsheets for what I am talking about: Page one: https://docs.google.com/spreadsheets/d/1GZs_I9_beIO9xYBXatoxStRMmk9Aj3-UxPQpB9-iA-I/edit?usp=sharing Page two: https://docs.google.com/spreadsheets/d/1R86_0SrAtyIJPAhMW0Ura-3gwOLn5l9u7Seuj2V0YCA/edit?usp=sharing Essentially I am using a Google script to "update" the spreadsheet titled "The copy to update". This copy will automatically copy all of the pages from "The copy to pull updates from", delete the current pages on "The copy to update", and then rename the copied sheets back to what they were before. This means that any changes I make to "The copy to pull updates from" will automatically be updated on the other spreadsheet without having to redistribute the spreadsheet. When the button is pressed on the "Update page" sheet the pages are successfully transferred across. The changes are successfully "updated" on the to update spreadsheet. However, the page updated first in the code has errors. Any cell with a formula that acquires data from another sheets returns "#REF!" with the error "Unresolved sheet name 'Insert sheet name here'." This means that the formula/cell can not see the newly copied sheet from the script. I can remedy this situation by clicking on any cell afflicted by this and pressing enter - Essentially "refreshing" the cell. However I am doing this on a project with 100+ cells like this and I only want to have to press one button to be able to do this. Should I try and solve this issue using script, or change my method of updating the Spreadsheet pages a different way? Thanks to all help in advance! Here is the script that I am using: &lt;code&gt; function Update() { //Sets the ID of the page to update from var ID = "1R86_0SrAtyIJPAhMW0Ura-3gwOLn5l9u7Seuj2V0YCA" //Pulls the correct sheet using the ID var source = SpreadsheetApp.openById(ID); //Identifies the active spreadsheet in use to update. (The spreadsheet you pressed "Update" on) var destination = Spreadsheet…
has answer: http://stackoverflow.com/a/30249051

http://stackoverflow.com/q/26313127
tagged with: pygooglechart
tagged with: google-visualization
tagged with: javascript
type: UnansweredQuestion
has body: For below code mouse out handler not working, but when i removed mouse over relevant code works fine. (due to chart.draw() not working properly). Guys can u give me hand to this problem. google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2], ['Commute', 2], ['Watch TV', 2], ['Sleep', 7] ]); var options = { title: 'My Daily Activities', legend: 'none', pieSliceText: 'percentage', slices: { } }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); google.visualization.events.addListener(chart, 'onmouseout', function(e) { var slices = options.slices ; slices[e.row] = {}; options['slices'] = slices; chart.draw(data,options); } ); // mouse out end google.visualization.events.addListener(chart, 'onmouseover', function(e) { var sliceid= e.row; console.log("mouse over"+sliceid); var slices = options.slices ; slices[e.row] = {offset:0.2}; options['slices'] = slices; chart.draw(data,options); } ); // mouse over end }
type: Question
has comment: http://stackoverflow.com/comment/41443452
has title: mouse out event handler not working when mouse over event handler is a there in Google chart script
has comment: http://stackoverflow.com/comment/41389741
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26396797

http://stackoverflow.com/a/26299389
has body: You may want to take a look at this implementation of the Luhn algorithm in Java: public class luhn { /** Calculate the Luhn sum of the input number @param str number to check @return sum calcuted with Luhn algorithm **/ public static int luhnTest(String str){ int sum=0; boolean isEven=false; for (int i=str.length();i&gt;0;i--){ int k=Integer.parseInt(str.substring(i-1,i)); if(isEven){ k=k*2; if(k/10!=0) k=k/10+k%10; } isEven=!isEven; sum+=k; } return sum; } /** Return true if the input number is valid according to the Luhn formula @param str number to check **/ public static boolean isLuhnValid(String str){ if (luhnTest(str)%10==0) return true; return false; } /** Return the check digit that makes the input number valid according to the Luhn formula @param str number to check @return calculated check digit **/ public static int getCheckDigit(String str){ int k=luhnTest(str+"0"); int i=0; if(k%10!=0) i=10-k%10; return i; } /** Return the input number with check digit appended @param str number to make Luhn valid @return Luhn valid number **/ public static String getLuhnNumber(String str){ return str+getCheckDigit(str); } } Source: https://github.com/nicopi/Luhn-Algorithm
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26299298
answers question: http://stackoverflow.com/q/26299298
type: Answer

http://stackoverflow.com/comment/41378607
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26339396
score: 0
has text: is there any drag up and drag down jquery api that i can add to onclick event? here is example: http://jquery-datatables-row-reordering.googlecode.com/svn/trunk/rowGrouping.html so i need to when i click in toolbar UP button that function up click call drag and drop up isths possibl in jquery?

http://stackoverflow.com/a/26268742
has comment: http://stackoverflow.com/comment/44273453
has comment: http://stackoverflow.com/comment/66725933
accepted answer of: http://stackoverflow.com/q/26258366
score: 17
upvote count: 17
has body: I had the same issue. So I was going over the recent commits and found this in the change logs: Google Analytics - do nothing if there is no event category (required) Link This should fix it: Push
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44573717
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26258366

http://stackoverflow.com/q/26242774
tagged with: jquery
tagged with: kendo-ui
has title: How to use pretty urls in Kendo UI Mobile app?
score: 0
answer count: 1
has body: By default navigation is done by app.navigate('#view-id') and it rewrites hash to /#view-id. If I want to add some params it becomes /#view-id?key=val. I would like to use kendo.Router class and make url look like /key/val or /#key/val I can define kendo.Router() routes but how can I switch views without using app.navigate?
accepted answer: http://stackoverflow.com/a/26265582
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26265582
type: Question
tagged with: javascript

http://stackoverflow.com/q/26259916
score: 0
has title: Angular: Nested Callback with HTTP Query
tagged with: angularjs
has body: I have such a problem (structured english) GET HTTP Resource FOR every data item received do GET another HTTP Resource Alter the original data from the outer loop with data from the inner GET RETURN altered data How would you pass the outer data to the inner request, e.g. does not work (in pseudo code): GET HTTP (callback function (recDataOUTER){ GET NEW HTTP ((recDataOUTER, recDataINNER){ Alter both data accordingly }) return altered data }) Is there a more elegant way? The background is that I am using MongoDB and am struggling with Joins (there are no joins I know).
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26260098
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26260098
tagged with: javascript

http://stackoverflow.com/a/26215642
upvote count: 1
answers question: http://stackoverflow.com/q/26215452
score: 1
has body: While I agree with cerbrus that we need to see a bit more of your code, I'll take a stab in the dark : you call formattedTable(2) in both tabs, which means that your filtering never changes.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41113269
accepted answer of: http://stackoverflow.com/q/26215452
has comment: http://stackoverflow.com/comment/41113144
type: Answer

http://stackoverflow.com/q/26300562
accepted answer: http://stackoverflow.com/a/26367042
has comment: http://stackoverflow.com/comment/41271925
has comment: http://stackoverflow.com/comment/41270014
linked to: http://stackoverflow.com/q/121203
tagged with: node.js
has title: How to Detect Serverside if a Browser supports Javascript before Sending Initial Webserver Response?
has comment: http://stackoverflow.com/comment/41269992
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41271286
has comment: http://stackoverflow.com/comment/41270400
has body: I am wondering if there is any way to detect if a browser supports javascript on the web server (--> javascript = enabled) before the actual response is sent back to the browser?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41270160
has answer: http://stackoverflow.com/a/26367042
tagged with: webserver
tagged with: browser
tagged with: apache
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/comment/41170121
score: 0
type: Comment
type: QuestionComment
has text: That's a kendo window, not notification, but I'll there could be some stuff I can use there, thanks.
comment on: http://stackoverflow.com/q/26223891

http://stackoverflow.com/q/26311016
tagged with: cakephp
has answer: http://stackoverflow.com/a/26311192
type: Question
answer count: 2
has body: I am trying to integrate angularjs with my already built app in CakePHP. When I tried to pull request from CakePHP using AngularJS I am getting response in error. Though if I hit same url I am getting valid json. I tried using addons in chrome also. But AngularJS takes it in error. My Controller Code of AngularJS. var load = function () { console.log('call load()...'); console.log($rootScope.appUrl + '/songs.json'); $http.get($rootScope.appUrl + '/songs.json') .success(function (data, status, headers, config) { $scope.posts = data; alert("Here"); alert(JSON.stringify($scope.posts)); angular.copy($scope.posts, $scope.copy); }) .error(function (data, status, headers, config) { alert("Error"); console.log('DATA : ' + data); console.log('Status : ' + status); console.log('headers : ' + JSON.stringify(headers)); console.log('config : ' + JSON.stringify(config)); }); } load(); How can I do exception handling to know what sort of error is ? How can I check if their is no response from server or server is off? 3. My request headers are.. GET /demosite/songs.json HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Cookie: toolbarDisplay=hide Connection: keep-alive Response header are... HTTP/1.1 200 OK Date: Sat, 11 Oct 2014 03:48:34 GMT Server: Apache/2.4.7 (Ubuntu) X-Powered-By: PHP/5.5.9-1ubuntu4.4 Set-Cookie: CAKEPHP=i07rme235ifh66gjq9htdutg21; expires=Sun, 12-Oct-2014 03:48:34 GMT; Max-Age=86400; path=/; HttpOnly Content-Length: 8717 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json; charset=UTF-8 Please help. When I check my request in XHR Console firebug its showing as OPTIONS instead of GET OR POST.
accepted answer: http://stackoverflow.com/a/26311192
has comment: http://stackoverflow.com/comment/41289343
tagged with: javascript
has title: AngularJS getting response but in error with CakePHP
score: 0
has comment: http://stackoverflow.com/comment/41289305
has answer: http://stackoverflow.com/a/26311043
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41289383
possible better answer: http://stackoverflow.com/a/26311043
has comment: http://stackoverflow.com/comment/41289259
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41289327
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/26286909
upvote count: 3
answers question: http://stackoverflow.com/q/26286899
type: Answer
score: 3
downvote count: 0
has body: No javascript variables are not typed.
has comment: http://stackoverflow.com/comment/41251770

asp.net
tags question: http://stackoverflow.com/q/26229221
tags question: http://stackoverflow.com/q/26235012
tags question: http://stackoverflow.com/q/26220751
tags question: http://stackoverflow.com/q/26270473
tags question: http://stackoverflow.com/q/26305991
tags question: http://stackoverflow.com/q/26239781
tags question: http://stackoverflow.com/q/26246895
tags question: http://stackoverflow.com/q/26343229
tags question: http://stackoverflow.com/q/26317359
tags question: http://stackoverflow.com/q/26326334
tags question: http://stackoverflow.com/q/26281042
tags question: http://stackoverflow.com/q/26211737
tags question: http://stackoverflow.com/q/26351135
tags question: http://stackoverflow.com/q/26282483
tags question: http://stackoverflow.com/q/26330441
tags question: http://stackoverflow.com/q/26276680
tags question: http://stackoverflow.com/q/26274877
tags question: http://stackoverflow.com/q/26324035
tags question: http://stackoverflow.com/q/26267508
tags question: http://stackoverflow.com/q/26297640
tags question: http://stackoverflow.com/q/26224314
tags question: http://stackoverflow.com/q/26333972
tags question: http://stackoverflow.com/q/26233206
tags question: http://stackoverflow.com/q/26264573
tags question: http://stackoverflow.com/q/26293913
tags question: http://stackoverflow.com/q/26255253
tags question: http://stackoverflow.com/q/26229328
tags question: http://stackoverflow.com/q/26314938
tags question: http://stackoverflow.com/q/26310913
tags question: http://stackoverflow.com/q/26214086
tags question: http://stackoverflow.com/q/26254473
tags question: http://stackoverflow.com/q/26215739
tags question: http://stackoverflow.com/q/26260158
tags question: http://stackoverflow.com/q/26245033
tags question: http://stackoverflow.com/q/26239923
tags question: http://stackoverflow.com/q/26284461
tags question: http://stackoverflow.com/q/26219606
tags question: http://stackoverflow.com/q/26344089
tags question: http://stackoverflow.com/q/26213902
tags question: http://stackoverflow.com/q/26342837
tags question: http://stackoverflow.com/q/26229579
tags question: http://stackoverflow.com/q/26282467
tags question: http://stackoverflow.com/q/26203367
type: Tag
tags question: http://stackoverflow.com/q/26204920
tags question: http://stackoverflow.com/q/26223361
tags question: http://stackoverflow.com/q/26337871
tags question: http://stackoverflow.com/q/26274840
tags question: http://stackoverflow.com/q/26216126
tags question: http://stackoverflow.com/q/26348477
tags question: http://stackoverflow.com/q/26302048
tags question: http://stackoverflow.com/q/26288088
tags question: http://stackoverflow.com/q/26200309
tags question: http://stackoverflow.com/q/26332189
tags question: http://stackoverflow.com/q/26282843
tags question: http://stackoverflow.com/q/26256526
tags question: http://stackoverflow.com/q/26258429
tags question: http://stackoverflow.com/q/26217487
tags question: http://stackoverflow.com/q/26217596
tags question: http://stackoverflow.com/q/26313551
tags question: http://stackoverflow.com/q/26251915
tags question: http://stackoverflow.com/q/26263407
tags question: http://stackoverflow.com/q/26250571
tags question: http://stackoverflow.com/q/26258621
tags question: http://stackoverflow.com/q/26332860
tags question: http://stackoverflow.com/q/26351585
tag name: asp.net
tags question: http://stackoverflow.com/q/26300913
tags question: http://stackoverflow.com/q/26302538
tags question: http://stackoverflow.com/q/26275552
tags question: http://stackoverflow.com/q/26332382
tags question: http://stackoverflow.com/q/26222702
tags question: http://stackoverflow.com/q/26323256
tags question: http://stackoverflow.com/q/26201891
tags question: http://stackoverflow.com/q/26196820
tags question: http://stackoverflow.com/q/26229992
tags question: http://stackoverflow.com/q/26278962

http://stackoverflow.com/q/26323877
accepted answer: http://stackoverflow.com/a/26324644
has answer: http://stackoverflow.com/a/26324593
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/41312682
has comment: http://stackoverflow.com/comment/41313292
has comment: http://stackoverflow.com/comment/41312631
tagged with: animation
has title: Unable to animate a div to the required position twice
has body: I have 8 divs which I can swap based on the values given in the respective drop down, As you can be seen in the image below: However the animation is not working for the same div twice, as you can see in this jsfiddle . Say if I swap div 1 with div 4 and then I try swapping new div 1 with div 7, the div is animating bizzarely all over the page! Tried debugging it with firebug, all the values for animating were correct and the flow was also perfect. Still its causing this problem. Don't know whether I am missing something about the animate() method!! This is my HTML code : &lt;table cellspacing="30"&gt; &lt;tr&gt; &lt;td&gt; &lt;div id="img1" style="width:100px;height:40px;position:relative;"&gt; &lt;select id="drop1" name="" class="drop"&gt; &lt;option&gt;1&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;option value="6"&gt;6&lt;/option&gt; &lt;option value="7"&gt;7&lt;/option&gt; &lt;option value="8"&gt;8&lt;/option&gt; &lt;/select&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input type="checkbox" disabled="disabled" checked="checked"&gt; &lt;img src="" width="120" height="40" id="img_banner1"&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div id="img2" style="width:100px;height:40px;position:relative;"&gt; &lt;select id="drop2" name="" class="drop"&gt; &lt;option&gt;2&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;option value="6"&gt;6&lt;/option&gt; &lt;option value="7"&gt;7&lt;/option&gt; &lt;option value="8"&gt;8&lt;/option&gt; &lt;/select&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;…
has answer: http://stackoverflow.com/a/26324644
type: AnsweredQuestion
score: 0
type: Question
has comment: http://stackoverflow.com/comment/41313104
possible better answer: http://stackoverflow.com/a/26324593
tagged with: javascript

http://stackoverflow.com/q/26294357
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26294443
score: 0
has title: Get JavaScripts asynchronously using getScripts
accepted answer: http://stackoverflow.com/a/26294443
type: AnsweredQuestion
type: Question
answer count: 1
has body: I get some scripts asynchronously on my login page: $.when( $.getScript("/Scripts/View/scroll-sneak.js"), $.getScript("/Scripts/kendo/kendo.custom.min.js"), $.Deferred(function (deferred) { $(deferred.resolve); }) ).done(function (res1, res2) { if (res1[1] == "success") { } if (res2[1] == "success") { } alert('all script loaded...'); }); I have two queries here: How can I leverage browser cache here, as getScript always take fresh script. How can I have promise that this script will be available to all pages on same domain. Alternate solutions are welcome.

http://stackoverflow.com/q/26223867
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4195427
has body: I was reading through Which browsers support script async which is discussing Google's script which looks like this: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'xxx']); _gaq.push(['_trackPageview']); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = 'https://ssl.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); In the SO post, it states: The async support as specified by google is achieved using two parts: using script on your page (the script is supplied by google) to write out a &lt;script&gt; tag to the DOM. that script has async="true" attribute to signal to compatible browsers that it can continue rendering the page. The first part works on browsers without support for &lt;script async.. tags, allowing them to load async with a "hack" (although a pretty solid one), and also allows rendering the page without waiting for ga.js to be retrieved. The second part only affects compatible browsers that understand the async html attribute This has me confused. What is the async attribute doing on the script above if they're already using another 'hack' to provide async support for browsers which do not respect the async: true attribute? Doesn't that hack work for all browsers?
duplicate of: http://stackoverflow.com/q/3408805
tagged with: javascript
tagged with: script-tag
type: Question
has comment: http://stackoverflow.com/comment/41129436
downvote count: 0
linked to: http://stackoverflow.com/q/1834077
favorite count: 0
has title: Does async do anything when injecting a via JavaScript?
has comment: http://stackoverflow.com/comment/41142597
has comment: http://stackoverflow.com/comment/41129419
tagged with: http://stackoverflow.com/tag/html
tagged with: asynchronous
score: 2
answer count: 0

http://stackoverflow.com/q/26269357
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26269825
favorite count: 0
has answer: http://stackoverflow.com/a/26269825
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has body: I have a pretty simple site in which I want to be able to drag and drop some styled DIV elements between two DIV containers. I have used JQueryUI's sortable function to successfully implement the drag and drop behavior like so: $("#active-container").sortable({connectWith: "#inactive-container"}); $("#inactive-container").sortable({connectWith: "#active-container"}); I add my droppable DIV elements to the containers on button click using this method: function createDeviceDiv (deviceObject, className){ var div = document.createElement('div'); div.id = deviceObject.deviceId; div.className = className + ' draggable="true"'; div.textContent = deviceObject.deviceName; return div; } My CSS looks like this: .active-device-element { width: 200px; height: 40px; border: 2px solid #666666; margin: 10px; background-color: lightgreen; cursor: move; border-radius: 25px; text-align: center; vertical-align: middle; line-height: 35px; -webkit-user-select: none; } .inactive-device-element { width: 200px; height: 40px; margin: 10px; border: 2px solid #666666; background-color: floralwhite; cursor: move; border-radius: 25px; text-align: center; vertical-align: middle; line-height: 35px; -webkit-user-select: none; } #active-container, #inactive-container { background-color: lightgrey; min-height: 100px; } The relevant portion of my index.html page (using Twitter bootstrap 3) is as follows: Active Devices The following devices are currently listed as active. Inactive Devices The following devices are currently listed as inactive. So, dragging and dropping between the two containers works well. However, when dropped, the element retains the original style. I need to highlight changes that have been made by changing any element that has beeen drag dropped to a different background color/style, so based on my CSS, something like, '.modified-device-element'. I am unclear as to what the best way to accomplish this is. Any help is greatly appreciated.
has title: How to change style of dropped element using JqueryUI sortable?
upvote count: 1

http://stackoverflow.com/comment/41366999
comment on: http://stackoverflow.com/a/26353553
type: AnswerComment
has text: It was very clear what I wanted to achieve as the id was always on paragraph. Shifting the ids is not a solution.
type: Comment
score: 0

http://stackoverflow.com/q/26205978
answer count: 1
has answer: http://stackoverflow.com/a/26217226
has title: Tweet json - retweet or not
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41110790
has comment: http://stackoverflow.com/comment/41115447
score: 0
tagged with: twitter
tagged with: twitter-oauth
type: Question
has comment: http://stackoverflow.com/comment/41107518
accepted answer: http://stackoverflow.com/a/26217226
has comment: http://stackoverflow.com/comment/41115937
has body: Is it possible to understand if a tweet is a retweet or not (from the json file) ? I've found the "current_user_retweet" parameter in the json file however it always returns undefined, no mater if the tweet is a retweet or not.
tagged with: javascript

http://stackoverflow.com/a/26312067
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41290954
downvote count: 0
has body: You can get the id with $(this).attr("id") Then you have to pass this id to a php page for removal. As Ghost suggested, you can use a form or an jQuery ajax call.
answers question: http://stackoverflow.com/q/26312033
type: Answer
has comment: http://stackoverflow.com/comment/41291138
has comment: http://stackoverflow.com/comment/41291090

http://stackoverflow.com/comment/41163179
score: 0
has text: But wouldn't the stack be maintained ? The thing is the function must return a dom node as a return value
comment on: http://stackoverflow.com/q/26242169
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41123563
comment on: http://stackoverflow.com/a/26220576
has text: I think there's something wrong with the function inside append
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26329609
has comment: http://stackoverflow.com/comment/41323317
tagged with: javascript
has body: < script type = "text/javascript" > document.getElementById("alertme").onclick = function() { alert("hell with you"); } < /script> #circle { width: 500px; height: 500px; border-radius: 250px; background-color: rgba(167, 10, 10, 0.595); } JavaScrip! Hello This is a test Whats written this is complete sentence i hate it change it! hide circle! Hi , i am new to JavaScript. I was practicing some code and ironically my JavaScript function of simple alert didn't work. Please guide me in simple way. PS: Html and CSS were piece of cake compared to JavaScript. Thanks.
downvote count: 3
accepted answer: http://stackoverflow.com/a/26329759
has comment: http://stackoverflow.com/comment/41323164
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26329759
score: -3
has title: Beginner in JavaScript
type: AnsweredQuestion
upvote count: 0
type: Question

http://stackoverflow.com/q/26266070
favorite count: 0
type: UnansweredQuestion
has title: How to suppress "WARNING - Redeclared variable:" in Closure Compiler
upvote count: 3
type: Question
score: 3
tagged with: google-closure-compiler
tagged with: compiler-warnings
tagged with: suppress-warnings
tagged with: javascript
has body: I have successfully suppressed some warnings in Closure Compiler with /** * @fileoverview * @suppress {checkTypes|duplicate} */ but I cannot find how to suppress "WARNING - Redeclared variable:" What should I be using in the @suppress? More generally, is there a list of the argument to use with @suppress given any error or warning?
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26287466

http://stackoverflow.com/comment/41300707
score: 0
type: AnswerComment
has text: And no need for action MyView() ?
type: Comment
comment on: http://stackoverflow.com/a/26317097

http://stackoverflow.com/q/26288210
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26289433
type: AnsweredQuestion
has body: When I click the div, I'm trying to make the div turn into a green 30x30 circle over a course of 2 seconds. And then 3 seconds after the animation is done running, I want the red area go back to its original state. With my code so far, I'm able to click the div and change it's size to 30x30 and shape to a circle Here's my code so far: #blue-box { height: 100px; width: 100px; background: blue; /* transition:background-color .5s ease-in; */ transition: background-color 0.5s ease; -webkit-transition: -webkit-transform 0.5s ease-in-out; -webkit-transition: -webkit-transform 0.5s ease-in-out; -webkit-transition: -webkit-transform 0.5s ease-in-out; -webkit-transition: -webkit-transform 0.5s ease-in-out; transition: transform 0.5s ease-in-out, background-color 2s ease 3s; } .box-change { background-color: green; border-radius: 100%; -webkit-transform: scale(.3, .3); -moz-transform: scale(.3, ,.3); -o-transform: scale(.3, .3); -ms-transform: scale(.3, .3); transform: scale(.3, .3); } var box = $('#blue-box'); box.on('click', function(){ box.toggleClass('box-change'); if (box.hasClass('box-change')) console.log("testing123"); else console.log("testing testing!"); }); http://jsfiddle.net/gatordh7/gxes2ep3/ To the #blue-box div, I tried including: "transition:background-color .5s ease-in", and then setting the background-color to green on the .box-change class I toggled when the div was clicked, but I still can't figure this out. What am I doing wrong?
type: Question
score: 0
has title: change color and shape of div on click
accepted answer: http://stackoverflow.com/a/26289433
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41252292
comment on: http://stackoverflow.com/q/26290701
has text: Document ready would not get image loading either.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26328373
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26313899
answers question: http://stackoverflow.com/q/26313899
has body: You may try to add the above code into a file or as an inline script with drupal_add_js and continue as follows: Load both blocks on the same page initialy hidden and show the one that meets your conditions in the js. Or load the correct block's content with ajax and dump it into the DOM based on your desired criteria.
type: AcceptedAnswer

http://stackoverflow.com/q/26236031
has answer: http://stackoverflow.com/a/26236649
type: Question
has body: How to fadein first element and delay 2 sec then fadein next elements ? On my code , it's will delay 2 sec and then fadein all elements in one time. How can i do ? &lt;script&gt; $(document).ready(function(){ setTimeout(function(){ for (i = 0; i &lt; 40; i++){ $("#thumbnail" + i).fadeIn("slow"); } }, 2000); }); &lt;/script&gt;
downvote count: 0
tagged with: javascript
answer count: 6
tagged with: jquery
has title: How to fadein first element and delay 2 sec then fadein next elements?
has answer: http://stackoverflow.com/a/26236143
has answer: http://stackoverflow.com/a/26236254
accepted answer: http://stackoverflow.com/a/26236143
favorite count: 0
has answer: http://stackoverflow.com/a/26236421
has answer: http://stackoverflow.com/a/26236256
upvote count: 2
possible better answer: http://stackoverflow.com/a/26236209
has answer: http://stackoverflow.com/a/26236209
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/41244585
comment on: http://stackoverflow.com/q/26286342
score: 0
type: Comment
type: QuestionComment
has text: pinterest.com does in fact implement the Content Security Policy, look in the Network tab of the developer tools and you will see the header being sent. Check the other sites you are trying this on to see if they do as well.

http://stackoverflow.com/comment/41283893
type: QuestionComment
has text: What is the error you get in the console?
comment on: http://stackoverflow.com/q/26308020
type: Comment
score: 0

http://stackoverflow.com/a/26347317
type: Answer
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/41355803
has body: You could also use jQuery's .load function, like this: $('div#container').load('external-page.html div#md5');
upvote count: 0
answers question: http://stackoverflow.com/q/26346965

http://stackoverflow.com/q/26241843
favorite count: 0
has answer: http://stackoverflow.com/a/26532856
has body: What I have I am using jQuery Mobile 1.4.4. I've added a gear button on each header that will open a small popup to navigate among 'Logout' and 'Account Settings'. What I want to happen I want this popup to show up on every page that it is clicked on, using the same code for each page The problem On the home page (call it page A) I have this gear button. When I click on it, the popup will appear just fine. I then click on account settings (call it page B). Once page B has loaded, the gear is also there, but does not open the popup like page A does. If I refresh page B, the gear popup will work, but once I navigate back to page A (via the home button) the gear no longer works until I refresh. Video of the described scenario situation: http://screencast.com/t/34ZrYyc4Rp2T Code Just the header and popup html (same on both pages) Back Home Home Settings Settings Account Settings Logout What I think is happening I've read that this issue may be because the ID of the popups are the same? Which doesn't make sense because they are two different pages. It could also be the case that the popup is populated within the lapieuvre's issue (in reply to the similar issue at hand) here is the exact same scenario: https://forum.jquery.com/topic/popup-open-not-working-after-navigate-next-page Any feedback is greatly appreciated
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41164752
tagged with: jquery-mobile-popup
type: Question
has title: jQuery Mobile popup won't show after page navigation, only shows after hard refresh, or returning to same page
has comment: http://stackoverflow.com/comment/41163959
has comment: http://stackoverflow.com/comment/41164115
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/50787360
tagged with: jquery
has answer: http://stackoverflow.com/a/26243340
accepted answer: http://stackoverflow.com/a/26243340
has comment: http://stackoverflow.com/comment/41163623
possible better answer: http://stackoverflow.com/a/26532856
answer count: 3
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/41097400
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26207127
has text: http://es5.github.io/#x12 http://es5.github.io/#x12.6.2 http://es5.github.io/#x12.5
score: 0

http://stackoverflow.com/q/26195130
has body: I have been reading that its not possible to inject a variable into a callback function. Now with that in mind, does anyone have any work arounds to this problem? I basically am trying to find a way to get a variable into an ajax callback function. I have forms with a data-target which contains the div I want to load a success page into. code var ajaxfn = function (form) {return $.ajax(etc);}; /* on submit function */ ajaxfn("#someForm").done(function (data) { /* not sure how to get form data tag value */ var target = $(this).data('targetdiv'); if (data['status'] === 0) {$(target).load('success.html');} });
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26195158
accepted answer: http://stackoverflow.com/a/26195158
downvote count: 0
type: AnsweredQuestion
has title: Javascript: Callback Injection Alternative?
score: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26199090
has comment: http://stackoverflow.com/comment/62647201
answer count: 0
tagged with: handsontable
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41082706
type: Question
has comment: http://stackoverflow.com/comment/41082749
score: 3
has title: sort a 'handsontable' and then be able to read the data back out of the table
has comment: http://stackoverflow.com/comment/41082616
has body: I want to be able to sort a handsontable and then be able to read the data back out of the table. I have cobbled together this code which works, but it seems like there is better way to sort data on screen then be able to extract data in sorted order. This javascript plugin seems to optimized for quick screen manipulation. "Only the table view is sorted. The data source remains in the original order." To sort both table view and datasource to sort it seems you have to do both or datasource and then re-apply. references: http://jsfiddle.net/itp99/paokya7y/6/ Documentation suggests that we use sort and render function, but then we still have to deal with sort order issue. Documentation: https://github.com/handsontable/jquery-handsontable/wiki/Understanding-column-sorting-plugin http://handsontable.com/demo/sorting.html
has comment: http://stackoverflow.com/comment/41082683
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26218192
downvote count: 5
has comment: http://stackoverflow.com/comment/58631151
has comment: http://stackoverflow.com/comment/57650676
has comment: http://stackoverflow.com/comment/58631492
has comment: http://stackoverflow.com/comment/41221689
has comment: http://stackoverflow.com/comment/58627193
accepted answer of: http://stackoverflow.com/q/26203725
has comment: http://stackoverflow.com/comment/55070416
has comment: http://stackoverflow.com/comment/63509458
has comment: http://stackoverflow.com/comment/67849401
has comment: http://stackoverflow.com/comment/54153624
answers question: http://stackoverflow.com/q/26203725
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/75497058
upvote count: 74
score: 69
has body: I set up a proxy to achieve this: You have a regular express webserver that serves the index.html on any route, except if its an asset route. if it is an asset, the request gets proxied to the web-dev-server your react hot entrypoints will still point directly at the webpack dev server, so hot reloading still works. Let's assume you run webpack-dev-server on 8081 and your proxy at 8080. Your server.js file will look like this: "use strict"; var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var config = require('./make-webpack-config')('dev'); var express = require('express'); var proxy = require('proxy-middleware'); var url = require('url'); ## --------your proxy---------------------- var app = express(); ## proxy the request for static assets app.use('/assets', proxy(url.parse('http://localhost:8081/assets'))); app.get('/*', function(req, res) { res.sendFile(__dirname + '/index.html'); }); # -----your-webpack-dev-server------------------ var server = new WebpackDevServer(webpack(config), { contentBase: __dirname, hot: true, quiet: false, noInfo: false, publicPath: "/assets/", stats: { colors: true } }); ## run the two servers server.listen(8081, "localhost", function() {}); app.listen(8080); now make your entrypoints in the webpack config like so: entry: [ './src/main.js', 'webpack/hot/dev-server', 'webpack-dev-server/client?http://localhost:8081' ] note the direct call to 8081 for hotreload also make sure you pass an absolute url to the output.publicPath option: output: { publicPath: "http://localhost:8081/assets/", // ... }
has comment: http://stackoverflow.com/comment/57298442
type: Answer
has comment: http://stackoverflow.com/comment/41165559

http://stackoverflow.com/comment/41359582
type: Comment
has text: student[i] is still undefined
comment on: http://stackoverflow.com/a/26349235
score: 0
type: AnswerComment

http://stackoverflow.com/q/26271210
tagged with: css
has title: How can I only display 3 columns in my 13-column slick grid?
has body: I have slick grid in 10 columns .but i need to display only 3 columns only.how is it possible pls any one help me urgent.here my slick grid here slick grid code. This code display all columns default but i want to display only 3 columns. CSS .slick-row.selected .cell-selection { background-color: transparent; /* show default selected row background */ } HTML &lt;div style="position:relative"&gt; &lt;div style="width:600px;"&gt; &lt;div class="grid-header" style="width:100%"&gt; &lt;label&gt;SlickGrid&lt;/label&gt; &lt;span style="float:right" class="ui-icon ui-icon-search" title="Toggle search panel" onclick="toggleFilterRow()"&gt;&lt;/span&gt; &lt;/div&gt; &lt;div id="myGrid" style="width:100%;height:500px;"&gt;&lt;/div&gt; &lt;div id="pager" style="width:100%;height:20px;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="options-panel"&gt; &lt;b&gt;Search:&lt;/b&gt; &lt;hr/&gt; &lt;div style="padding:6px;"&gt; &lt;label style="width:200px;float:left"&gt;Show tasks with % at least: &lt;/label&gt; &lt;div style="padding:2px;"&gt; &lt;div style="width:100px;display:inline-block;" id="pcSlider"&gt;&lt;/div&gt; &lt;/div&gt; &lt;br/&gt; &lt;label style="width:200px;float:left"&gt;And title including:&lt;/label&gt; &lt;input type=text id="txtSearch" style="width:100px;"&gt; &lt;br/&gt;&lt;br/&gt; &lt;button id="btnSelectRows"&gt;Select first 10 rows&lt;/button&gt; &lt;br/&gt; &lt;h2&gt;Demonstrates:&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;a filtered Model (DataView) as a data source instead of a simple array&lt;/li&gt; &lt;li&gt;grid reacting to model events (onRowCountChanged, onRowsChanged)&lt;/li&gt; &lt;li&gt;&lt;b&gt;FAST&lt;/b&gt; DataView recalculation and &lt;b&gt;real-time&lt;/b&gt; grid updating in response to data changes.&lt;br/&gt;The grid holds &lt;b&gt;50'000&lt;/b&gt; rows, yet you are able to sort, filter, scroll, navigate and edit as if it had 50 rows.&lt;/li&gt; &lt;li&gt;adding new rows, bidirectional sorting&lt;/li&gt; &lt;li&gt;column options: cannotTriggerInser…
linked to: http://stackoverflow.com/q/4463176
type: Question
has answer: http://stackoverflow.com/a/26272052
tagged with: jquery-ui
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41216409
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41266369
comment on: http://stackoverflow.com/a/26298279
type: Comment
has text: I'm glad to have helped! But, that said, does the jQuery 'not work' in your own site/project, or does it not work *here* (once you've clicked on the 'Show code snippet' and 'Run code snippet')? Note that I updated all the snippets, a few moments ago, to add in the location protocol (which I forgot initially, in all but the plain-JavaScript solution).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41289972
comment on: http://stackoverflow.com/q/26311446
score: 0
type: QuestionComment
type: Comment
has text: What if i space separate numbers in the input? You'll have `4 5 89`in single array location, for example...

http://stackoverflow.com/a/26298816
score: 0
has comment: http://stackoverflow.com/comment/41272335
has body: Nodejs var PersonSchema = new Schema({ name: { given: { type: String, required: true }, family: { type: String, required: true } }, children: [PersonSchema] }); var Person = mongoose.model('Person', PersonSchema); app.post('/person', function (req, res) { Person.create(req.body) .then(function (created) { console.log(created); res.json(created.id); }); }); Client $.ajax({ url: '/person', type: 'POST', data: { name: { family: 'Green' }, children: [{ name: { given: 'Matt', family: 'Green' } }, { name: { given: 'Dave', family: 'Green' } }] } }) As you can see, I have nested objects and arrays. This works fine for me :)
has comment: http://stackoverflow.com/comment/41268560
type: Answer
answers question: http://stackoverflow.com/q/26279422
has comment: http://stackoverflow.com/comment/41275353

http://stackoverflow.com/a/26324592
answers question: http://stackoverflow.com/q/26324574
score: 0
has body: It depends on what technology you like. WebSockets are really good for solving real time problems. Socket.IO is able to fire events on the client and server side and react to these events on the other side. Socket.IO runs great on a Node JS server. (http://nodejs.org/) In this example (https://github.com/Automattic/socket.io/tree/master/examples/chat) you see a chat realized via socket.io. Instead of displaying the results to the users screen you could simply fire events on the client side with a switch.
type: Answer

http://stackoverflow.com/a/26344455
accepted answer of: http://stackoverflow.com/q/26344442
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has body: You're returning but not using it. (function(){ var ctx = createCanvas('someid', 150, 150); // now ctx is defined ctx.strokeStyle = '#09f'; })(); You need to assign the return value to a variable so you can use it. If you want, you can also use it like this, if you don't have any further use of that variable. createCanvas('someid', 150, 150).strokeStyle = '#o9f';
score: 3
type: Answer
answers question: http://stackoverflow.com/q/26344442

http://stackoverflow.com/a/28647236
type: Answer
has body: do something like this function calc(multiply) { if (multiply) { tt.value = parseFloat(qt.value * un.value).toFixed(2); } else { un.value = parseFloat(tt.value / qt.value).toFixed(2); } } Qt: Unt: Tot:
score: 0
answers question: http://stackoverflow.com/q/26266618

safari
tags question: http://stackoverflow.com/q/26327951
tags question: http://stackoverflow.com/q/26224314
tags question: http://stackoverflow.com/q/26274036
tags question: http://stackoverflow.com/q/26232025
tags question: http://stackoverflow.com/q/26256349
tags question: http://stackoverflow.com/q/26227399
tags question: http://stackoverflow.com/q/26318109
tags question: http://stackoverflow.com/q/26196142
type: Tag
tags question: http://stackoverflow.com/q/26339380
tags question: http://stackoverflow.com/q/26328835
tags question: http://stackoverflow.com/q/26259583
tags question: http://stackoverflow.com/q/26347742
tags question: http://stackoverflow.com/q/26245088
tag name: safari
tags question: http://stackoverflow.com/q/26219593

http://stackoverflow.com/q/26202667
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41088980
has body: I'm a bit confused with the use of $scope in controllers and of scope in directives. Please verify if my understanding is correct (and also provide some alternative ways how to do this). Let's say I have an html: &lt;div ng-controller="app1_Ctrl"&gt; . . . &lt;input type="text" ng-model="value"/&gt; &lt;input type="checkbox" /&gt; &lt;button ng-click="submit()"&gt;&lt;/button&gt; &lt;/div&gt; And my main.js (function() { angular.module('mainApp', ['app1']); })(); And my app1 looks like this (based on official AngularJS documentation here) (function() { var app = angular.module('app1', []); app.controller('app1_Ctrl', ["$scope", function($scope) { . . . }]); app.directive('app1_Dir1', [function() { function link(scope, element, attr) { scope.$watch(attr.someAttrOfCheckBox, function() { // some logic here }); function submit() { // some logic here } } return link; }]); })(); How does $scope.value passed in scope in directive so that I can do some manipulations there? Will ng-click fire the function submit() in the directive link? Is it correct to use scope.$watch to listen for an action (ticked or unticked of course) in checkbox element? Many thanks to those who can explain.
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/26202923
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41089153
has title: In AngularJS, how does $scope get passed to scope?
has comment: http://stackoverflow.com/comment/41089201
has comment: http://stackoverflow.com/comment/41089163
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26202923
favorite count: 0

http://stackoverflow.com/q/26219516
answer count: 1
tagged with: javascript
score: 0
has title: API/library/tool to validate JS code?
has answer: http://stackoverflow.com/a/26220574
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26220574
has comment: http://stackoverflow.com/comment/41120661
type: Question
has body: I have some stuff done in PHP, and now I need to validate (just syntax validation) if the user is writing a valid JS in one of my form fields. What options I have apart of JSLint?

http://stackoverflow.com/comment/41191924
comment on: http://stackoverflow.com/q/26258303
type: Comment
score: 1
has text: http://jsfiddle.net/arunpjohny/paxg89q0/5/
type: QuestionComment

http://stackoverflow.com/comment/41210833
type: Comment
type: QuestionComment
has text: @Historiun: Well, if only `portraits.calculateCost()` would return nothing, then `Order cost: ` would still be written. If not, that suggests that an error *is happening*. [Open the console](http://webmasters.stackexchange.com/q/8525)
comment on: http://stackoverflow.com/q/26267876
score: 0

http://stackoverflow.com/q/26248384
tagged with: javascript
favorite count: 0
upvote count: 3
has title: Google apps script: How to horizontally align an inlineImage
has answer: http://stackoverflow.com/a/26249031
accepted answer: http://stackoverflow.com/a/26249031
downvote count: 0
tagged with: center
type: AnsweredQuestion
score: 3
tagged with: image
type: Question
tagged with: google-apps-script
has body: I have the following code, which is part of a larger program. I am trying to insert an image from my Google drive into a google doc and have it resized and centered. So far I am able to get the program to insert the image and resize it, but I do not know how to center an inlineImage. I am new to using google apps script and I have basically been copying other people's examples and modifying them. Your help would be appreciated. Let me know if I need to clarify. Again, I am trying to CENTER the inlineImage (var inlineI). Thanks! var GDoc = DocumentApp.openByUrl("URL"); //I deleted my actual URL function insertImageFromDrive(){ var img = DriveApp.getFileById(myImageFileID).getBlob(); //I deleted my actual image ID var inlineI = GDoc.appendImage(img); //insert image //resizing the image var width = inlineI.getWidth(); var newW = width; var height = inlineI.getHeight(); var newH = height; var ratio = width/height; Logger.log('w='+width+'h='+height+' ratio='+ratio); if(width&gt;320){ //max width of image newW = 320; newH = parseInt(newW/ratio); } inlineI.setWidth(newW).setHeight(newH); //resizes the image but also needs to center it }
answer count: 1

http://stackoverflow.com/q/26327905
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: jquery animate slide image
linked to: http://stackoverflow.com/q/26195949
has comment: http://stackoverflow.com/comment/41319875
tagged with: css
has body: I have one slider which slide random pictures from a dir.So i want to make animate function which will do margin-top 50px (with that animation picture will be hidden) and after that, new picture will appear (another function margin-top:0px with new picture). I make that function but i have problem, picture won't to hide, i tried with z-index but wont work... HTML &lt;div class="slika1"&gt; &lt;img class="img" src="img/1.jpg" id="img" /&gt; &lt;/div&gt; CSS .slika1 { width:auto; height:auto; min-height:88px; max-height:88px; min-width:266px; max-width:266px; border-top: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); }
has comment: http://stackoverflow.com/comment/41319951
score: 0
has comment: http://stackoverflow.com/comment/41320429
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/41134279
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26226598
has text: just print `$rawdata` into a script tag?

http://stackoverflow.com/a/26203200
answers question: http://stackoverflow.com/q/26203177
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26203177
has body: That's because you are replacing the element, so the new element doesn't have any click handler bound to it. You can either use the event delegation technique: $('#aStaticParentElement').on('click', '.hideAndShow', function () { Or change the text content of the element instead of replacing it: $('.hideAndShow').on('click', function() { $(this).text(function(_, currentText) { return currentText === '[ + ] Show' ? '[ - ] Hide' : '[ + ] Show'; }); });
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/comment/41307330
comment on: http://stackoverflow.com/a/26320820
score: 0
type: AnswerComment
type: Comment
has text: When I comment out the margin, the images don't stack up. The images on each row just move in close to each other so that there is no gap between them. The gaps between each row also closes in. But the images do not stack up. The rows and columns just move closer to each other. Still looks like a table but with no margin. As for the masonry getting called twice, which one should I comment out? The container or the wall?

http://stackoverflow.com/a/26227662
upvote count: 42
has comment: http://stackoverflow.com/comment/58200314
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/74265390
has comment: http://stackoverflow.com/comment/71499937
type: Answer
has comment: http://stackoverflow.com/comment/58231348
answers question: http://stackoverflow.com/q/26205565
downvote count: 2
accepted answer of: http://stackoverflow.com/q/26205565
has comment: http://stackoverflow.com/comment/71526488
has comment: http://stackoverflow.com/comment/52635191
has body: I'd argue that singletons (classes that manage their own singleton lifetime) are unnecessary in any language. That is not to say that singleton lifetime is not useful, just that I prefer that something other than the class manage the lifetime of an object, like a DI container. That being said, the singleton pattern CAN be applied to JavaScript classes, borrowing the "SingletonEnforcer" pattern that was used in ActionScript. I can see wanting to do something like this when porting an existing code base that uses singletons into ES6. In this case, the idea is that you make a private (via an un exposed Symbol) static singleton instance, with a public static instance getter. You then restrict the constructor to something that has access to a special singletonEnforcer symbol that is not exposed outside of the module. That way, the constructor fails if anyone other than the singleton tries to "new" it up. It would look something like this: const singleton = Symbol(); const singletonEnforcer = Symbol() class SingletonTest { constructor(enforcer) { if(enforcer != singletonEnforcer) throw "Cannot construct singleton"; } static get instance() { if(!this[singleton]) { this[singleton] = new SingletonTest(singletonEnforcer); } return this[singleton]; } } export default SingletonTest Then you can use it like any other singleton: import SingletonTest from 'singleton-test'; const instance = SingletonTest.instance;
score: 40

http://stackoverflow.com/comment/41194997
has text: If namespace pollution is the the only thing you dislike about that solution, you could always associate the flag with the element itself. Maybe use jQuery's .data() with $(this).data() in the event handler to set/read that flag.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26255772

http://stackoverflow.com/comment/41288810
score: 1
has text: @rsakhale That's not necessary. You can't click the button until after the DOM is loaded.
comment on: http://stackoverflow.com/q/26310743
type: Comment
type: QuestionComment

sidebar
type: Tag
tag name: sidebar
tags question: http://stackoverflow.com/q/26224640

http://stackoverflow.com/comment/41226060
comment on: http://stackoverflow.com/a/26276844
type: Comment
has text: I don't have time to code an example right now, but will do so on your request sometime in the next 24hours. I thought that this would shove you in the right direction for the moment, as this is how I always handle this sort of stuff.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26199593
has answer: http://stackoverflow.com/a/26199640
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26199599
linked to: http://stackoverflow.com/q/1732348
has title: How to access innerHTML but ignore tags
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26199599
has answer: http://stackoverflow.com/a/28427561
has answer: http://stackoverflow.com/a/26199747
answer count: 4
favorite count: 0
score: 2
has body: I have a plugin that looks through the HTML and replaces text. However, with my current implementation text in script tags are getting caught in the search as well. This leads to broken scripts on the affected pages. var pageText = document.body.innerHTML; document.body.innerHTML = pageText.replace(regextgoeshere); I tried my best to filter it out through my regex pattern but I need to figure out how to skip all tags. Is there a way to skip all tags when getting innerHTML?
upvote count: 2
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26199747

http://stackoverflow.com/comment/41189618
has text: `outerVar` is not used
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26256986
score: 0

http://stackoverflow.com/comment/41159696
type: Comment
type: QuestionComment
has text: what exactly is "the task"? running functions no more than once every n ms? the most efficient way will always be natively rather than using a plugin.
comment on: http://stackoverflow.com/q/26240057
score: 0

http://stackoverflow.com/a/26223407
has comment: http://stackoverflow.com/comment/41128400
has body: Check out this post (and the ones linked off from it): http://chrisrisner.com/Custom-Authentication-with-Azure-Mobile-Services-and-LensRocket. Essentially you need to create a Login and a Register method (with the suggestion to do so using Custom APIs). Inside of these you'll generate your own JWT for authenticated users.
upvote count: 2
answers question: http://stackoverflow.com/q/26222444
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26222444
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/26236045
score: 3
has body: I have a three.js scene: var scene = new THREE.Scene(); The scene contains many objects which are animated. My goal is to export the animation as a mpg4 video. My questions: How can I export a scene to get an mpg4 video? Should I do the export on the client side or on the server side? Edit: I need it to run on a website or on a Java based server. No browser extensions please.
tagged with: java
favorite count: 0
tagged with: webgl
has answer: http://stackoverflow.com/a/26236237
type: Question
tagged with: javascript
upvote count: 3
answer count: 3
has title: Three.js: How can I convert a Scene into an MPG4 Video?
tagged with: three.js
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/70153082
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/76495357

http://stackoverflow.com/q/26234235
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: Ive tried a couple out-of-the-box ways trying to get my value into my ajax but everytime I get js error's. Hopefully one of you can help. I have the following JQuery Ajax: $("#usertasklist").click(function () { $('#basicModal4').modal('hide'); $.ajax({ type: "GET", url: "/Home/GetAjaxUserTasksExecuted", data: { filterdate: variable1 }, datatype: "html", success: function (data) { console.log("Succes!"); var $titleDiv = $('#Modal5Label'); $titleDiv.replaceWith(" User Tasks Executed "); var $detailDiv = $('#superdatadivthing3'); $detailDiv.replaceWith(data); }, error: function () { console.log("Error!"); }, complete: function () { $('#basicModal5').modal('show'); console.log("Complete!"); } }); }); And a viewbag in my controller Session["Usercode"]; How can I pass the value from my view bag to replace "variable1" in the data section of my ajax call?
has title: AJAX: Pass a value to ajax method
has comment: http://stackoverflow.com/comment/41147711
has comment: http://stackoverflow.com/comment/41147672
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41148204
has comment: http://stackoverflow.com/comment/41147847
tagged with: http://stackoverflow.com/tag/json
score: -1
has answer: http://stackoverflow.com/a/26234300
upvote count: 0
answer count: 1

http://stackoverflow.com/q/26270757
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26271601
tagged with: javascript
type: Question
answer count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26271601
tagged with: angular-promise
tagged with: ngroute
upvote count: 2
has body: I have a simple template with an input and an anchor link which, upon pressing it, will load another template. I want this second template to fetch the information via a http request. I am using ng-route to redirect to the search template by default and to the results template from the path /search/:title, and I am trying to use resolve to make the request before loading the results template (code in plunker) The main problem I am facing is that when I add the resolve the controller stops being initialized (I guess it will load after the promise is returned). This means variables such as the search URL are not initialized and the $routeParams are empty when I print them on the controller search function. How should I do this? I am also not sure about the correct syntax for the resolve. Is the first search a scope variable? resolve: { search: searchController.search } For the ones lazy to check on Plunker, here it is the relevant code: Routing .config(['$routeProvider',function($routeProvider) { $routeProvider. when('/search', { templateUrl: 'templates/search.html' }). when('/search/:title', { templateUrl: 'templates/result.html', controller: 'searchController', resolve: { search: searchController.search } }). otherwise({ redirectTo: '/search' }); }]); searchController var searchController = search.controller('searchController', ["$http", "$scope", "$location", '$rootScope', '$routeParams', function($http, $scope, $location, $rootScope, $routeParams) { console.log("Controller constructor"); this.searchURL = 'http://www.myapifilms.com/imdb?title=%thetitle%&amp;format=JSON'; $scope.response = '&lt;Response here&gt;'; this.title = ''; this.defer = null; console.log("PARAMS: " + JSON.stringify($routeParams)); }]); searchController.search = function searchMovie($q, $routeParams) { searchController.defer = $q.defer; var searchString = $routeParams.title; url = searchController.searchURL.replace('%thetitle%', searchString); console.log("URL: " + url); searchController.searc…
downvote count: 1
has title: AngularJS ng-route how to make http request on resolve

http://stackoverflow.com/a/26338197
score: 0
type: Answer
has body: Just add the event.preventDefeult() function on the first line of your handler, like this: $('#floatMenu,#smallMenu').find('&gt;a').click(function(event) { event.preventDefault(); var t = this; $('#wynik').animate({opacity:0}, 'fast', function() { $(this).load(t.href, function() { $(this).animate({opacity:1}, 'fast'); }) }); //$('#wynik').load(this.href); $(this).addClass('active').siblings().removeClass('active'); }).first().click();
answers question: http://stackoverflow.com/q/26337941
has comment: http://stackoverflow.com/comment/52519121

http://stackoverflow.com/q/26319212
has answer: http://stackoverflow.com/a/26319264
tagged with: css
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
has body: ive created a little site with a navigation header consisting of a table with 5 elements, each taged with an id. the .content_active class has opacity zero by default and the .content class is not visible by default (display:none;) '#contact' is the navigation element, when you click it, it does a little animation and then should blend out the current active content (div with class .content_active) and convert it to a .content class element (which is not displayed with css). after that, it should take the div with id contact_content and convert it to a .content_active element (which is beeing displayed by css) and change its opacity from 0 to 1. But it only decreases the opacity of the current .content_active class to 0, after that nothing happens.. what am i doing wrong? var speed = 200; $("#contact").click(function(){ $("#contact").animate({opacity:"1"},50, function() { $(".content_active").animate({opacity:"0"},speed,function(){ $(this).removeClass(".content_active").addClass(".content"); $("#contact_content").addClass(".content_active").animate({opacity:"1"},speed); }); }); }); css: .content { position: absolute; left:50%; margin-left:-360px; margin-top: 240px; width:720px; display:none; } .content_active { position: absolute; left:50%; margin-left:-360px; margin-top: 240px; width:720px; opacity: 0; }
answer count: 1
accepted answer: http://stackoverflow.com/a/26319264
tagged with: jquery
has title: My jQuery page-navigation code to hide/show divs doesnt work, and i cant figure out why exactly
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26310942
has body: Unlike iOS, which has a built-in PDF viewer - Android's webview does not have PDF viewer built-in. This is why it is going to fail in Android. You have 2 choices in Android: View the file using Google Docs by storing the file at a remote server and redirecting the user like so: window.open(encodeURI('https://docs.google.com/gview?embedded=true&amp;url=http://www.your-server.com/files/your_file.pdf'), '_blank', 'location=yes,EnableViewPortScale=yes'); Or use a Cordova plug-in. For example this one (you can search in Google for more). For this, you'll need to learn how to create Cordova plug-ins in Worklight. You can read more options here: Phonegap InAppBrowser display pdf 2.7.0
has comment: http://stackoverflow.com/comment/75871034
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/75895792
type: Answer
has comment: http://stackoverflow.com/comment/41470713
upvote count: 26
accepted answer of: http://stackoverflow.com/q/26304729
has comment: http://stackoverflow.com/comment/41365178
has comment: http://stackoverflow.com/comment/51246818
answers question: http://stackoverflow.com/q/26304729
has comment: http://stackoverflow.com/comment/41362169
score: 26

http://stackoverflow.com/q/26345312
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26345469
has title: Using a form input to change a JavaScript variable (like a prompt)
has body: I have put together a text based game using java script. I have it to where when a question is asked, it uses a prompt and pulls up a dialog box where you have to enter your answer. I want to avoid using the dialog box all together and instead have it just print the question on the screen and have a text input box on the page where you can enter your answers. I do not know how to link an html input to my javascript so that it would act like a prompt and change the variable depending on what you enter. An example of one of the questions is below: var seedcomp = 1 while (seedcomp === 1) { var seed = prompt("What kind of potato do you want to be? A RUSSET POTATO, RED POTATO, or SWEET POTATO? Type STOP to quit.").toUpperCase(); var para = document.createElement("p"); var node = document.createTextNode("What kind of potato do you want to be? A RUSSET POTATO, RED POTATO, or SWEET POTATO?"); para.appendChild(node); var element = document.getElementById("game"); element.appendChild(para); window.scrollBy(0,1000000); switch(seed) { case 'RUSSET POTATO' : var para = document.createElement("p"); var node = document.createTextNode("&gt; Hot diggity! You became a Russet Potato!"); para.appendChild(node); var element = document.getElementById("game"); element.appendChild(para); seedcomp = 2 window.scrollBy(0,1000000); break; case 'RED POTATO' : var para = document.createElement("p"); var node = document.createTextNode("&gt; Greetings comrade! Welcome to the potatoes of Soviet Socialist Republics! You are a Red Potato."); para.appendChild(node); var element = document.getElementById("game"); element.appendChild(para); seedcomp = 2 window.scrollBy(0,1000000); break; case 'SWEET POTATO' : var para = document.createElement("p"); var node = document.createTextNode("&gt; Hey there sweet thing! You're such a Sweet Potato!"); para.appendChild(node); var element = document.getElementById("game"); element.appendChild(para); seedcomp = 2 window.scrollBy(0,1000000); break; case 'STOP' : var …
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26353210
tagged with: marionette
has comment: http://stackoverflow.com/comment/41444988
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/41370439
type: Question
has comment: http://stackoverflow.com/comment/41366232
has comment: http://stackoverflow.com/comment/41445207
score: 0
has title: JavaScript Selector is Not working when condition changes
answer count: 0
has body: I am facing an issue with JavaScript Selector here is the code onChangeCustomGroup : function(){ var element = this.model.get("customGroup"), that = this; if(element == "SECURITY") { that.ui.__el_string_Abc.xyzSelector(); } if(element == "BENCHMARK") { that.ui.__el_string_Abc.dfgSelector(); } } onChangeCustomGroup is a ModelEvent in Backbone There are two fields 1.customGroup 2. filterCode customgroup field having two values populate 1.SECURITY AND 2.BENCHMARK securitySelector and benchmarkSelector are two functions which will returns a set of values in the form of html and appends with the filtercode region The issue is here when i select SECURITY ,security fields are populating in the filtercode field but on change to BENCHMARK benchmark selector is not populating It is something like working only with one condition.Not with two
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery

http://stackoverflow.com/q/26279067
tagged with: popup
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41230512
tagged with: jquery
has answer: http://stackoverflow.com/a/26279262
has body: I downloaded Fancybox pluging from http://fancyapps.com/fancybox and used for open my gallery images in popup. and also I used fixed navigation when scrolling. My problem is, when I click on images, it will open in a popup window. It is ok. But, fixed navigation menu is still appear on the popup window. ![problem][1] Navigation Menu HTML Home shop Gallery Facilities Terms Contact Navigation Menu Javascript jQuery("document").ready(function($){ var nav = $('.nav-container'); $(window).scroll(function () { if ($(this).scrollTop() > 136) { nav.addClass("f-nav"); } else { nav.removeClass("f-nav"); } }); }); Because of that navigation, user can't close the popup window. Guys, please help me to solve this.
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
has title: jQuery Image Popup and fixed navigation
accepted answer: http://stackoverflow.com/a/26279262
answer count: 1

http://stackoverflow.com/comment/41094680
type: Comment
comment on: http://stackoverflow.com/a/26205770
score: 0
has text: Then you can simply pass the ids of the elements as strings to the function. I've updated my answer.
type: AnswerComment

http://stackoverflow.com/comment/41105277
type: AnswerComment
has text: That's cool. You're answer is not bad. I just wanted to leave some "constructive criticism" to enlighten future viewers. :-)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26206182

http://stackoverflow.com/q/26324990
type: UnansweredQuestion
has title: Title of history.pushState is unsupported, what's a good alternative?
upvote count: 17
tagged with: html5-history
score: 17
tagged with: dom
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27692636
has answer: http://stackoverflow.com/a/74184375
has answer: http://stackoverflow.com/a/48736413
tagged with: cross-browser
has body: The second parameter of History.pushState and History.replaceState can be used to set the "title" of the history entry. This means that when the user clicks through page 1 to page 8, this is what he should see in his history bar: And it is working on Safari and Opera. But on Chrome and FireFox, this is what the user sees: Trying to change document.title doesn't work as it changes all the entries within the history title: What's the best solution to this problem? Are we forced to using only one history title for all the pages implemented using pushState and replaceState?
answer count: 4
has answer: http://stackoverflow.com/a/26325048

http://stackoverflow.com/comment/41621999
type: QuestionComment
score: 0
has text: @SamBraslavskiy wow nice. We are waiting for it indeed! This problem is annoying as hell for this particular types of sites :)
comment on: http://stackoverflow.com/q/26326958
type: Comment

http://stackoverflow.com/q/26344507
has comment: http://stackoverflow.com/comment/41483786
downvote count: 0
accepted answer: http://stackoverflow.com/a/26344598
type: Question
has answer: http://stackoverflow.com/a/26344598
has title: why isn't "function" considered a datatype in javascript?
tagged with: javascript
score: 4
answer count: 1
has comment: http://stackoverflow.com/comment/41350688
favorite count: 0
has body: The datatypes listed in MSDN for javascript are Number, String, Boolean, Object, Array, Null, Undefined. However, when you do typeof function, its type is function. Why is this the case, and what's the definition of datatype?
upvote count: 4
has comment: http://stackoverflow.com/comment/41350629
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41351341

http://stackoverflow.com/q/26264573
score: 0
has body: I have an ASP.NET page with two buttons. One triggers and UpdatePanel (AJAX CallBack). The other a full page refresh (Postback). I need to disable both buttons when any of them are clicked (This part i manage to make it work) and reenabled them when the Postback or Callback is complete. Wich event or where on JavaScript should I Call the function to enabled the buttons in both cases? Thanks! EDIT Here's some code. This is the buttons definition: &lt;asp:button id="cmdFiltrar" UseSubmitBehavior="false" style="width:48%" runat="server" CssClass="botonActivo" text="&lt;%$ Resources:Idioma, Historico_Consultar%&gt;"/&gt; &lt;asp:button id="cmdExcel" UseSubmitBehavior="false" style="width:48%" runat="server" CssClass="botonActivo" text="&lt;%$ Resources:Idioma, Historico_Excel%&gt;"/&gt; on Page_load (Server Side) I define the JavaScript function to enabled/disabled the buttons, and add an attribute to both buttons to call it on click: ClientScript.RegisterClientScriptBlock(Page.GetType(), "EstadoBotones", "function EstadoBotones(bActivo) {document.getElementById('" + cmdExcel.ClientID + "').disabled=bActivo;document.getElementById('" + cmdFiltrar.ClientID + "').disabled=bActivo;}", True) cmdFiltrar.Attributes.Add("onclick", "javascript:" + "EstadoBotones(true);") cmdExcel.Attributes.Add("onclick", "javascript:" + "EstadoBotones(true);") Now I need to know where to put this line of code (JavaScript): EstadoBotones(false); To re-enable both buttons. Any Idea? Thanks! EDIT2 As suggested by @Shouvik, I edit my code-behind in the page_load event: Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "EstadoBotones", "function EstadoBotones(bActivo) {document.getElementById('" + cmdExcel.ClientID + "').disabled=bActivo;document.getElementById('" + cmdFiltrar.ClientID + "').disabled=bActivo;}", True) cmdFiltrar.Attributes.Add("onclick", "javascript:" + "EstadoBotones(true);") cmdExcel.Attributes.Add("onclick", "javascript:" + "EstadoBotones(true);") Page.ClientScript.Reg…
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41205355
has title: JavaScript How to enabled button on client-side on CallBack and Postback
answer count: 0
has comment: http://stackoverflow.com/comment/41204314
has comment: http://stackoverflow.com/comment/41204072
has comment: http://stackoverflow.com/comment/41204756
has comment: http://stackoverflow.com/comment/41204028
type: Question
linked to: http://stackoverflow.com/q/1905716
tagged with: javascript

http://stackoverflow.com/a/26307718
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: I found i while back this small snippet of a template manager (can't remember the author, sorry): TemplateManager = { templates: {}, // holds the templates cache get: function(id, callback){ var template = this.templates[id]; if (template) { // return the cached version if it exists callback(template); } else { var that = this; // fetch, cache and return the template $.get(id + ".html", function(template) { that.templates[id] = template; callback(that.templates[id]); }); } } }; It fetches the template file, caches it and calls a callback function after it was loaded, like this: TemplateManager.get('path/to/your/template', function(resp) { // resp is the template markup return this; }); Hope it helps. UPDATE Here is a working fiddle: http://jsfiddle.net/411jgf78/1/
has comment: http://stackoverflow.com/comment/41294809
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26307596
has comment: http://stackoverflow.com/comment/41283467
answers question: http://stackoverflow.com/q/26307596
has comment: http://stackoverflow.com/comment/41283641

http://stackoverflow.com/q/26202348
has title: JS: Semicolons after variable declaration
has body: I've stumbled upon one very interesting gotcha, which was really hard to find. Since found, it was not hard to solve, but I'd like to find explanation in order not to repeat something similar in future. Here's a simplified version of my JS-code: //the following does not work: var A = function(){ console.log('I am A') } (function B(){ console.log('I am B'); })() A(); I was expecting to see 'I am B', then 'I am A' in console. However, there was Uncaught TypeError: undefined is not a function After a long debugging I have found out, that the missing semicolon just after A function causes the problem: //the following works as expected: var A = function(){ console.log('I am A') }; (function B(){ console.log('I am B'); })() A(); Moreover, when you declare the function in other way, everything will be just fine: //this works too function A(){ console.log('I am A') } (function B(){ console.log('I am B'); })() A(); So, it's a combination of a variable declaration and parentheses that break the code. Could you please explain why this happens? Here's a fiddle for testing: http://jsfiddle.net/wxu2f8en/
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41088936
has comment: http://stackoverflow.com/comment/41089828
has answer: http://stackoverflow.com/a/26202397
score: 4
linked to: http://stackoverflow.com/q/25884081
upvote count: 4
duplicate of: http://stackoverflow.com/q/25884081
downvote count: 0
possible better answer: http://stackoverflow.com/a/26202483
tagged with: javascript
has answer: http://stackoverflow.com/a/26202483
accepted answer: http://stackoverflow.com/a/26202397
has comment: http://stackoverflow.com/comment/41089422
type: AnsweredQuestion
favorite count: 0

http://stackoverflow.com/a/26296710
score: 0
has comment: http://stackoverflow.com/comment/41267633
answers question: http://stackoverflow.com/q/26296611
has body: Try this: function compareVariable(a,b,c){ if ((a == b) || (b == c) || (a == c)) { return true // any or all equal } else { return false; // if none of two is equal } }
type: Answer

http://stackoverflow.com/q/26203892
tagged with: jquery
has body: I am trying to get this working where if you hover on the div with the class of photo, the photo-info slides in for that div (not both). I think I need the 'this' in Jquery but I am a little lost. I don't want to have to give each div.photo a separate id. How can I amend my script? Some information Some information .photo-info {display:none;}
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26203946
has title: JQuery Slide (this) element only
type: UnansweredQuestion
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/26203903
has answer: http://stackoverflow.com/a/26203944
type: Question
has answer: http://stackoverflow.com/a/26203908
tagged with: javascript

http://stackoverflow.com/a/26216277
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26215957
has body: the problem is that transforming a div will not change its height. By modifying the coordinate space, CSS transforms change the position and shape of the affected content without disrupting the normal document flow. This guide provides an introduction to using transforms. mdn link One solution is to set the bottom margin on ZoomIn and Zoom Out as $("#section").css("margin-bottom", '-' + parseInt((1-sclVal)*$("#section").height()) + 'px'); try http://jsfiddle.net/z16jc6wa/2/
answers question: http://stackoverflow.com/q/26215957
type: Answer
has comment: http://stackoverflow.com/comment/41149653

http://stackoverflow.com/comment/41275830
type: QuestionComment
comment on: http://stackoverflow.com/q/26248599
score: 0
has text: There is no problem, just an unusual work flow, which was why I asked why you needed XHTML, and you explained yourself. Done. A decision was made by w3c to discontinue XHTML at 1.1, with the idea being that if you have XML, it's just as easy to XSLT to XHTML as it is to XSLT to proper HTML isntead, so the latter is simply preferred for the modern web. You don't *have* to, but it's what most other people/orgs do. The TR link you gave is a draft that talks about the generic namespace links only. That doesn't mean XHTML kept eveolving alongside HTML. It hasn't: it ended with XHTML 1.1
type: Comment

http://stackoverflow.com/comment/97714895
comment on: http://stackoverflow.com/a/55323900
type: AnswerComment
score: 0
type: Comment
has text: Is it faster than the [other](https://stackoverflow.com/a/26265095/450913) answer?

http://stackoverflow.com/comment/41101752
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26209054
has text: Maybe [NoFlo](http://noflojs.org/) would help you.. It's a GUI for [FRP](http://en.wikipedia.org/wiki/Functional_reactive_programming).

http://stackoverflow.com/a/26289960
score: 1
downvote count: 0
has body: I would like for both objA and objB stuff to be done. You have to call the method of objA explicitly: var objB = _.extend({}, objA, { doStuff: function() { objA.doStuff.apply(this, arguments); // do objB stuff } }, objA); Note that I'm adding an empty object as first argument, so that first objA's properties are merged and then yours. For more info about how _.extend works, see the documentation. Object Literals and Prototypal Inheritance? Object literals currently don't provide a way to set the prototype. You can create an empty object with a specific prototype with Object.create and then merge other properties into it: var objB = Object.create(objA); // `merge` is a fictional function that copies properties from object to another merge(objB, { doStuff: function() { ... } }); You can still only call objA's method by explicitly referencing it. Note: This section probably has to be revised after ES6 is finalized and implement. In ES6 you will probably be able to set the prototype via the __proto__ property name: var objB = { __proto__: objA, doStuff: function() { } }; or via Object.setPrototypeOf: var objB = {...}; Object.setPrototypeOf(objB, objA); Then you should be able to call objAs method via the super keyword: var objB = { __proto__: objA, doStuff: function() { super.doStuff(); } };
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26289896
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26289896

http://stackoverflow.com/q/26343962
tagged with: class
tagged with: jquery-selectors
upvote count: 1
has body: var i = $( ".map_tile:contains('X')" ).attr('index'); $( ".map_tile[index*=i]" ).text(''); the console logs i as 2225 which is correct, but when I attempt to access X Any pointers in whats going wrong here?
has title: Select div class given attribute = variable
tagged with: attributes
has comment: http://stackoverflow.com/comment/41349596
accepted answer: http://stackoverflow.com/a/26344010
downvote count: 2
has answer: http://stackoverflow.com/a/26344002
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26344010
score: -1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26344002
favorite count: 0

http://stackoverflow.com/comment/41342712
comment on: http://stackoverflow.com/q/26340252
has text: http://stackoverflow.com/questions/2321606/copy-image-to-clipboard-from-browser-in-javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41169107
type: QuestionComment
has text: that´s right. I tested on Safari for Windows (Safari 5.1.7) so that is why it doesn't work. Thanks for your quick answer
comment on: http://stackoverflow.com/q/26245088
score: 0
type: Comment

http://stackoverflow.com/q/26320382
answer count: 1
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
has title: Dropdown Menu Pushing Parent Menu Items
score: 0
has comment: http://stackoverflow.com/comment/41306271
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41306040
has comment: http://stackoverflow.com/comment/41307642
has comment: http://stackoverflow.com/comment/41309370
accepted answer: http://stackoverflow.com/a/26322527
has body: I have five parent menu items, and the third one has a child dropdown menu. When you click on the third parent menu, the dropdown menu shows up, but it pushes the fourth and fifth parents menu items to below.I'd like the dropdown menu to be below the parent menu row, without pushing any parent menu items. It's a Shopify site. http://jsfiddle.net/3s2qhhx3/ //Main nav expanders $(document).on('click', '#navpanel .mainnav .title', function() { $(this).parent().addClass('active').siblings().removeClass('active'); $(window).trigger('reup-navbar'); }); var navSpeed = 150; $(document).on('click', '#navpanel .mainnav button', function() { //Prep animation on sublist if ($(this).parent().hasClass('expanded')) { $(this).html(''); $(this).siblings('ul').stop(true, true).css('display', 'block').slideUp(navSpeed, 'linear', function() { $(this).parent().toggleClass('expanded'); $(window).trigger('reup-navbar'); }); } else { $(this).html(''); $(this).siblings('ul').stop(true, true).css('display', 'none').slideDown(navSpeed, 'linear', function() { $(window).trigger('reup-navbar'); }); $(this).parent().toggleClass('expanded'); } $(window).trigger('reup-navbar'); }); $(document).on('click', '#navpanel .mainnav a[href="#"]', function() { $(this).siblings('button').trigger('click'); return false; }); #navbar #navpanel .mainnav { position: relative; margin: 0 auto; } #navbar #navpanel .mainnav > ul > .active > ul { display: block; text-align: center; } #navbar #navpanel .mainnav li li { position: relative; display: inline; text-align: center; } blog New Arrivals Categories Knits Tops Dresses Bottoms . . . Sale ...
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41309329
has comment: http://stackoverflow.com/comment/41305983
has answer: http://stackoverflow.com/a/26322527

http://stackoverflow.com/comment/41486669
score: 1
comment on: http://stackoverflow.com/a/26410548
type: AnswerComment
has text: As luigi says, you have to be on the same domain as the file you're trying to fetch is
type: Comment

http://stackoverflow.com/q/26205111
has comment: http://stackoverflow.com/comment/41101918
has title: Logging into quora using python mechanize
favorite count: 0
tagged with: mechanize-python
tagged with: xmlhttprequest
has body: I am trying to log into quora using mechanize module. Following is the code I am using: import mechanize import cookielib br = mechanize.Browser() # create a browser object br.set_handle_equiv(True) br.set_handle_redirect(True) br.set_handle_referer(True) br.set_handle_robots(False) br.set_headers = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)')] cj = cookielib.LWPCookieJar() br.set_cookiejar(cj) res = br.open('http://www.quora.com') br.select_form(nr = 0) br.form['email'] = 'uuuu' br.form['password'] = 'pppp' res = br.submit() print res.read() I am getting following error : Traceback (most recent call last): File "mech.py", line 29, in &lt;module&gt; res = br.submit() File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 541, in submit return self.open(self.click(*args, **kwds)) File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open return self._mech_open(url, data, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open raise response mechanize._response.httperror_seek_wrapper: HTTP Error 500: Internal Server Error One of the answer to the same question says that its because this particular form is submitted via javascript XHR POST request to https://www.quora.com/webnode2/server_call_POST?instart where request parameters looks like: json:{"args":[],"kwargs":{"email":"&lt;email&gt;","password":"&lt;password&gt;","passwordless":1}} formkey:62c4f0d88246bfd81b27cf0dca410d75 window_id:dep4-4597603286175583039 _lm_transaction_id:0.4317954108119011 _lm_window_id:dep4-4597603286175583039 __vcon_json:["hmac","t1cKg1QhQsYPCA"] __vcon_method:do_login js_init:{} Is there any module to solve this problem?? P.S. I used selenium, it works but its very slow.
has comment: http://stackoverflow.com/comment/41118097
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: web-scraping
type: Question
has comment: http://stackoverflow.com/comment/47701841
tagged with: javascript
tagged with: python-2.7
upvote count: 1
has comment: http://stackoverflow.com/comment/41114308

http://stackoverflow.com/a/26235375
score: 1
accepted answer of: http://stackoverflow.com/q/26233510
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You would not get a huge bounce rate (I assume that is what you mean by rebound stat) since by default events count towards the bounce rate (i.e. somebody with a pageview and an event is not a bounce unless you set the event tracking code specifically not to affect the bounce rate). More to the point, you can send virtual page views on your callback functions instead of events - that is if huge portions of the page content change you'd pass a made up url and a pagename to the pageview call (specifics depend on Google Analytics Version) and fire it after the function that changes the content. With Universal Analytics the info for the virtual pageview would go into the configuration object for the call: ga('send', 'pageview', { 'page': 'some/virtual/path', 'title': 'Title for tracked view' }); Even though the ressource at the url does not physically exist Google Analytics would still record it as page location if you send the call and thus allow you to distinguish individual views in your one-page app.
answers question: http://stackoverflow.com/q/26233510
upvote count: 1

http://stackoverflow.com/q/26283478
has comment: http://stackoverflow.com/comment/41239045
answer count: 0
has title: AngularJS: Push Checked Checkboxes
type: Question
tagged with: javascript
has body: I'm trying to work out how to push checked checkboxes, that are submitted via a form, to an object called services, using AngularJS. These are my objects: $scope.sectors = [ 'health', 'social', 'education' ]; $scope.services = [ { 'name': 'Hernia Repair', 'sectors': { 'health': true } }, { 'name': 'Cancer', 'sectors': { 'health': true, 'social': true, 'education': true } }, ]; And this is my form: Name of Service Another {{sector}} Submit And here's the JS I'm using to push the data onto the form: function createService(service) { $scope.services.push(service); } $scope.createService = createService; The name seems to get added to the list of services, but the sectors do not. Can anyone point me in the right direction, or explain what I might be doing wrong. Any help is appreciated. Thanks in advance!
score: 0
has comment: http://stackoverflow.com/comment/41238904
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41238889
type: UnansweredQuestion

http://stackoverflow.com/comment/41321772
type: QuestionComment
has text: Thanks for the tip. I did modify it, and unfortunately it didn't work. I can tell in the that the `sendTheData` function is being called because it spits out a comment to the console, but the ajax event within that function isn't firing.
comment on: http://stackoverflow.com/q/26328835
score: 0
type: Comment

http://stackoverflow.com/a/26344643
answers question: http://stackoverflow.com/q/26344581
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26344581
has body: remove the .data just use var cat = json[0]; console.log(cat); console.log(cat.category); $("#location").replaceWith('Category : ', cat.category);
type: Answer

http://stackoverflow.com/q/26335538
answer count: 3
has comment: http://stackoverflow.com/comment/41336922
tagged with: javascript
has comment: http://stackoverflow.com/comment/41337292
has title: AngularJS - Using a directive to produce a not working
has comment: http://stackoverflow.com/comment/41496793
tagged with: angularjs
has answer: http://stackoverflow.com/a/26336370
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/26341451
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41334470
has comment: http://stackoverflow.com/comment/41426429
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41337111
has body: I have a large set of repeated HTML for which i am trying to create a directive for. I have created directives in the past, mainly on DIV's, but this is the first time trying on a / . HTML: {{ history.Name }} U D 1 2 3 4 5 6 {{ history.Name }} U D 1 2 3 4 5 6 {{ history.Name }} U D 1 2 3 4 5 6 As you can see from the above, this only thing that changes from the 's above is the range of values in the .slice - so i'll pass them into my directive via: My directive: app.directive('historyStatus', function () { return { restrict: 'A', replace: false, transclude: true, template: ' ' + '' + 'U' + 'D' + '1' + '2' + '3' + '4' + '5' + '6' + '' + '' + ' ', scope: { sliceStartRange: '=sliceStatusHistoryStartRange', sliceEndRange: '=sliceStatusHistoryEndRange' } }; }); With the above, the directive is not diaplying any results, nor are any errors appearing in the console.
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/41334356
has answer: http://stackoverflow.com/a/26426678

http://stackoverflow.com/comment/41130376
score: 2
comment on: http://stackoverflow.com/a/26224451
type: AnswerComment
has text: The question states that the solution must work without an internet connection. What would be the purpose of AJAX here?
type: Comment

http://stackoverflow.com/q/26291008
answer count: 1
tagged with: jquery
has body: I have the following object and list: myObj = [ { width: 10, height: 15, length: 20 }, { width: 8, height: 10, length: 10 }, { width: 23, height: 5, length: 5 }, { width: 11, height: 18, length: 10 } ]; heights = {12,13,14,15}; In Javascript or jQuery what is the best way to replace the object heights with the values in the heights list? The order does matter. Results should be: myObj = [ { width: 10, height: 12, length: 20 }, { width: 8, height: 13, length: 10 }, { width: 23, height: 14, length: 5 }, { width: 11, height: 15, length: 10 } ];
has comment: http://stackoverflow.com/comment/41252764
has title: How to replace values in an object with values from a list in Javascript?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26291039
has comment: http://stackoverflow.com/comment/41252741
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26291039
score: 0

http://stackoverflow.com/q/26206536
has body: I've made a card drawing programm to draw three cards. Now I like to avoid that one card is added multiple times. So, I made a little function to check: function check() { if (card2 == card1 || card3 == card2 || card3 == card1 ) { alert("double card") } }; When I check the variables with console.log they all different. But the alert is always popping up. Why doesn't it work?
score: 0
has comment: http://stackoverflow.com/comment/41096340
has comment: http://stackoverflow.com/comment/41096220
has comment: http://stackoverflow.com/comment/41096410
downvote count: 1
has comment: http://stackoverflow.com/comment/41096330
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41096647
has comment: http://stackoverflow.com/comment/41096222
has answer: http://stackoverflow.com/a/26206712
type: Question
has comment: http://stackoverflow.com/comment/41096231
has title: Check variables in Javascript fails
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41096389
tagged with: javascript
has answer: http://stackoverflow.com/a/26212165
favorite count: 0

http://stackoverflow.com/q/26215363
favorite count: 0
tagged with: google-chrome-extension
score: 2
type: AnsweredQuestion
upvote count: 2
has body: I write chrome extension. When user go to page http://foo.com/ i load content script. foo.com code like this: &lt;iframe src="http://bar.com/" id="bar"&gt;&lt;/iframe&gt; An i need in extension access to iframe content: document.getElementById('bar').contentDocument.body.innerHTML When I run chrome with flag disable-web-security it works, but when chrome is running without this flag code don't work. Is possible run chrome without flag disable web security and disable web security only for extension?
has title: Chrome extensions disable web security
type: Question
has answer: http://stackoverflow.com/a/26215626
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26215626
tagged with: security
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41207848
has text: First - margin properties should be camel-cased -> marginLeft,marginRight... and, second, bigger problem: if you check generated HTML in console, you will see that gets dir property...so, you can't put string you've made as param for animate() function. Maybe this could help: http://stackoverflow.com/questions/2039646/how-to-pass-variable-into-jquery-animate-function-properties
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26266005
score: 0

http://stackoverflow.com/q/26298780
score: -3
linked to: http://stackoverflow.com/q/18530258
type: AnsweredQuestion
has body: I am in initial stages of creating a public website with client-side rendering using AngularJS. I've read in many forms that dynamic generated content won't be indexed by Google. Is there any way to go forward without affecting search engine indexing and ranking or should I shift to the conventional development ? My client want it to be done in AngularJS. So I just wanna make sure that there is no workaround before I start convincing them.
has comment: http://stackoverflow.com/comment/41266473
has answer: http://stackoverflow.com/a/26298820
has answer: http://stackoverflow.com/a/26299282
downvote count: 3
type: Question
possible better answer: http://stackoverflow.com/a/26299282
upvote count: 0
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/41266419
accepted answer: http://stackoverflow.com/a/26298820
answer count: 2
has comment: http://stackoverflow.com/comment/41267190
tagged with: seo
has title: How to make ajax content indexed by google?
tagged with: client-side
has comment: http://stackoverflow.com/comment/41273656
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41266548

http://stackoverflow.com/q/26347638
has title: Console.log object velocity with box2d
type: AnsweredQuestion
score: 1
tagged with: box2dweb
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26362091
accepted answer: http://stackoverflow.com/a/26362091
tagged with: console.log
downvote count: 0
has body: I'm trying to console.log the velocity of an object with box2dweb It should be possible to get velocity with following method GetLinearVelocity() but I'm not sure how to do? I've tried the following ways: var heroMove = GetLinearVelocity().hero; console.log('heroMove'); and var heroMove = GetLinearVelocity('hero'); console.log('heroMove'); In console I get the message: ReferenceError: GetLinearVelocity is not defined It's probably an easy answer, but seems like there is no doc for jquery.box2d and I can't see whats wrong?

http://stackoverflow.com/a/26331828
score: 0
has body: First of all Accordion panel's SelectedIndex property doesn't state that the Accordion panel is open or close. It indicates which pane out of many is currently displayed. So, it could be 0, 1, 2 ... n (where n indicates number of panes - 1). The definition for the SelectedIndex property from Ajax Control Toolkit website is as follows SelectedIndex - The AccordionPane to be initially visible And, this value is stored in a hidden field with the name containing "_AccordionExtender_ClientState". TIP Ok, back to solving your issue. First of all you need to think in HTML rather than server side properties of the Accordion control because you are going to manipulate it in client side using JavaScript. Accordion control is translated to a bunch of DIV elements in client side with CSS class names like accordionHeader and accordionHeaderSelected (this could vary depending on whether you've assigned custom classes during design time). See these images and focus on the highlighted areas. When the pane is expanded When a pane is expanded it's DIV contains class = "accordionHeaderSelected". And, the hidden filed's value is the index of the pane selected (in this case first pane, i.e. 0). Also note the style property of the selected pane's content DIV. When the pane is collapsed When a pane is collapsed it's DIV contains class = "accordionHeader". And, the hidden filed's value is always -1. Also note the style property of the selected pane's content DIV. Therefore, in your JavaScript make use of these values to identify the currently expanded DIV. Then do follow these steps. change the element class to class = "accordionHeader" Find the content DIV related to the selected pane and close it by setting following style of the content DIV. style = 'height: 0px; overflow: hidden; display: none; opacity: 0;' You should also make the hidden field value = -1 Hope this make sense to you. Let me know if you need further explanation.
has comment: http://stackoverflow.com/comment/41338195
has comment: http://stackoverflow.com/comment/41337127
type: Answer
answers question: http://stackoverflow.com/q/26330441

breakpoints
tags question: http://stackoverflow.com/q/26302096
tag name: breakpoints
type: Tag

http://stackoverflow.com/comment/41328077
type: Comment
has text: @charlietfl got rid of the where 1, still the same error.
comment on: http://stackoverflow.com/q/26331994
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41155066
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26237922
score: 1
has text: Just a suggestion, but `(* denotes class, ! denotes id)`??? Wouldn't you be better off with standards like `(. denotes class, # denotes id)` so that it is *more* readable to jQuery and CSS folks :)

http://stackoverflow.com/a/26241806
downvote count: 0
answers question: http://stackoverflow.com/q/26241478
upvote count: 3
has comment: http://stackoverflow.com/comment/41162240
has body: Preprocess into a different look up table var revMap = []; // or var revMap = {}; Object.keys(resourceMap).forEach(function(key) { resourceMap[key].forEach( function (ind) { revMap[ind] = key; }); }); console.log(revMap[21]) or look up on demand: resourceMap = { "a": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "b": [11, 12], "c": [21, 23], "d": [54, 55, 56, 57, 510] }; function findMapKey (map, ind) { var match = null; Object.keys(map).some(function(key) { var test = map[key].indexOf(ind)!==-1; if (test) { match = key; } return test; }); return match; } console.log(findMapKey(resourceMap, 21));
type: Answer
score: 3

http://stackoverflow.com/comment/41137617
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26228304
has text: ajax stands for asynchronous only.

http://stackoverflow.com/comment/41212062
type: AnswerComment
type: Comment
has text: I did read it. And OP specifically said he doesn't want to use it, the point you did not address. The answer, while perfectly correct, is thus useless unless you can add a PHP file for him, or point him to a third-party service equivalent.
comment on: http://stackoverflow.com/a/26268751
score: 0

http://stackoverflow.com/a/32852409
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/53578619
has body: Custom Cell Rendering: In your Hands On Table settings you can add the following to display the num and the color as the background color from your object: renderer: function(instance, td, row, col, prop, value, cellProperties) { if(value){ td.innerHTML = value.num; td.style.backgroundColor = value.color; } return td; }, http://docs.handsontable.com/0.18.0/demo-custom-renderers.html Sounds like you were able to setup a custom editor, if not you there are instructions here: http://docs.handsontable.com/0.18.0/tutorial-cell-editor.html I don't know about pasting from excel with this, at the very least the custom editor would need to take only a single argument. Only one is going to come from excell anyway. Perhaps with hooks would be a good method to investigate for that. Also, probably would want to start by extending the default editor also explained in the above docs rather than a complete custom one. Setting the type to numeric doesn't work as it expects a number not a custom object. The 'types' predefine a set of renderer, editor and validator as the example they give in the documentation you found: { renderer: Handsontable.NumericRenderer, editor: Handsontable.editors.TextEditor, validator: Handsontable.NumericValidator } https://github.com/handsontable/handsontable/wiki/Understanding-cell-functions
has comment: http://stackoverflow.com/comment/53558329
answers question: http://stackoverflow.com/q/26247185
upvote count: 1
has comment: http://stackoverflow.com/comment/53564392
score: 1

http://stackoverflow.com/comment/41263988
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26297076
score: 0
has text: @Alnitak Yes it does, as the outer function contains a number of functions some of which rely on each other being in the same 'space'. The application is a google geochart, which contains all the options and other things inside this outer function.

http://stackoverflow.com/comment/41302152
type: QuestionComment
comment on: http://stackoverflow.com/q/26318063
has text: The $http service returns a promise, therefore I don't think that you can configure it to make a synchronous call... However, I can't think of a single case where I would want my app to stop until I get a response from the server.
score: 2
type: Comment

http://stackoverflow.com/a/26269103
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26269054
has body: Replace all sequences of two or more / with a single /: temp.replace(/\/{2,}/g,'/');
type: Answer
accepted answer of: http://stackoverflow.com/q/26269054
upvote count: 3
score: 3

http://stackoverflow.com/q/26215957
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: zooming
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: how to make footer as relative to zoom-able content ?
has answer: http://stackoverflow.com/a/26216277
accepted answer: http://stackoverflow.com/a/26216277
has body: I am doing simple zooming implementation, that is working fine but the problem is when i do zoom-in. the footer div locating in the same place and there is lot of white space appearing between zooming div and footer. Please help me how to maintain same gap between zoom-able div and footer even you did zoom-in/zoom-out. I tried all the postion options even it not happening as expected please need help. Id Card Print aaaaaaaaaa bbbbbbbbbb cccccccccc dddddddddd Copyright .............. http://jsfiddle.net/ravikumarmaddi/z16jc6wa/1/
tagged with: javascript

http://stackoverflow.com/a/26198615
type: AcceptedAnswer
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41081862
accepted answer of: http://stackoverflow.com/q/26198512
answers question: http://stackoverflow.com/q/26198512
has body: With event delegation, the only thing to respect is that DOM elements on which the handlers were put must not be replaced. Therefore, you have to choose the closest possible container that will not be replaced. For example, if you are replacing or adding new &lt;tr&gt; or &lt;td&gt; tags, dont bind event handlers on those or the delegation will not work. Try this (I replaced delegate with on since delegate is deprecated now): $('.variations_grid').on('click', '.add', function(e) { //your logic });
score: 1
has comment: http://stackoverflow.com/comment/41082007
upvote count: 2

http://stackoverflow.com/comment/41199389
has text: or `var arr = [null].concat(data);` for prettiness
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26262193
type: Comment

http://stackoverflow.com/q/26274789
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26275391
type: UnansweredQuestion
has title: One page scroll wrong offset with floating menu bar
has body: I am having an issue. Im using a one page design for a friend with a fixed floating menu on the top. The problem I encounter is that when I click on a link it scrolls down but the offset is not right. Most the of time it scrolls down a little too much covering the content below the menu. What I am trying to achieve is that the scrolling stops at the div being exactly below my menu bar. The other issue is that somehow it wont scroll down when the space between two sections is too narrow. It tries but somehow only moves a few pixels then stops. I can imagine that both are related to the offset issue. Im sorry, english is not my native language. Here is what I got so far. A standard scrolling function with window.location.hash. The target are divs spread across the site. $(document).ready(function () { $('a[href^="#"]').on('click', function (e) { e.preventDefault(); var target = this.hash; var t = $(this.hash).offset().top; $('.wrapper').animate({ scrollTop: t, }, 1000, function () { window.location.hash = target; }); }); }); You can see an example of the problem live: http://rolfvohs.com/ What I tried so far was using the add.class function to bind the div with an extra padding when a link is clicked. It does work in a way but creates an awkward space. I also tried placing the divs at different locations but that does not fix the job either, just messes it up further. I would appreciate some insight.
type: Question

http://stackoverflow.com/comment/41356432
type: Comment
comment on: http://stackoverflow.com/a/26347630
has text: @msrd0, it wasn't really directed at you. Just information.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41079371
type: QuestionComment
comment on: http://stackoverflow.com/q/26197279
score: 0
type: Comment
has text: Could you give me an example with some code please?

http://stackoverflow.com/q/26307461
type: Question
tagged with: arrays
tagged with: javascript
score: 0
answer count: 1
has body: So I have been writing a script to play a video (or really text-based) poker game as an exercise in learning Javascript. I have everything working to play through an instance of the game once, but on trying to run it a second time, it develops an error: "Uncaught TypeError: object is not a function" This error comes up when trying to create a new hand. Here is the relevant code, I left a few functions out that don't seem to be causing any issues: //object constructor for card function card(suite, faceValue) { this.suite = suite, this.faceValue = faceValue } //object constructor for hand function hand(cards, handName, score, docHandName) { this.cards = cards, this.handName = handName, this.score = score, this.docHandName = docHandName } var deck = new Array; var buildDeck = function() { for (var i = 0; i &lt;= 52; i++) { if (i &lt; 13) { deck[i] = new card("Spades", i + 2); } else if (i &lt; 26) { deck[i] = new card("Clubs", i - 11); } else if (i &lt; 39) { deck[i] = new card("Hearts", i - 24); } else if (i &lt; 52) { deck[i] = new card("Diamonds", i - 37); } } } //pulls a card from location in deck specified by randomSpot() var pullCard = function(spot) { var newCard = deck[spot]; deck.splice(spot, 1); return newCard; } //takes away a card each time //passes into pullCard(spot) as spot var pullCount = 0; var randomSpot = function() { var x = Math.floor(Math.random() * (52 - pullCount)); pullCount++; return x; } var dealFiveCards = function() { var card1 = pullCard(randomSpot()); var card2 = pullCard(randomSpot()); var card3 = pullCard(randomSpot()); var card4 = pullCard(randomSpot()); var card5 = pullCard(randomSpot()); var fiveCards = [card1, card2, card3, card4, card5]; return fiveCards; } function createNewHand() { newHand = new hand(); newHand.cards = dealFiveCards(); return newHand; } var playOneGame = function() { buildDeck(); hand = createNewHand(); hand.cards.sort(compare); assignHandScore(); wager = prompt("How much do you bet?"); printHandValue(); dealAgai…
has answer: http://stackoverflow.com/a/26307597
type: AnsweredQuestion
tagged with: object
accepted answer: http://stackoverflow.com/a/26307597
has title: Javascript error: object is not a function in a video poker script

http://stackoverflow.com/q/26242090
downvote count: 0
tagged with: javascript
has title: Whateverorigin url incorrect when putting parameters in url
has comment: http://stackoverflow.com/comment/41162971
favorite count: 0
has comment: http://stackoverflow.com/comment/61528915
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41163097
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/41163361
upvote count: 2
has body: I am using Whateverorigin to get past the same-origin policy. I have made a request using $.getJSON(url, callback) and it worked fine. Now I want to send a request to an URL that includes parameters in the URL (e.g. api.domain.com/get?key=value ). I am using the method encodeURIComponent(url) but it seems the parameters don't get through the request. Am I doing something wrong?
has comment: http://stackoverflow.com/comment/41163630
type: Question
has comment: http://stackoverflow.com/comment/41164636
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41163002

http://stackoverflow.com/a/47722613
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26255248
has body: If you set the cells in the leftmost column to "position:relative" and then update style.left with the scroll position of the container it will do the trick. I've added the class "fixed-row" and some JS, there's also a fiddle below. var container = window.document.getElementById("container"); container.addEventListener("scroll", function(){ var rowHeader = window.document.getElementsByClassName("fixed-row"); for(var i=0; i&lt;rowHeader.length; i++) { rowHeader[i].style.left = (container.scrollLeft + "px"); } }, false); https://jsfiddle.net/jchaplin2/ftt64fxk/

http://stackoverflow.com/comment/41126870
type: AnswerComment
type: Comment
score: 1
has text: @Kaiido Good point. Of course if you are typing every key pressed is potentially the last word. Sounds like OP needs a full fledged parser.
comment on: http://stackoverflow.com/a/26220305

http://stackoverflow.com/q/26288088
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41247810
tagged with: filereader
has title: JavaScript FileReader empty
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/41247858
type: Question
has body: My english is not good, but I will try to explain the problem. I'm trying to load multiple images in an asp.net webforms application, but when I'm loading the files the first image doesn't load. Look at the following code: $('#loadImg').change(function () { for (var i = 0; i &lt;= this.files.length; i++) { if (this &amp;&amp; this.files[i]) { var reader = new FileReader(), valor; reader.readAsDataURL(this.files[i]); reader.onload = function () { valor = reader.result }; var obj = new Object(); obj.Objn = i; obj.Name = this.files[i].name; obj.Tipo = this.files[i].type; obj.Peso = this.files[i].size; obj.Obji = valor; var params = JSON.stringify(obj); if (IsValid(obj.Tipo)) { $.ajax({ type: "POST", url: uri1, data: params, contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { if (data.d) { $('#objimg').attr('src', obj.Obji); } }, async: false, error: function (XMLHttpRequest) { alert("Error al cargar la imagen"); } }); } } } function IsValid(iTipo) { switch (iTipo) { case 'image/png': case 'image/gif': case 'image/jpeg': case 'image/pjpeg': return true; break; default: return false; } }
tagged with: javascript
tagged with: jquery
tagged with: webforms
has comment: http://stackoverflow.com/comment/41250088
tagged with: asp.net

http://stackoverflow.com/comment/63152517
type: AnswerComment
has text: can you give me a small example?
comment on: http://stackoverflow.com/a/26318211
type: Comment
score: 0

http://stackoverflow.com/q/26302879
has comment: http://stackoverflow.com/comment/41274820
accepted answer: http://stackoverflow.com/a/26303258
has comment: http://stackoverflow.com/comment/41274783
answer count: 1
tagged with: javascript
has title: How can I make a simple table row with numbers using .appendChild?
has comment: http://stackoverflow.com/comment/41274868
favorite count: 0
has comment: http://stackoverflow.com/comment/41275268
has comment: http://stackoverflow.com/comment/41278378
has comment: http://stackoverflow.com/comment/41274997
has comment: http://stackoverflow.com/comment/41277492
has comment: http://stackoverflow.com/comment/41279582
upvote count: 2
has comment: http://stackoverflow.com/comment/41274914
has body: I'm a beginning programmer and I wondered if someone could help me. I want to get a table with a row and 7 numbers in table data & making the function react. I tried this but it doesn't work, and I've been looking for some time at it now: Begin The problem is it doesn't even alert. What can i do to make this work?
downvote count: 1
has comment: http://stackoverflow.com/comment/41282010
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41274754
tagged with: onclick
score: 1
tagged with: appendchild
has answer: http://stackoverflow.com/a/26303258
type: Question

http://stackoverflow.com/comment/41282876
has text: Thanks Serge insas for your answer. As only one child widget can be used inside popupPanel, I have to make another popupPanel without border for image and put that inside main popupPanel to make this work. This is the code I added: var popupPanelnew = app.createPopupPanel(); popupPanelnew.add(app.createImage("https://docs.google.com/uc?id=........").setStyleAttribute('width', '100px').setStyleAttribute('height', '100px')).setSize(60, 60).setPopupPosition(780,1700).setStyleAttribute('backgroundColor','#FFFFE0').setStyleAttribute('border', 'none'); Thanks
comment on: http://stackoverflow.com/a/26304277
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41301204
has text: Thanks, I'm using yeoman and it has ng-annotate, but I'm new to angular, and saw that way in examples, so it means that ng-annotate will automatically add dependencies before minification ?
type: AnswerComment
comment on: http://stackoverflow.com/a/26314829
score: 0
type: Comment

http://stackoverflow.com/comment/41214188
score: 0
type: AnswerComment
has text: I wouldn't consider this an attempt at an answer, but I won't downvote because I understand you don't have enough reputation to use the comments section instead...
comment on: http://stackoverflow.com/a/26270006
type: Comment

http://stackoverflow.com/comment/106119221
has text: now you spread in every iteration. It should be safe to mutate in reducer. ``` const result = arr.reduce( (accumulator, target) => { accumulator[target.key]: target.val; return accumulator }, {}); ```
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/48671992
type: Comment

http://stackoverflow.com/q/26330651
has answer: http://stackoverflow.com/a/26330911
has comment: http://stackoverflow.com/comment/41325549
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26350980
has title: Download file returned by js GET request with unique key
tagged with: casperjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26350980
has body: I'm new to CasperJS. Trying to download a cvs file from my bank. In a standard browser you would click an "Ok" button and then receive the download. The html for the button is: &lt;input type="button" id="dialogOk" class="yDialogOk" onclick="handleYes()" style="width:50px" value="OK"&gt; When that is clicked a function makes the following GET request: https://allmyaccounts.mybank.com/apps/export.obfbank.do?actionType=AllTransaction&amp;c=csit_key%3A5L6bKL6bJaHY4ISx9AMG6yZY%2BSg%3D&amp;l=u%3As The response to that request has the follow properties: Content-Disposition: Attachment; Filename="ExportData.csv" I don't know how to download that ExportData.csv. The methods I have found for downloading require you to have the target URL. The problem I see is that the URL I need to target requires the csit_key property that is dynamically generated. Once the current session is over the key stops working. I looked all over the page source and resources but cannot find a reference to csit_key(even by another name) before the button is clicked. It looks like I have to click that button to initiate the download. I believe that casper/phantom cannot download a file that it did not specifically request. Let me know if I'm wrong on that. I found the following which I hoped might capture the download if ran right after/before the click but it never fires. I never see those console.logs. casper.on('page.resource.received', function(resource) { if (resource.stage !== "end") { console.log("resource.stage !== 'end'"); return; } if (resource.url.indexOf('ExportData.csv') &gt; -1) { console.log("Downloading csv file"); this.download(resource.url, 'ExportData.csv'); } }); My next guess was to try and capture the generated GET after the click in order to extract the csit_key. I could only find how to view response headers, not request headers. I'm hoping someone can set me straight on how to download that csv file.
type: Question
possible better answer: http://stackoverflow.com/a/26330911
score: 0
answer count: 2

http://stackoverflow.com/q/26283980
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26284057
accepted answer: http://stackoverflow.com/a/26284057
tagged with: jquery
has title: Jquery .attr and .prop delete the attribute in Chrome
possible better answer: http://stackoverflow.com/a/26284039
has comment: http://stackoverflow.com/comment/41239636
favorite count: 0
tagged with: attr
has comment: http://stackoverflow.com/comment/41239607
tagged with: prop
score: 2
type: AnsweredQuestion
has body: Very odd bug where the following script completely deleted the Value attribute instead of leaving it alone if the replacement variable (in localStorage) is not found. My html: &lt;form&gt; &lt;input class="xfield" type="hidden" name="source" value="x111" /&gt; &lt;/form&gt; The JS &lt;script&gt; var thecode = localStorage.getItem("xcode"); if (thecode != "undefined" &amp;&amp; thecode != "null") { $(".xfield").attr("value",thecode); } &lt;/script&gt; Basically, if the xcode item is found in localStorage everything works great and the default value is replaced. However, if xcode is not found in localStorage, the result ( and only in Chrome it seems, Firefox works fine and leaves things in default ) is that the value attribute is completely erased. I have tried using .prop instead as well as wrapping it in $(window).load(function(){ but nothing works. Any idea what I may be doing wrong here?
downvote count: 0
has answer: http://stackoverflow.com/a/26284039
tagged with: google-chrome
type: Question
upvote count: 2

gulp-inject
tag name: gulp-inject
tags question: http://stackoverflow.com/q/26264190
type: Tag

http://stackoverflow.com/comment/41466656
type: Comment
comment on: http://stackoverflow.com/a/26341429
has text: @tnt-rox in my question I stated "How can I display the current location smoothly on the map without having to refresh the entire map ( unless necessary such as when the agent goes off the map and current location no longer exist on the map)". So the concern are 1) current location 2) refreshing it without flickering 3)moving the map itself if marker goes off the map. you picked specific example were both departure and destination are at the same time (and always ) in the map where no panning was needed!! nowhere you used current location, Please also run my code!!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41238192
type: Comment
comment on: http://stackoverflow.com/a/26270851
has text: Sorry I had an error in my previous comment about ng-bindHtml (ng-bindHtml will sanitize the html and will thus not really $compile anything), instead you can use a custom directive like the one described here: http://stackoverflow.com/questions/18063280/angularjs-inline-directives-with-ng-bind-html-unsafe Here's a modified Plunker that inserts compiled markup into the DOM with a dynamic attribute that is a directive. (ng-click) http://plnkr.co/edit/WQScvFqdbeYdNE9ROR7X?p=preview
score: 0
type: AnswerComment

http://stackoverflow.com/q/26261611
tagged with: canvas
answer count: 1
tagged with: javascript
has body: You will need an updated browser to view this page! I am just tinkering a bit with canvas trying to get a feel for how it works. However, the tutorial video I am watching shows the coding for the c.fillRect and the c.fillStyle in the exact same format that i have shown in my code yet my screen only displays the black rectangle from the first set of instructions.
score: 0
has answer: http://stackoverflow.com/a/26261706
has title: HTML Canvas not displaying my rectangles
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26261706
type: Question

http://stackoverflow.com/q/26315486
tagged with: gruntjs
answer count: 2
has title: Grunt : watch multiple files (js,css and gsp) within different sub folders
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26315540
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: grunt-contrib-watch
type: Question
accepted answer: http://stackoverflow.com/a/26315540
has body: I am using grunt/watch for the first time: My Gruntfile.js is configured as follows: module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), watch: { all: { options: { livereload: true }, files: ['**/*.gsp,**/.css'] } } }); // Load the plugin that provides the "uglify" task. grunt.loadNpmTasks('grunt-contrib-watch'); }; The problem i am facing is when i run the watch task to check only css or gsp file type like files: ['**/.css'] or files: ['**/.gsp'] it works fine and detects changes in the files but when i try to watch them both files: ['**/*.gsp,**/.css'], it doesn't detect any changes (keeps showing waiting on the command line). How to make it work so that it detects the changes in both the file types .? At the end of the day i want to do this ( image) : Any insight will be helpful..Thanks in advance!
possible better answer: http://stackoverflow.com/a/26315874
tagged with: javascript
has answer: http://stackoverflow.com/a/26315874

contenteditable
tags question: http://stackoverflow.com/q/26339719
type: Tag
tags question: http://stackoverflow.com/q/26239035
tags question: http://stackoverflow.com/q/26338165
tag name: contenteditable
tags question: http://stackoverflow.com/q/26353478

http://stackoverflow.com/comment/41120258
score: 0
type: QuestionComment
has text: @wrongAnswer I understand, but the OP seems to have trouble explaining his issue in english
type: Comment
comment on: http://stackoverflow.com/q/26219359

http://stackoverflow.com/a/26244976
has body: Try my touch gesture abstraction library, DeepTissue. IE's touch model is extremely simply because the pointer events abstract all the input modalities into a common API. Chrome is making things complicated, but that is another story :). You really do not want to hook into all the events. I get that it would be confusing. That is why I wrote Deeptissue. It keeps you from having to write all the plumbing code and it chooses the best option and hooks into that event set.
type: Answer
has comment: http://stackoverflow.com/comment/41274697
answers question: http://stackoverflow.com/q/26218146
score: 0

http://stackoverflow.com/comment/41292263
comment on: http://stackoverflow.com/a/26312632
score: 0
type: Comment
has text: what am i goind to add if i add another lightboxes? and to your codes am i only gonna edit close?
type: AnswerComment

http://stackoverflow.com/comment/41165127
type: AnswerComment
comment on: http://stackoverflow.com/a/26242965
score: 0
has text: in console not sended your data?
type: Comment

http://stackoverflow.com/comment/41263022
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26296924
has text: You could use pure css: http://stackoverflow.com/a/13354689/3269816

http://stackoverflow.com/comment/41091496
comment on: http://stackoverflow.com/q/26204120
has text: In the click event , look at the event object, it contains the target element.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26218472
accepted answer: http://stackoverflow.com/a/26218723
favorite count: 0
has title: dynamically changing CSS Using jQuery on $(document).ready
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: i have a template with the page header which margin changes depending on the page i'm in. my template is something like: &lt;div class="header"&gt; Title - Menu &lt;/div&gt; that header is equal in every single page, except the margin-bottom i have this jQuery code which works right with one problem (this is in-line code at the top of the each page) : $(function () { $(".header").css("margin-bottom","0px"); }); or $(function () { $(".header").css("margin-bottom","30px"); }); the problem is i see the page with margin of the template, and then it changes the margin dynamically. it looks bad, at refresh it have a blank space between header and body and then disappears 1 second later.
answer count: 4
has comment: http://stackoverflow.com/comment/41118893
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/41118480
has answer: http://stackoverflow.com/a/26218649
type: Question
has answer: http://stackoverflow.com/a/26218723
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26218649
has answer: http://stackoverflow.com/a/26218626
score: -3
has comment: http://stackoverflow.com/comment/41124995
upvote count: 0
has answer: http://stackoverflow.com/a/54646734
has comment: http://stackoverflow.com/comment/41124796
tagged with: jquery

http://stackoverflow.com/a/26258948
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/26258089
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41193053
has body: 1 An interesting option: This is not a serious answer, and is based on Darin Morris' highly destructive answer but is slightly less destructive: // Clone the element var $clone = $("#outside").clone(); // Remove all the children (leaves text nodes) $clone.children().remove(); alert($clone.text()); http://jsfiddle.net/TrueBlueAussie/ez4v83v5/4/ Again I would not recommend this as an alternative to say 2 My serious answer: $('#outside')[0].firstChild.nodeValue but who knows... This technique may come in handy for someone at some point :)

http://stackoverflow.com/a/52823509
answers question: http://stackoverflow.com/q/26201414
type: Answer
has body: If you still want to use Moment to get the "In X days" or "X days ago" you can use moment.from(date) instead of moment.fromNow() and just remove all notion of times. https://momentjs.com/docs/#/displaying/from/ var today = new Date(); today.setHours(0, 0, 0, 0); dateToCheck.setHours(0, 0, 0, 0) moment(dateToCheck).from(today); or a one-liner moment(dateToCheck.setHours(0, 0, 0, 0)).from(new Date().setHours(0, 0, 0, 0));
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/26213834
type: AnsweredQuestion
has title: Toggleclass button not working?
tagged with: toggle
has answer: http://stackoverflow.com/a/26213984
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41109736
tagged with: javascript
tagged with: jquery
score: 0
tagged with: toggleclass
possible better answer: http://stackoverflow.com/a/26213984
has body: Why can i not toggle the box with the button? I want it to do what it currently does but also toggle the box too? here is my fiddle my code: $(function timelinetiles() { $('.timelineTile').click(function (evt) { evt.stopPropagation(); $('.selected').children().not(this).removeClass('clicked'); $(this).toggleClass('clicked'); }); }); $(function timelinetiles() { $('.button').click(function (e) { e.stopPropagation(); $('.timelineTile').not(this).removeClass('clicked'); $(this).siblings('.timelineTile').toggleClass('clicked'); }); }); $(document).click(function () { $('.timelineTile').removeClass('clicked'); });
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26213910
accepted answer: http://stackoverflow.com/a/26213910

http://stackoverflow.com/a/35363844
has body: Twitter button always appears in localhost or even if u create a normal html file and embed the code and run it locally. However there are 3 scenarios and that goes for almost all the social buttons. 1) Make sure that you test it on a running web server. 2) Check on other browsers before concluding the inefficiency of your code. 3)Secondly code for 'Twitter' button should be in the index file rather than any other partials. It will certainly work and that goes for almost all the other social buttons.
type: Answer
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/26195499
upvote count: 0

http://stackoverflow.com/q/26226197
possible better answer: http://stackoverflow.com/a/26226250
has answer: http://stackoverflow.com/a/26226249
has title: Create sequencial HTML numbers in javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26226656
has body: Need to create a html number for every four items generated. the items are created by the backend not have a specific amount item1 - pagination 1 item2 - pagination 1 item3 - pagination 1 item4 - pagination 1 item5 - pagination 2 item6 - pagination 2 item7 - pagination 2 item8 - pagination 2 item9 - pagination 3 item10 - pagination 3 item11 - pagination 3 item12 - pagination 3 // this html need generated by javascript 1 2 3
type: Question
has comment: http://stackoverflow.com/comment/41133504
accepted answer: http://stackoverflow.com/a/26226249
tagged with: javascript
has answer: http://stackoverflow.com/a/26226250
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41133544
tagged with: jquery

http://stackoverflow.com/comment/41181587
score: 2
comment on: http://stackoverflow.com/q/26252366
type: Comment
type: QuestionComment
has text: for that you have to resolve the error :)

http://stackoverflow.com/a/26241583
has body: Well, you can do this var arr = document.querySelectorAll('img[^=http://www.domain.com]'); for (var i = 0; i &lt; arr.length; i++) { arr[i].src = arr[i].src.replace(/^http(s)?:\/\/[^\/]+/, ""); }
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41204241
has comment: http://stackoverflow.com/comment/41162061
answers question: http://stackoverflow.com/q/26241526
has comment: http://stackoverflow.com/comment/41197663
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41203895
accepted answer of: http://stackoverflow.com/q/26241526
type: Answer
has comment: http://stackoverflow.com/comment/41162162

http://stackoverflow.com/q/26316291
tagged with: javascript
has title: JavaScript Promise.all code does not work as expected
downvote count: 0
favorite count: 0
tagged with: promise
possible better answer: http://stackoverflow.com/a/26316399
duplicate of: http://stackoverflow.com/q/34813147
upvote count: 2
tagged with: dictionary
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26316401
accepted answer: http://stackoverflow.com/a/26316401
has comment: http://stackoverflow.com/comment/132783633
linked to: http://stackoverflow.com/q/34813147
type: Question
has answer: http://stackoverflow.com/a/26316399
has body: I have the following code fetching information from a mySQL DB. The DB includes several tables, among them an Activity table, having a channelId field, a Channel table having a userId field, and a User table having a userName field. The function getAllProjectACtivities(user,project) returns a promise of an array of Activity objects, each including all Activity table fields. The function findChannel(channelId) returns a promise of a single Channel object, including all Channel table fields. The function findUser(userId) returns a promise of a single User object, including all User table fields. All 3 functions hide a JSON Ajax request to the DB, and have been tested to work properly standalone. What I'm trying to do here is get a list of activities, for each of them get the channel, for each of the channels get the user. Then I build a table of activites comprising of 2 activity fields and one user field. For this I need a 3 phase DB access yielding arrays of objects. Below is the code: $(document).ready(function(){ var projNum=1; var userNum=1; var globalActivityList; //this global array will store data from the beginning of the promise chain to be used at the end of the chain $('#tableContainer').append(' '); var table = $('#tableContainer').children(); //here goes: getUserProjectActivities(userNum,projNum) .then(function (activityList){ table.append(" Number Description Employee "); globalActivityList=activityList; return Promise.all(activityList.map(function(activity){ //alert(activity.activityChannelId);//******** shows the right stuff findChannel(activity.activityChannelId); })); }) .then(function (channelList){ alert (channelList.length);//******* gives the right size alert (channelList);//******** u-oh, this shows ,,,,,,,,,,,, - the array is empty.<<<<<<<<<<<<<<<Problem return Promise.all(channelList.map(function(channel){ findUser(channel.channelEmployeeId); })); }) .then(function(userList){ for (var i=0; i<userList.length; i++){ var tableString=" "; tableSt…
answer count: 2
tagged with: arrays

http://stackoverflow.com/q/26265710
score: 0
has body: I have a D3 BubbleChart where I am trying to get the exit selection of the text in the bubbles to delay removal with the following code; but the delay seems to have no effect... The visualization form the below code behaves identical to it with the delay( 1 ) removed; changing the time parameter to delay anything else does not change the behavior either. All other transitions in my Bubblechart work as expected. Any ideas how I could get the delay working? Thanks! // ... Exit data [from existing g elements], transitioning to 0-radius gDataJoin.exit().selectAll( "text" ).transition().delay( 1 ).remove(); gDataJoin.exit().selectAll( "circle" ).transition().duration( transitionTime ).attr( "r", 0 ); gDataJoin.exit().transition().delay( transitionTime ).remove();
answer count: 1
accepted answer: http://stackoverflow.com/a/26266827
tagged with: d3.js
has title: D3.js exit transition: delay has no effectD3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41207957
has answer: http://stackoverflow.com/a/26266827
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41236080
type: Comment
score: 0
type: AnswerComment
has text: This is not working. The parenthesis are missing of Math.random
comment on: http://stackoverflow.com/a/26282157

http://stackoverflow.com/comment/41191953
type: Comment
has text: @TrueBlueAussie I really don't see much difference.. except that using `.prop()` will need to run some jQuery code again
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26258281

http://stackoverflow.com/comment/41314616
type: QuestionComment
score: 1
type: Comment
has text: css height doesn't require special position
comment on: http://stackoverflow.com/q/26325039

http://stackoverflow.com/comment/41163322
type: Comment
type: QuestionComment
has text: You need to load both jQuery and then call `noConflict` and your `$stef` variable will be the second jQuery that you loaded.
score: 1
comment on: http://stackoverflow.com/q/26242004

http://stackoverflow.com/comment/41099770
score: 0
type: Comment
has text: Thank you, I can't believe I over looked that!
type: AnswerComment
comment on: http://stackoverflow.com/a/26208437

http://stackoverflow.com/comment/41319444
type: QuestionComment
comment on: http://stackoverflow.com/q/26289506
has text: @VitorinoFernandes correct
score: 0
type: Comment

http://stackoverflow.com/q/26310946
has body: I am editing some jQuery that another person has written. Inside the $(document).ready(function() they have a bit of code as follows: $(document).on('submit', ".editForm", function(e) { $.post( $(this).attr("action"), $(this).serialize(), function() { successMsg("Sorted.") }) e.preventDefault(); }); What i need to do is be able to access that serialized data on another click event. How would i go about this?
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26310959
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26310959
score: 1
has title: jQuery - Access serialized data elsewhere
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26342512
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41347537
has comment: http://stackoverflow.com/comment/41347072
score: 1
has comment: http://stackoverflow.com/comment/41347015
has answer: http://stackoverflow.com/a/26346697
accepted answer: http://stackoverflow.com/a/26346697
upvote count: 1
has body: I have a two dimensional JS array in which some rows are useless and needs to be deleted; In particular I need to delete the rows that are embedded in other rows (by saying that row B is embedded in row A I mean not just that A is a superset of B, but that A contains all the elements in B, in sequence and in the same order) EX. I have: var matrix = [ ["User","Shop","Offer","Product","File"], ["User","Shop","File"], ["User","Shop","Map"], ["User","Shop","Promotion"], ["User","Shop","Offer","Product","Reservation"], ["User","Group","Accesslevel"], ["User","Group"], ["User","Reservation"], ["User","Shop"], ["User","Shop","Offer","Product","Markers"] ]; In this example the second row (["User","Shop","File"]) should NOT be deleted (all its elements are in the first row, but not consecutive); Row 7 (["User","Group"]) should be deleted because is embedded in the 6th (["User","Group","Accesslevel"]) and also row 9 (["User","Shop"]) because is embedded in many others.. I'm looking for a possible efficient algorithm to check if an array is embedded in another one; I will use this in nodejs.
type: Question
has answer: http://stackoverflow.com/a/26343645
has comment: http://stackoverflow.com/comment/41347157
has comment: http://stackoverflow.com/comment/41347055
has comment: http://stackoverflow.com/comment/41347453
tagged with: javascript
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41347498
favorite count: 0
has comment: http://stackoverflow.com/comment/41347435
possible better answer: http://stackoverflow.com/a/26343645
has comment: http://stackoverflow.com/comment/41347539
has comment: http://stackoverflow.com/comment/41347308
has comment: http://stackoverflow.com/comment/41347062
has title: JS check if an array is embedded in another array
tagged with: node.js

http://stackoverflow.com/comment/41119676
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26219073
type: Comment
has text: If `undefined` is cared about - you can always do `if (item.status)`

http://stackoverflow.com/q/26298766
favorite count: 0
has body: Every time I change the path through a link like the following Home The controller for the view in the router definition gets run again. config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { // $locationProvider.hashPrefix('!'); $routeProvider.when('/home', { templateUrl: 'partials/home.html', controller: 'mainCtrl' }); $routeProvider.when('/test', { templateUrl: 'partials/test.html', controller: 'testCtrl' }); $routeProvider.otherwise({ redirectTo: '/home' }); } ]); I don't think that this is default behavior (I found no mention of it in the documentation), however I can't see what the problem is. P.S. I don't have an ng-controller assigned to any DOM element in my templates since I've seen someone else with a similar issue where this was the problem.
has answer: http://stackoverflow.com/a/26298972
type: Question
tagged with: angularjs
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26298972
has title: AngularJS controller is executed every time the view is routed
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
linked to: http://stackoverflow.com/q/21401822

http://stackoverflow.com/comment/41349052
has text: no, unfortunately i can't use hashes on my environment
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26342221

http://stackoverflow.com/comment/101921696
type: Comment
comment on: http://stackoverflow.com/a/53220241
type: AnswerComment
has text: One more thing, `panel.style.width` might not be a number (could be `''` for example), so you should check for that and fallback to `getComputedStyle` as above. The first time the `resize` function is called, it will fall back to `getComputedStyle`, but all other times, it'll use `panel.style.width`.
score: 0

http://stackoverflow.com/comment/60201342
has text: *Australian Alex* hehe
type: Comment
comment on: http://stackoverflow.com/a/28427561
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41276051
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26303597
has text: Have you seen this question yet? http://stackoverflow.com/questions/14748440/angular-js-using-ng-options-to-only-display-unique-values Basically you can download a plugin that will do all of the work of getting the unique items in your data..

http://stackoverflow.com/comment/41175737
score: 0
type: Comment
has text: @SalimKhan kindly check my updated ans if this help kindly upvote and accept if didnot then ping me back ;)
comment on: http://stackoverflow.com/a/26248368
type: AnswerComment

http://stackoverflow.com/q/26333522
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41342593
tagged with: ajax
has title: Bootstrap Modal AJAX Call Not Displaying
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41339402
has comment: http://stackoverflow.com/comment/41330556
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26333934
type: Question
has body: I'm trying to show a modal dialog on a list of search results that are displayed in a table. When the user clicks the button to show the dialog I need to pass a value from the PHP code to the modal dialog so it can retrieve data about the record they have clicked on which will then appear in the modal dialog. Here's the HTML for the table of results: &lt;tr&gt; &lt;td&gt;&lt;button class="btn btn-default" recid="33926" onclick="showModal(33926)"&gt;Review&lt;/button&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Pending&lt;/td&gt;&lt;td&gt;001&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;button class="btn btn-default" recid="33951" onclick="showModal(33951)"&gt;Review&lt;/button&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Pending&lt;/td&gt;&lt;td&gt;002&lt;/td&gt; &lt;/tr&gt; Here's the Javascript that gets called when the Review button is clicked: &lt;script type="text/javascript"&gt; function showModal(recid) { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("myModal").innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST","modalInc.php",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("recid="+recid); return false; // Do not follow hyperlink } &lt;/script&gt; and here's the html for the modal dialog that should appear with the dynamic content: &lt;div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&g…
tagged with: javascript

http://stackoverflow.com/q/26336961
has title: Collapse a combobox on clicking into different frame/iframe/frameset in extjs
tagged with: extjs
score: 0
linked to: http://stackoverflow.com/q/18044153
tagged with: frame
has comment: http://stackoverflow.com/comment/41338192
tagged with: combobox
type: UnansweredQuestion
tagged with: iframe
has body: I have a webpage consisting of several groups of framesets, frames and iframes used one inside other. The rough design of the page is as follows: Note that each frame here contains some more framesets/frames/iframes inside it. I have a combobox (extjs 4.2) in frame 3 which gets collapsed (if already expanded) if I click anywhere in frame 3. However if I click on frame 1 / frame 2 or any part of webpage other than frame 3, it doesn't call 'onblur' listener of combobox. I tried to attach combobox.collpase() function to onblur event of frame3, but no success. Here is my code (partial): field = { xtype: 'combobox', store: list2, forceSelection: true, pickerAlign: 'tr-br?', listeners: { 'focus': function ( combo ) { combo.expand(); }, 'blur': function ( combo ) { combo.collapse(); }, }, collapseComboBox: function(){ alert('1'); // alert is put for testing purpose }, ...... }; // this._window gives frame 3 this._window.attachEvent('onblur', field.collapseComboBox); At the end, I want the combobox to be collapsed after losing it's focus and clicking anythere on webpage. Can someone please suggest me the right way?
answer count: 0
has comment: http://stackoverflow.com/comment/41373671
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41337237

http://stackoverflow.com/comment/41327235
type: Comment
score: 0
type: QuestionComment
has text: @ProllyGeek when I try to do that, for example setting a var to true in the success callback, it says the var is undefined and loads it again.
comment on: http://stackoverflow.com/q/26331600

http://stackoverflow.com/comment/41400431
comment on: http://stackoverflow.com/a/26328356
score: 0
type: AnswerComment
has text: It may be related to when the extension's script is injected. Though the Chrome default seems to be after document ready and before/slightly after window load: [docs for chrome](https://developer.chrome.com/extensions/content_scripts). The [debugger](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) keyword may help you track/understand what is going on after you've dispatched the event. When all else fails chucking console logs everywhere to see what is/isn't being fired can help.
type: Comment

http://stackoverflow.com/a/26232805
type: Answer
has comment: http://stackoverflow.com/comment/41148112
answers question: http://stackoverflow.com/q/26232709
score: 0
has body: touchpunch requires jquery ui plugin. Verify if you included jquery UI in your page.

http://stackoverflow.com/a/39422662
downvote count: 1
has comment: http://stackoverflow.com/comment/112780444
upvote count: 28
answers question: http://stackoverflow.com/q/26203725
has body: For anyone else that may still be looking for this answer. I put together a simple proxy bypass which achieves this without much hassle and the config goes into the webpack.config.js I am sure there are much more elegant ways to test for local content using regex, but this works for my needs. devServer: { proxy: { '/**': { //catch all requests target: '/index.html', //default target secure: false, bypass: function(req, res, opt){ //your custom code to check for any exceptions //console.log('bypass check', {req: req, res:res, opt: opt}); if(req.path.indexOf('/img/') !== -1 || req.path.indexOf('/public/') !== -1){ return '/' } if (req.headers.accept.indexOf('html') !== -1) { return '/index.html'; } } } } }
score: 27
type: Answer

http://stackoverflow.com/comment/41294607
type: QuestionComment
comment on: http://stackoverflow.com/q/26314174
score: 0
has text: I see. I don't think there's a template or project type that will have just front-end stuff as a standard. Maybe have a look for online templates?
type: Comment

http://stackoverflow.com/q/26309513
has answer: http://stackoverflow.com/a/28004895
tagged with: javascript
score: 4
tagged with: webstorm
favorite count: 0
has comment: http://stackoverflow.com/comment/41302050
answer count: 3
upvote count: 4
has comment: http://stackoverflow.com/comment/41302137
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41302301
tagged with: google-chrome
has title: Debugging JavaScript Angular application in WebStorm using Google Chrome
has body: I'm trying to debug some controller code in an Angular application in WebStorm using Google Chrome. My Debug Settings : When running theses Debug settings : 1) Chorme flickers in the Taskbar as if it is trying to connect. 2) I don't see the Debugging Tab (Indication) usually shown at the top of the page (like a brownish header) 3) In WebStorm's Debugger window i get the following message "cannot connect , ensure that Web Inspector is closed " Additionally I was able to debug my code using Chrome development tools. Any idea what is interfering the Webstorm's Debugger from connecting to Chrome ?
has comment: http://stackoverflow.com/comment/57368213
has comment: http://stackoverflow.com/comment/41302177
has comment: http://stackoverflow.com/comment/57359598
has comment: http://stackoverflow.com/comment/41301881
has comment: http://stackoverflow.com/comment/41302735
type: Question
tagged with: debugging
has answer: http://stackoverflow.com/a/29555689
downvote count: 0
has answer: http://stackoverflow.com/a/37805534

http://stackoverflow.com/comment/41168510
comment on: http://stackoverflow.com/q/26244876
score: 2
type: Comment
type: QuestionComment
has text: The title of this question makes my head hurt.

http://stackoverflow.com/q/26225842
has body: I have a java script that calculates percentage of discount offered. Right now, I am flooring the percentage value jQuery(document).ready(function() { for( i = 0; i &lt; prices_monthly.length; i++ ) { if( prices_monthly[i] != "N/A" ) { var annualNum = prices_annual[i].replace(',',''); annual_savings_perc[i] = Math.floor( ( ((12*prices_monthly[i])-annualNum)/ (12*prices_monthly[i]) )*100); } } }); I want to enhance this by adding some logic. My needs are this If the first 2 decimal points are >97 ( i.e 19.98, 20.99 etc) I want to use ceil (or round function) to round it off next integer. If not, I want to use floor function. I am not sure how I can get the first 2 decimal points ( 98 in case of 19.98 and 99 in case of 20.99). If I can get that in a variable, I can apply if condition. Or is there a simpler way to do this. Any help is much appreciated.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26225912
accepted answer: http://stackoverflow.com/a/26225912
type: Question
has title: extracting decimal points from a float number
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26247970
type: Answer
has comment: http://stackoverflow.com/comment/41176917
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26247571
score: 0
has comment: http://stackoverflow.com/comment/41174452
has comment: http://stackoverflow.com/comment/41174639
has body: A Javascript object would work. var players = []; players[0] = {"name":"Bob", "age":1}; players[1] = {"name":"John", "age":4}; for (var i in players) { if (players[i].name == "Bob") { alert("Bob is " + players[i].age); } } EDIT: var players = []; players[0] = {"name":"Bob", "age":1}; players[1] = {"name":"John", "age":4}; players.forEach(function(player){ if (player.name == "Bob") { alert("Bob is " + player.age); } });
has comment: http://stackoverflow.com/comment/41174850

http://stackoverflow.com/q/26227249
tagged with: javascript
has answer: http://stackoverflow.com/a/26229012
accepted answer: http://stackoverflow.com/a/26229012
score: 0
answer count: 1
has body: Having trouble wrapping my head around something in Angular. I have a page where I list blog posts (or will, anyway). The posts are stored within a database. Angular gets them from a php script. That's all fine and dandy, but these blogs will understandably have tags (a, img, etc.) embedded in them. Angular doesn't seem to like that. After searching around here I found an answer two the error produced when my blog posts had newline characters in them (the horror). (white-space: pre-wrap). I'm finding no such love with an embedded tag. Also, having a double quotation mark in a message results in the page not being rendered and an error in the console. I'm sure this has been asked many times, but the search is only yielding me false positives. :( EDIT: plunker or jsfiddle will require me to change the model a bit. Let me try this. Here's the actual code. {{ item.message }} You can see the output in action here: http://onfilm.us/about.html The troubling part would be in this snippit. taken from Erick Kim's informative website ... It shows up as string literal w/ the code above... not a link. You can see the whole data it's reading in here if you want: http://onfilm.us/about.php
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41135619
has title: Thinking in AngularJS: characters/tags embedded within text getting mangled
has comment: http://stackoverflow.com/comment/41136758
type: Question

http://stackoverflow.com/comment/41168917
has text: Gotcha, try using the [`localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) function: `x.listOf.sort(function(a, b) { return a.fname.toLowerCase().localeCompare(b.fname.toLowerCase()); });`
type: Comment
comment on: http://stackoverflow.com/a/26243943
score: 0
type: AnswerComment

http://stackoverflow.com/q/26276952
upvote count: 15
has body: Application work fine on localhost .but when its connect to server it getting error. I connect server through port 22 This is the error Error: listen EADDRNOTAVAIL Error: listen EADDRNOTAVAIL at errnoException (net.js:904:11) at Server._listen2 (net.js:1023:19) at listen (net.js:1064:10) at net.js:1146:9 at dns.js:72:18 at process._tickCallback (node.js:419:13) at Function.Module.runMain (module.js:499:11) at startup (node.js:119:16) at node.js:906:3 Any Help !!! -update- i run netstat -tulpn | grep 22 Result: tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 683/sshd tcp6 0 0 :::22 :::* LISTEN 683/sshd but i run netstat -tulpn | grep 80 Nothing Display. Any Help.is this server fault? running netstat -nlt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:5901 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:5902 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:631 :::* LISTEN Running netstat -anp | grep :80 tcp 1 0 162.243.145.226:60728 91.189.94.25:80 CLOSE_WAIT 1726/ubuntu-geoip-p tcp 1 0 162.243.145.226:47842 74.125.239.148:80 CLOSE_WAIT 8104/epiphany-brows tcp 1 0 162.243.145.226:60727 91.189.94.25:80 CLOSE_WAIT 1417/ubuntu-geoip-p tcp 1 0 162.243.145.226:58818 198.41.30.199:80 CLOSE_WAIT 8104/epiphany-brows
downvote count: 0
tagged with: websocket
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/45091162
has comment: http://stackoverflow.com/comment/41241164
accepted answer: http://stackoverflow.com/a/26286687
has comment: http://stackoverflow.com/comment/41254062
has answer: http://stackoverflow.com/a/26280306
linked to: http://stackoverflow.com/q/28573390
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/45091162
has answer: http://stackoverflow.com/a/26277194
has comment: http://stackoverflow.com/comment/41229323
type: Question
has title: Node.js websocket error "Error: listen EADDRNOTAVAIL Error: listen EADDRNOTAVAIL"
has answer: http://stackoverflow.com/a/60656435
tagged with: javascript
tagged with: total.js
has answer: http://stackoverflow.com/a/26286687
score: 15
tagged with: ubuntu-server

http://stackoverflow.com/q/26315308
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26315445
has comment: http://stackoverflow.com/comment/41296595
tagged with: javascript
has comment: http://stackoverflow.com/comment/41296832
has body: So: var obj = { 'key': function() { // get 'key' here } }; obj.key(); Example: http://plnkr.co/edit/tsUz6WY1qIvuoie3qSUv?p=preview var logger = { 'warn': function(msg) { var logLvl = 'warn'; // &lt;-- want to get the string 'warn' right here console.log('[', logLvl, ']', msg); } }; logger.warn('Computer is exploding.'); // =&gt; [ warn ] Computer is exploding. I can only think of the convoluted method of using a named function and searching this by the value of the function: http://plnkr.co/edit/IHu087timHZCA2EbjDUa?p=preview var logger = { 'warn': function func(msg) { console.log('[', _.invert(this)[func], ']', msg); } }; logger.warn('Computer is exploding.'); Is there an easy way to do this? UPDATE: So here's more detail on why I'm asking. This is an Angular application. Here's list of presets. A preset has a name and two numbers: https://github.com/Wideshanks/breatherBar/blob/rmUI/app.js#L372 These get rendered as list items on the front end: https://github.com/Wideshanks/breatherBar/blob/rmUI/index.html#L42 When someone clicks on the list item, I want to add a new default pattern to the list and set the name/two numbers to what's in the preset. The presets are functions which add new patterns. The two numbers are defined inside the function body, but the name of the preset is outside the function: it's the property name in $scope.presets: https://github.com/Wideshanks/breatherBar/blob/rmUI/app.js#L359 Probably just need to rethink the whole thing, because the way I did it has ended up convoluted.
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26315445
has comment: http://stackoverflow.com/comment/41296878
type: AnsweredQuestion
score: 1
has title: If a Javascript object has a property which holds a reference to a function, can I get that property name from within the function itself?

http://stackoverflow.com/q/26278141
accepted answer: http://stackoverflow.com/a/26278244
tagged with: datepicker
has title: Angular JS Custom Directive not Working
type: AnsweredQuestion
score: 0
type: Question
has body: I am trying to implement a directive in my app. Here is the following code. console.log("Directive loaded"); angular.module("MyApp") .directive("datepickerLocal", function($rootScope) { console.log("datepickerLocal"); return { restrict: 'E', require: 'ngModel', link: function(scope, elem, attr, ctrl) { ctrl.$parsers.unshift(function(viewValue) { var ngModelController = ctrls[0]; ngModelController.$parsers.push(function (viewValue) { viewValue.setMinutes(viewValue.getMinutes() - viewValue.getTimezoneOffset()); return viewValue.toISOString().substring(0, 10); }); }); } }; } ); And here is the HTML text field. &lt;input id="datepicker" type="text" data-ng-datepicker data-ng-options="datepickerOptions" ng-model="user.User.DateOfBirth" datepickerLocal&gt; I am able to see the first console message, but howeven the console message inside the directive is not appearing. Feedback will be much appreciated.
has answer: http://stackoverflow.com/a/26278244
tagged with: javascript
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/26272049
answers question: http://stackoverflow.com/q/26271996
downvote count: 0
score: 1
has body: Try this one. &lt;script&gt; $(document).ready(function(){ $('.correctAttempt').click(function(){ var id= $(this).parent().prev('.topicTD').find(".topicId").val(); alert(id); $('#correctOutOfAttempt').modal('show'); }); }); &lt;/script&gt;
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41280737
comment on: http://stackoverflow.com/q/26302307
type: QuestionComment
type: Comment
has text: Editing Mode can be form Editing, inline editing or cell editing.
score: 0

http://stackoverflow.com/q/26253787
linked to: http://stackoverflow.com/q/26038151
has title: jQuery Countdown Timer for Games
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41184200
has comment: http://stackoverflow.com/comment/41184466
type: Question
accepted answer: http://stackoverflow.com/a/26254006
has comment: http://stackoverflow.com/comment/41183919
score: -2
has body: I need a solid countdown timer for a queeze game, that is not very easy to hack. I tried to create my own timer, but I feel that is too fragile to hacking: var counter = 10; var timer = null; function countdown(){ if (counter == 10) { $(".time_box").html(counter); } if (counter &lt;= 0) { stopInterval(); } else { counter--; $(".time_box").html(counter); } } function reset() { clearInterval(timer); counter=0; } function startInterval() { $(".time_box").html(counter); timer= setInterval("countdown()", 1000); } function stopInterval() { clearInterval(timer); } Any ideas for security improvments?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41183996
has comment: http://stackoverflow.com/comment/41183929
has answer: http://stackoverflow.com/a/26254006
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/41184560
has comment: http://stackoverflow.com/comment/41183958
favorite count: 0
has comment: http://stackoverflow.com/comment/41183927
has comment: http://stackoverflow.com/comment/41184002
has comment: http://stackoverflow.com/comment/41184222

titanium
type: Tag
tag name: titanium
tags question: http://stackoverflow.com/q/26237170
tags question: http://stackoverflow.com/q/26274711
tags question: http://stackoverflow.com/q/26299864
tags question: http://stackoverflow.com/q/26199611
tags question: http://stackoverflow.com/q/26352968
tags question: http://stackoverflow.com/q/26295840
tags question: http://stackoverflow.com/q/26297423

http://stackoverflow.com/a/26312689
upvote count: 1
score: 1
downvote count: 0
has body: Edited you code and used appendTo() and set the offset jQuery(function() { jQuery(".component").draggable({ // use a helper-clone that is append to 'body' so is not 'contained' by a pane helper: function() { return jQuery(this).clone().appendTo('body').css({ 'zIndex': 5 }); }, cursor: 'move', containment: "document" }); jQuery('.ui-layout-center').droppable({ activeClass: 'ui-state-hover', accept: '.component', drop: function(event, ui) { var _this = jQuery(this); if (!ui.draggable.hasClass("dropped")) { var cloned = jQuery(ui.draggable).clone().addClass("dropped").draggable(); jQuery(cloned).appendTo(this).offset({ top : ui.offset.top, left: ui.offset.left }); } } }); });
answers question: http://stackoverflow.com/q/26312441
type: Answer

http://stackoverflow.com/comment/41271808
type: QuestionComment
comment on: http://stackoverflow.com/q/26301252
score: 0
has text: @user2422900 So this is the problem. It should be changed inside the loop, otherwise it will have no effect
type: Comment

http://stackoverflow.com/comment/41367427
comment on: http://stackoverflow.com/q/26353417
type: Comment
type: QuestionComment
score: 3
has text: Don't confuse JavaScript objects with JSON!

http://stackoverflow.com/a/26228256
answers question: http://stackoverflow.com/q/26228066
has comment: http://stackoverflow.com/comment/41138038
has comment: http://stackoverflow.com/comment/41138179
score: 0
type: Answer
has body: Something like this? $(function(){$('a','body').on('click',function(e){ e.preventDefault(); $(this).delay(1000).animate({marginTop:'200px'},1000); }) }); SEE Fiddle: http://jsfiddle.net/7hxv3kd4/2/

http://stackoverflow.com/comment/41394590
comment on: http://stackoverflow.com/a/26348733
score: 0
type: Comment
type: AnswerComment
has text: found your problem in syntax. You'll have another one after you fix that one. Edited my answer.

http://stackoverflow.com/a/26331789
has comment: http://stackoverflow.com/comment/83575292
score: 22
has comment: http://stackoverflow.com/comment/75666933
upvote count: 22
has comment: http://stackoverflow.com/comment/80101982
type: AcceptedAnswer
downvote count: 0
has body: First, you'll need to check if the script is already on the page: var list = document.getElementsByTagName('script'); var i = list.length, flag = false; while (i--) { if (list[i].src === 'filePathToJSScript') { flag = true; break; } } // if we didn't already find it on the page, add it if (!flag) { var tag = document.createElement('script'); tag.src = 'filePathToJSScript'; document.getElementsByTagName('body')[0].appendChild(tag); } The code in the conditional can be used to dynamically add scripts to the page. ES 6 Update ES 6 simplifies this quite a bit: let scripts = Array .from(document.querySelectorAll('script')) .map(scr =&gt; scr.src); if (!scripts.includes('filePathToJSScript')) { // same as above }
has comment: http://stackoverflow.com/comment/80121811
accepted answer of: http://stackoverflow.com/q/26331600
type: Answer
answers question: http://stackoverflow.com/q/26331600
has comment: http://stackoverflow.com/comment/80120919

http://stackoverflow.com/q/26275906
upvote count: 0
tagged with: javascript
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26276726
score: -2
tagged with: css
downvote count: 2
has body: we are students an also a music band. we are making our website and we want to put audio streaming in a other reproductor,we want to use html/css3. we talk with our teacher and he said that we have to use the api. we want to know how to put soundclouds music in another reproductor. Thanks for your time.
answer count: 1
has answer: http://stackoverflow.com/a/26276726
has title: Using soundcloud in an external reproductor
type: AnsweredQuestion

http://stackoverflow.com/comment/41207856
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26266515
has text: I don't think that this can be the answer for now. We are trying to discover if the library has documentation and event listeners for that job. I'm saying because those observers reduces performance and must the last option.

http://stackoverflow.com/comment/41097505
score: 0
type: AnswerComment
has text: it does not wait 6 seconds and gets executed immideately
type: Comment
comment on: http://stackoverflow.com/a/26207195

http://stackoverflow.com/comment/41239242
type: Comment
comment on: http://stackoverflow.com/a/26283788
type: AnswerComment
has text: Thank you. That was the issue. I'll accept the answer once I can.
score: 0

http://stackoverflow.com/q/26303253
score: -2
has answer: http://stackoverflow.com/a/26303454
type: Question
answer count: 2
has title: Passing a Variable from PHP to Javascript for Image file
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26303453
has body: I have a gallery of images. When a user clicks on an image, the page scrolls and displays the image along with a Title, Description, and a "Go to" button. All works great except passing a variable for the Go To button. I need to pass the user ID to the JS script. Here is the partial PHP code: <img src=<?php echo $image_finder?> height=<?php echo $img_height?> width=<?php echo $img_width?> class="superbox-img" data-img="<?php echo $image_finder?>" title="<?php echo $artist_name?>" alt="<?php echo $artist_about ?>" location="<?php echo $artist_id?>" > The PHP code is in a foreach loop. There may be a hundred images but I need to get the ID (in the location parameter) for the selected image. At the bottom of the PHP page, I include the JS file and the following call to the JS file and function. var pagefunction = function() { $('.superbox').SuperBox(); }; loadScript("js/plugin/superbox/superbox.min.js", pagefunction); In the JS file, I need to get the location parameter and pass into the HREF. I have marked where the variable need to go about 8 lines down after the main.php?location=(variable). Any help is appreciated. Thanks, Grant function(a) { a.fn.SuperBox = function() { var b = a(' '), c = a(' Image Title http://imagelink.com/thisimage.jpg Image description Go to Artist Delete '), d = a(' '); b.append(c).append(d); a(".superbox-imageinfo"); return this.each(function() { a(".superbox-list").click(function() { $this = a(this); var d = $this.find(".superbox-img"), e = d.data("img"), f = d.attr("alt") || "No description", g = e, h = d.attr("title") || "No Title"; l = d.attr("location") || "No Location"; c.attr("src", e), a(".superbox-list").removeClass("active"), $this.addClass("active"), c.find("em").text(g), c.find(">:first-child").text(h), c.find(".superbox-img-description").text(f), 0 == a(".superbox-current-img").css("opacity") && a(".superbox-current-img").animate({ opacity: 1 }), a(this).next().hasClass("superbox-show") ? (a(".superbox-list").removeClass("activ…
tagged with: php
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41286294

http://stackoverflow.com/comment/41097419
type: Comment
has text: Awesome man thanks. One more thing Im trying to add a button to mark certain items important. I tried modifying things but can seem to get it going. Here's the fiddle http://jsfiddle.net/w2q4vkh3/1/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26206134

http://stackoverflow.com/q/26348038
accepted answer: http://stackoverflow.com/a/52522956
has comment: http://stackoverflow.com/comment/58092999
answer count: 2
has comment: http://stackoverflow.com/comment/56082458
tagged with: html5-canvas
downvote count: 0
has comment: http://stackoverflow.com/comment/58258376
favorite count: 0
has answer: http://stackoverflow.com/a/56405549
has title: SVG ForeignObjects draw over all other elements in Chrome
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/52522956
possible better answer: http://stackoverflow.com/a/56405549
score: 7
has body: Update 22 April, 2016: Nothing new, I just decided to check up on this, and post a quick code update. Firefox still performs as expected, IE doesn't perform at all, and Chrome 50.0.2661.87 m still behaves the same as it did last year. The fiddle link and code below have been updated to reflect the latest working version (in Firefox). Background: I'm playing with rendering a canvas + HTML elements to PNG. Of course, this means creating an interim SVG which hosts the HTML as a foreignObject. The whole thing is a layer-cake of elements. I have a background, a layer of elements, the canvas, and another layer of elements. You can see what it looks like in the snippet below. I could have approached this in two ways: Write everything, including the image, to a single SVG, which will be rendered to a canvas. Write two SVGs, one for the background and the items behind the image, and another for the items in front of the image, then draw the back SVG, then the image, then the front SVG to the target canvas. I chose option 1 because it seemed straightforward and simple. The problem: SVG draw order is supposed to follow the DOM order, but in the case of Chrome (38 & Canary), it acts like it's rendering the foreignObjects after it renders the native objects, completely covering the native objects. (The code works as expected in Firefox, and fails miserably in IE11.) So who is correct? Is this a bug in Chrome, Firefox, or are neither of them handling this properly? Or is there some user error that I missed? Thanks! function putAnImageInTheCanvas() { var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); var svgNS = svg.namespaceURI; svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); svg.setAttribute('height', '310'); svg.setAttribute('width', '310'); svg.setAttribute('version', '1.1'); var svgRect = document.createElementNS(svgNS, 'rect'); svgRect.setAttribute('x', '125'); svgRect.setAttribut…
upvote count: 7
tagged with: google-chrome
type: Question
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/a/26346697
score: 1
has comment: http://stackoverflow.com/comment/41367405
has comment: http://stackoverflow.com/comment/41367012
accepted answer of: http://stackoverflow.com/q/26342512
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26342512
type: Answer
has body: This should do the trick. // Is row2 "embedded" in row1? function embedded(row1, row2) { return row2.length &lt; row1.length &amp;&amp; row2.every(function(elt, i) { return elt === row1[i]; }); } //filter out rows in matrix which are "embedded" in other rows matrix.filter(function(row) { return !matrix.some(function(row2) { return embedded(row2, row); }); });
downvote count: 0

http://stackoverflow.com/q/26274718
tagged with: javascript
has comment: http://stackoverflow.com/comment/41569339
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41225497
upvote count: 2
has title: How to handle the huge data(>10 million) in sapui5 oTable?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41275077
has comment: http://stackoverflow.com/comment/41229603
has body: I am using sap ui5 oTable for showing the huge data from hana db. While loading the huge data, the browser is going to crash.So I am fetching 100 records from db and showing the 20 records per page.So we can have 5 pagination(5*20=100) with one manual next button. If I click next manual button, I should get next 100 records and pagination should be 6,7,8,9,10.but i could not change the pagination no. How to change the default pagination number in oTable? How to achieve lazy loading concept in oTable? Normally how to achieve the huge data handling in oTable?
has answer: http://stackoverflow.com/a/26302359
has comment: http://stackoverflow.com/comment/41226374
score: 1
tagged with: sapui5
downvote count: 1
type: Question
tagged with: pagination

http://stackoverflow.com/q/26212391
has answer: http://stackoverflow.com/a/26212486
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26212509
tagged with: http://stackoverflow.com/tag/html
has body: I was reading the thread prevent redirection on submit to form, and I have a question. Is possible have a HTML form like: &lt;html&gt; &lt;head&gt;...&lt;/head&gt; &lt;body&gt; &lt;form method="POST" action="/SaveDate" &lt;!-- some other properties --&gt; &gt; &lt;input type="text" name="username" /&gt; &lt;input type="upload" name="upload" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; But, when the method SaveData (POST) is executed, only refresh the page? (using javascript)?
type: Question
linked to: http://stackoverflow.com/q/13131802
accepted answer: http://stackoverflow.com/a/26212509
score: 0
tagged with: forms
has title: HTML form post with custom redirection
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26212486

http://stackoverflow.com/comment/41146415
type: Comment
type: AnswerComment
has text: @TrueBlueAussie, yeah you are correct.. I removed my `note`. Thanks :)
comment on: http://stackoverflow.com/a/26233181
score: 0

http://stackoverflow.com/comment/41167697
comment on: http://stackoverflow.com/q/26242004
score: 0
type: Comment
has text: The last version you load overrides the first one, so you have no conflict.
type: QuestionComment

http://stackoverflow.com/a/26312673
type: Answer
has body: The problem is with your data parameter not being a valid JSON payload. It is not valid JSON, because jQuery is using the jQuery.param() method internally to prepare the request parameters for typical POST submissions, and it will get converted to the following string: adrId=6 However, the server is expecting a JSON payload, and what you specified is clearly not a JSON payload. A valid JSON payload would be: { 'adrId': 6 } One approach to send correct JSON in the data parameter is to refactor your jQuery AJAX to look like this: $.ajax({ url: '/Home/DeletePost', type: 'POST', data: "{ 'adrId': 6 }", dataType: 'json', contentType: 'application/json; charset=utf-8', error: function (xhr) { alert('Error: ' + xhr.statusText); }, success: function (result) { alert("success"); }, async: true, processData: false }); Or you can use JSON.stringify as suggested by others. An alternative approach would be to send your data as 'application/x-www-form-urlencoded; charset=UTF-8' which is the default, and that way you don't have to change your data parameter. The code would be much simplified: $.ajax({ url: '/Home/DeletePost', type: 'POST', data: { adrId: 6 }, error: function (xhr) { alert('Error: ' + xhr.statusText); }, success: function (result) { alert("success"); }, async: true }); JQuery will recognize that the result is valid JSON.
answers question: http://stackoverflow.com/q/26312424
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26312424
has comment: http://stackoverflow.com/comment/41293544

http://stackoverflow.com/comment/41276090
has text: I think this `$index` itself doesn't have anything to do with the ID of your application's implementation. `track by $index` is used just to make sure that your `ngRepeat`ed values are always going to be unique (because array keys will be unique - 0,1,2,3,....)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26303689

http://stackoverflow.com/comment/41339587
type: Comment
comment on: http://stackoverflow.com/a/26338327
has text: Thanks. The structure of site cab be of any type because for any website we can provide service
type: AnswerComment
score: 0

http://stackoverflow.com/a/26200634
has comment: http://stackoverflow.com/comment/41104949
accepted answer of: http://stackoverflow.com/q/26200084
score: 0
has body: To be honest, I'm not very familiar with Google's Geocoding api, but there are a couple of ways you can do this. First Method Append hidden input elements inside your form. This is probably the closest to what you are describing in your question. Here is a simplified form: &lt;form name="testForm" action="test.php" method="post" onSubmit="return doSubmit();"&gt; &lt;input type="submit" name="submit" /&gt; &lt;/form&gt; Adding the return doSubmit(); means that you can call that function, and cancel sending the form if you need to. Here is the accompanying javascript: function doSubmit() { var latval = 42; // Use the geolocation values you want here. var lat = document.createElement("input"); lat.setAttribute("type", "hidden"); lat.setAttribute("value", latval); lat.setAttribute("name", "geo[lat]"); document.forms["testForm"].appendChild(lat); return true; //Note: to stop the form from submitting, you can just return false. } If using jQuery, this becomes easier. You don't need to add the onSubmit field to the form. Just assign a unique name, or an id to the submit button. $(document.ready(function() { $("input[name=submit]").click(function(e) { var latVal = 42; // Get geo vals here. $("form[name=testForm]").appendChild( "&lt;input type='hidden' name='geo[lat]' value='" + latVal + "' /&gt;" ); }); }); Here is a simple test php file: //test.php &lt;?php if (isset($_POST["geo"])) { echo "LAT IS: ".$_POST["geo"]["lat"]; } ?&gt; When you click on the button, it will append a hidden input to the form, and send that along with the rest of the POST data. You can assign array type values to form names, and it will convert it to be an array in the PHP $_POST array. This example will print "LAT IS: 42" when you click the button. Second Method This is the best one. Use ajax and json with jQuery (ajax can be done in raw javascript, but it isn't fun! For this, I will use a simpler form, and add a div: &lt;form name="testForm"&gt; &lt;input type="submit" name="submit" /&gt; &lt;/fo…
has comment: http://stackoverflow.com/comment/41086551
has comment: http://stackoverflow.com/comment/41101235
type: Answer
answers question: http://stackoverflow.com/q/26200084
type: AcceptedAnswer

http://stackoverflow.com/q/26292178
has comment: http://stackoverflow.com/comment/41254552
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41254843
has comment: http://stackoverflow.com/comment/41254641
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26292643
favorite count: 0
has title: how to assign values to textbox inside html cell
has answer: http://stackoverflow.com/a/26292391
has body: i want to assign value to this textboxes using javascript i'll try it usig this (table.rows.item(i).cells[5]).find('input').val("45"); but it wouldn't happen i'm append my table like this success: function (data) { $('#invoiceDetailTbl > tbody > tr:nth-child(n+1)').remove(); var date; var invDate; var invNo; var netAmt; var paidAmt; var balance; var totalAmt = 0; var totalBalance = 0; for (var i = 0; i < data.length; i++) { date = data[i].inv_Date; invDate = date.substring(0, 10); invNo = data[i].inv_No; netAmt = parseFloat(data[i].Net_Amt).toFixed(2); paidAmt = parseFloat(data[i].Paid_Amt).toFixed(2); balance = (parseFloat(netAmt) - parseFloat(paidAmt)).toFixed(2); //id = "damt['+i+']" $("#invoiceDetailTbl tbody").append(" " + " " + invDate + " " + " " + invNo + " " + " " + netAmt + " " + " " + paidAmt + " " + " " + ' ' + " " + " " + ' ' + " " + " " + balance + " " + " " + '' + " " + " "); totalAmt = totalAmt + parseFloat(netAmt); totalBalance = totalBalance + parseFloat(balance); } }
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26292391
score: -1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26210560
downvote count: 1
has comment: http://stackoverflow.com/comment/41254781
type: Question
has answer: http://stackoverflow.com/a/26292643
has comment: http://stackoverflow.com/comment/41254867
tagged with: javascript

http://stackoverflow.com/a/26347984
has comment: http://stackoverflow.com/comment/41357205
answers question: http://stackoverflow.com/q/26347063
type: Answer
upvote count: 1
score: 1
has body: Edit, Updated Try v1 (for numerically ordered id's , i.e.g., table1 -> table2) $("[id=table4] ~ [id*=table]") v2 (unordered id's) $("[id*=table]").not(function() { // return elements that _don't_ match the selector , // `id` cast as `Number` <= 4 return this.id.match(/\d+/)[0] <= 4 }) See Attribute Equals Selector [name="value"] Next Siblings Selector (“prev ~ siblings”) Attribute Contains Selector [name*="value"] .not() $("[id*=table]").not(function() { // return elements that _don't_ match the selector , // `id` cast as `Number` <= 4 return this.id.match(/\d+/)[0] <= 4 }) .each(function() { this.innerText = this.id })
downvote count: 0

http://stackoverflow.com/a/26347815
has comment: http://stackoverflow.com/comment/41360300
has comment: http://stackoverflow.com/comment/41357375
has comment: http://stackoverflow.com/comment/41357096
has comment: http://stackoverflow.com/comment/41357183
has comment: http://stackoverflow.com/comment/41356921
has comment: http://stackoverflow.com/comment/41356801
upvote count: 0
answers question: http://stackoverflow.com/q/26347714
has comment: http://stackoverflow.com/comment/41357034
has comment: http://stackoverflow.com/comment/41356673
type: Answer
has comment: http://stackoverflow.com/comment/41357286
has comment: http://stackoverflow.com/comment/41356751
score: -1
has body: Your maintainHistory function could use a minor rewrite. The way you have it now, the History.Adaptor will get stacked up with "statechange" handlers. Binding your event should only take place once, not every time you call the method. Try this: maintainHistory: (function(window, undefined) { console.log("Binding 'statechange' event - this should only happen once"); History.Adapter.bind(window, 'statechange', function() { console.log("window.statechange event fired!"); var State = History.getState(), cleanUrl = State.cleanUrl; if(cleanUrl === baseURL) { Functions.foldAllBlocks(); } else { var article = $('h2 a[href="'+cleanUrl+'"]').closest('article'); Functions.loadPost(article); } }); // This is the function that is bound to maintainHistory // The wrapping function is self-executing, will only happen once, and // creates a nice little closure for binding the "statechange" event return function(title, url) { console.log("maintainHistory was called with title", title, "and url", url); History.pushState({ page: title }, title, url); }; })(window), nextPropertyInFunctions: function() { ...}
has comment: http://stackoverflow.com/comment/41356869
downvote count: 1

http://stackoverflow.com/q/26245181
type: UnansweredQuestion
tagged with: handlebars.js
upvote count: 1
score: 1
has title: Mustache - conditionally render a list from array data
type: Question
has body: I've got an existing app which uses Mustache.js for templating and I'm needing to conditionally render a list from array data (json) coming from the server. Is this possible with Mustache? Some example data: "Preferences": ["pref-red", "pref-blue"] Easy enough to output that via: {{#Preferences}} {{.}} {{/Preferences}} But what I really want to do is conditionally render the appropriate parts of a static list based on whatever preferences data comes back. Some really dumb psuedo code: {{#Preferences}} {{if pref-red}} Red {{/if}} {{if pref-green}} Green {{/if}} {{if pref-blue}} Blue {{/if}} {{if pref-yellow}} Yellow {{/if}} {{if pref-purple}} Purple {{/if}} {{/Preferences}} Which would in this case output in the browser as: Red Blue I know Mustache doesn't have if conditions, but can this be achieved in Mustache? I'd like to keep it to Mustache if possible (reduce, reuse, recycle).
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26255177
tagged with: javascript
favorite count: 0
tagged with: mustache

http://stackoverflow.com/q/26221607
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26221658
has body: Using xml2js to parse an XML file, I need to retrieve the value of an attribute which contains a hyphen in its name some text At the point where I'm trying to retrieve cdr-id, I already have a variable item which points to the item element. I've verified it's pointing to the proper node with console.log(item.name); and that returns the expected value some text. But when I try console.log(item.$.cdr-id); I get the completely reasonable error ReferenceError: id is not defined (I'd have been more surprised if id wasn't treated as a separate token). Likewise, console.log(item.$."cdr-id"); gets the message SyntaxError: Unexpected string. Throwing JSON.stringify around it console.log( JSON.stringify(item.$)); reveals the original attribute name: {"cdr-id":"CDR0000040222"} Not having hyphens in the name in the first place just kicks the problem down the road a bit. Failing that, it looks like providing a custom attribute name processor is the way to go, but that smacks of being "too clever" with potential for confusion if anyone ever has to update this code. Is there a better way to do this?
favorite count: 0
has title: xml2js, attribute name contains a hyphen
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/26221658
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41311889
score: 0
type: AnswerComment
has text: I am choosing your answer because it was closer to my code / recursion, if even the other one seems more solid..
type: Comment
comment on: http://stackoverflow.com/a/26323484

http://stackoverflow.com/q/26230365
has answer: http://stackoverflow.com/a/43323603
type: UnansweredQuestion
has title: How to create search and replace dialog box in codemirror?
tagged with: codemirror
has body: I have been using codemirror textarea in my project. In this, search and replace demo I can get the feature of search and replace. But I need like this dialogue box. I tried a lot but am unable to get as I expect. codemirror.net/addon/search/search.js This is the js code I have customised so far. var queryDialog = 'Search: &lt;input type="text" style="width: 10em" class="CodeMirror-search-field"/&gt; &lt;span style="color: #888" class="CodeMirror-search-hint"&gt;(Use /re/ syntax for regexp search)&lt;/span&gt;&lt;button onclick="findtest()"&gt;Find&lt;button&gt;'; function findtest(){ CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);}; } This is what I have tried. Any help will be greatly appreciated.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41142209
has answer: http://stackoverflow.com/a/63117932
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/30385401

http://stackoverflow.com/a/26265206
answers question: http://stackoverflow.com/q/26264090
has body: I figured out after adding the following css link to the page everything worked : &lt;link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet" /&gt; But I dont understand why i need to add that when i already have a ui css file imported from the resource.
upvote count: 1
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/41239899
accepted answer of: http://stackoverflow.com/q/26264090
downvote count: 1
type: Answer

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/26294457
type: Tag
tags question: http://stackoverflow.com/q/26280203

http://stackoverflow.com/comment/41296566
type: Comment
has text: pass the data to js variable using `json_encode` . Your JS is creating strings that look like arrays but are not arrays. Much simpler just using `json_encode`
comment on: http://stackoverflow.com/q/26315321
score: 0
type: QuestionComment

http://stackoverflow.com/q/26247637
tagged with: javascript
has title: Troubles applying CSS to a SVG
score: 0
has body: this is my first time here. I load a SVG with Javascript into an HTML document. I need to replace the color of this SVG (it's a black image with transparency), which is placed into a canvas; however, when I put the css (style), nothing happens. This is my code: TEST CANVAS TEST What's wrong with it? Sorry for my bad English and thanks in advance
answer count: 1
has comment: http://stackoverflow.com/comment/41173376
tagged with: http://stackoverflow.com/tag/svg
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4809194
tagged with: fill
has answer: http://stackoverflow.com/a/26248376
accepted answer: http://stackoverflow.com/a/26248376
type: Question

http://stackoverflow.com/comment/41084069
comment on: http://stackoverflow.com/q/26199259
has text: @Jorge Vivas: Just loaded & tried livereload, looks like a javascript change still reloads the whole page. Tried it within an iframe but would only work once & lose the connection to the livereload socket. Will use this for CSS though, Thanks!
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26303939
type: Answer
accepted answer of: http://stackoverflow.com/q/26295898
answers question: http://stackoverflow.com/q/26295898
has comment: http://stackoverflow.com/comment/41276589
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/49412682
has body: The example is a bit forced, and it was created with the purpose of trying to show how waitFor() works. The WebAPI aspect of the example is pretty half-baked and really should be revised. However, even though MessageStore.getCreatedMessageData(text) passes a value to the store, it's still a getter. It's not setting data on the store. It's really being used as a utility method, and a good revision (pull request?) would be to move that method to a Utils module. To improve upon the example for the real world, you might do a couple things: Call the WebAPIUtils from the store, instead of from the ActionCreators. This is fine as long as the response calls another ActionCreator, and is not handled by setting new data directly on the store. The important thing is for new data to originate with an action. It matters more how data enters the system than how data exits the system. Alternatively, you might want to have separate client-side vs. server-side IDs for the messages. There might be few advantages of this, like managing optimistic renderings. In that case, you might want to generate a client-side id in a Utils module, and pass that id along with the text to both the dispatched action and the WebAPIUtils. All that said, yes the example needs revision.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/58551366

http://stackoverflow.com/comment/41234779
type: AnswerComment
has text: You're using an ID selector, `[0]` is not needed unless there is illegal HTML going on. Also, `.checked` is a DOM property, not a jQuery property.
type: Comment
comment on: http://stackoverflow.com/a/26281468
score: 0

http://stackoverflow.com/q/26350291
tagged with: protractor
score: 1
type: Question
answer count: 1
tagged with: javascript
has body: I have been working with Protractor for a couple of weeks now and have been impressed . The one thing I am getting stuck on is how would you go about doing data driven testing in Protractor when the data comes for and excel spreadsheet. For example say you have a spreadsheet call users.xls user.xls has two Columns and 4 rows Like this. |UesrId| Password| |user1 | pass1 | |user2 | pass2 | |user3 | pass3 | How can I read that excel spread sheet then loop thru my data passing the value from user.xls to my test.
has answer: http://stackoverflow.com/a/30160323
accepted answer: http://stackoverflow.com/a/30160323
upvote count: 1
favorite count: 0
downvote count: 0
tagged with: excel
has title: Data Driven testing with Protractor
type: AnsweredQuestion

http://stackoverflow.com/q/26241456
has answer: http://stackoverflow.com/a/26242016
type: Question
has body: I have following form and javascript which is not activated on submit. I can not understand where is the problem so that the javascript is not fired by pressing the button. The script is included in the html of course and the path is correct. var req; function addProductToCart(){ var url = "/addToCart"; var productReference = document.getElementById("selectedProductRef"); var size = document.getElementById("selectedProductSize"); req = initRequest(); req.open("POST", url, true); //req.onreadystatechange = callback; req.send("selectedProductRef="+productReference.value+"&amp;selectedProductSize="+size.value); } function callback(){ if (req.readyState == 4) { if (req.status == 200) { parseMessages(req.responseText); } } } function initRequest(){ if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari req = new XMLHttpRequest(); } else if (window.ActiveXObject){ // code for IE6, IE5 req = new ActiveXObject("Microsoft.XMLHTTP"); } } &lt;form name="addToShoppingBag" id="addToShoppingBag" &gt; &lt;input type="hidden" form="addToShoppingBag" id="selectedProductRef" name="selectedProductRef" value="${selectedCart.productReference}"&gt; &lt;input type="button" form="addToShoppingBag" name="addToCart" id="addToCart" onclick="addProductToCart()" class="css-button primary" value="ADD TO SHOPPING BAG"&gt; &lt;/form&gt;
has title: html form does not fire javascript
has comment: http://stackoverflow.com/comment/41161963
has comment: http://stackoverflow.com/comment/41161922
tagged with: javascript
has answer: http://stackoverflow.com/a/26241691
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41161709
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26242517
has comment: http://stackoverflow.com/comment/41161758
has comment: http://stackoverflow.com/comment/41161585
has comment: http://stackoverflow.com/comment/41161671
has comment: http://stackoverflow.com/comment/41161757

http://stackoverflow.com/comment/41305462
score: 0
type: Comment
has text: +1 for answering OP's question. However, the obvious downside of this versus handling each promise individually would be that if one or more items fail, potentially successful items won't be parsed.
type: AnswerComment
comment on: http://stackoverflow.com/a/26320100

http://stackoverflow.com/a/26257353
answers question: http://stackoverflow.com/q/26225816
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26225816
has body: try to use $arr [] = array(); in your php file .

http://stackoverflow.com/comment/41200088
has text: This is the sample from google's code library....i guess it doesn't put the locations in an array. Do they still need to be in an array to all be removeded from the map?
comment on: http://stackoverflow.com/q/26258125
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26207287
accepted answer: http://stackoverflow.com/a/26207368
has comment: http://stackoverflow.com/comment/41097642
has title: Javascript add count to a number with comma
type: Question
has comment: http://stackoverflow.com/comment/41097649
tagged with: javascript
has body: So I have this var str=document.getElementById('elem').innerHTML; str=parseInt(str)+1; 1,500 and I can't get it to take the entire number and add one (+1) to the number without taking comma off. Can you suggest something?
score: 0
tagged with: parseint
answer count: 1
has comment: http://stackoverflow.com/comment/41108626
has answer: http://stackoverflow.com/a/26207368
linked to: http://stackoverflow.com/q/9277948
has comment: http://stackoverflow.com/comment/41097676
type: AnsweredQuestion

http://stackoverflow.com/comment/41152541
type: AnswerComment
comment on: http://stackoverflow.com/a/26235117
score: 0
type: Comment
has text: I can't refactor the libraries, but of course this is a good solution for my code.

http://stackoverflow.com/q/26349914
downvote count: 2
has body: I keep getting "SyntaxError: Unexpected identifier" Here is my code: var sleepCheck = function(numHours){ if numHours &gt;= 8 { return "string 1"; else { return "string 2"; } } sleepCheck(10) What am i doing wrong?
upvote count: 1
type: Question
tagged with: javascript
score: -1
answer count: 3
has answer: http://stackoverflow.com/a/26349931
has title: Need help on very simple if statement in function
favorite count: 0
has answer: http://stackoverflow.com/a/26350813
has answer: http://stackoverflow.com/a/26349932
type: UnansweredQuestion

http://stackoverflow.com/q/26223073
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: Is it possible to access the content of an object?
has body: Is it possible to access the content of an object? At the moment it logs 0. It also logs the document but under a #document, I'm not sure if it's possible to access that outside the console. &lt;div id="objectContainer" &gt;&lt;/div&gt; &lt;script&gt; $("#objectContainer").html('&lt;object id="objectID" class="webPage" data="http://www.example.com"/&gt;'); $("#objectID").on("load", function () { var v = document.getElementById("objectID"); console.log(v); descendents = v.getElementsByTagName('*'); console.log(descendents.length); }); &lt;/script&gt;
has answer: http://stackoverflow.com/a/26223120
type: Question
linked to: http://stackoverflow.com/q/6854009
has comment: http://stackoverflow.com/comment/41127837
has answer: http://stackoverflow.com/a/26223592
answer count: 3
has answer: http://stackoverflow.com/a/26223554
has comment: http://stackoverflow.com/comment/41127665
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26299504
has answer: http://stackoverflow.com/a/26299596
tagged with: javascript
has body: When trying to resolve some data before moving to my page, I force resolve a promise, convert it to a custom object and I try to return the custom object to my resolve object. .state("trip.detail", { url: '/:tripId', templateUrl: 'partials/trip/detail.html', controller: 'TripDetailController', resolve: { trainData: function (TripService, $stateParams, $q) { return TripService.getTripById($stateParams.tripId,function (data) { console.log("received: " + data); return { "relativeTrainId": data.trainId, "from": new Date(data.departure).toISOString(), "to": new Date(data.arrival).toISOString(), "projectId": data.projectId, "isTrip": true, "tripId": data.id, "trajectory": data.trajectory, "statistics": data.statistics } }).$promise; } } }); This all works, except the 'trainData' that is being injected into my controller is actualy the value 'data' and not custom one that I create. What's going on? Extra info about TripService: services.factory('TripService', function ($resource) { function TripService() { this.tripResource = $resource('rest/trip/:tripId'); } TripService.prototype.getTrips = function (start, end, project, trainIds, callback) { return this.tripsResource.query({ projectId: project, trainIds: trainIds, from: start, to: end }, callback) } TripService.prototype.getTripById = function (tripId, callback) { return this.tripResource.get({ tripId: tripId }, callback); } return new TripService(); });
answer count: 2
downvote count: 0
favorite count: 0
has title: AngularJS ui-router resolve does not return custom value
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26299596
score: 2
upvote count: 2
possible better answer: http://stackoverflow.com/a/26300207
has answer: http://stackoverflow.com/a/26300207
type: Question
type: AnsweredQuestion

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/26218454
tags question: http://stackoverflow.com/q/26233101

http://stackoverflow.com/q/26303174
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19887737
has body: I am trying to update/add data to a google spreadsheet which will act as a database. Here is my spreadsheet and my JSfiddle. In the fiddle I can GET information; however, I am not sure how to POST new information yet. It doesn't see as easy as setting data.feed.entry[4]['gsx$content']["$t"]; to the value I want. How would I do this? Thanks.
has answer: http://stackoverflow.com/a/26547787
type: Question
tagged with: google-sheets
tagged with: database
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26547787
has title: Update/Add data to Google Spreadsheet Database

http://stackoverflow.com/q/26285089
answer count: 1
has comment: http://stackoverflow.com/comment/41244008
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/41242220
type: UnansweredQuestion
has title: Is it worth using Backbone on a site that isn't totally RESTful?
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26285793
has body: I've got a site which isn't REST based and I'm auditing my front-end and planning on re-writing it. I enjoy using Backbone, but not taking full advantage of Backbone (since my site isn't a single page app and I'm not necessarily consuming or bootstrapping any data on page load with fetch or updating with sync. Does it make sense to keep Backbone around or should I be looking elsewhere? Or on top of that, should I make my back-end more RESTful?
score: 0

http://stackoverflow.com/comment/41241578
type: QuestionComment
type: Comment
score: 1
has text: You have to use `$_GET['val']`. `
comment on: http://stackoverflow.com/q/26285008

http://stackoverflow.com/q/26333908
type: Question
tagged with: javascript
has body: I need to know about the usage of iron router packae.I am using the latest version of meteor. Issue : i am using Router.go('hello'); Router.go working fine.But the problem is append to the hellotemplate data to the already existing one. Please see the below code : router.js : Router.map(function() { this.route('home', {path: '/'}); this.route('hello',{path: 'hello'}); }); hello.html: This is hello sections sampleApp.Html: sampleApp {{> hello1}} Hello World! {{greeting}} sample.js if (Meteor.isClient) { Template.hello1.greeting = function () { return "Welcome to sampleApp."; }; Template.hello1.events({ 'click input' : function () { // template data, if any, is available in 'this' if (typeof console !== 'undefined') console.log("You pressed the button"); Router.go('hello'); } }); } if (Meteor.isServer) { Meteor.startup(function () { // code to run on server at startup }); } Output Displays : Before Button Click : Hello World! Welcome to sampleApp. **Button Click Me** After Button Click : Hello World! Welcome to sampleApp. **Button Click Me** This is hello sections Here the problem is Route.go not goes to new page.SO how to do.Please suggest me. Thanks in Advance.
score: 0
answer count: 1
has title: Iron Router Package issue in Meteor?
tagged with: meteor
tagged with: iron-router
has answer: http://stackoverflow.com/a/26334290
type: UnansweredQuestion

http://stackoverflow.com/a/26313720
type: Answer
accepted answer of: http://stackoverflow.com/q/26199642
answers question: http://stackoverflow.com/q/26199642
has body: You can write your own jQuery plugin. First, add the Bootsrap's modal component to your document. ×Close Basically, the plugin should display the modal when invoked and trigger a confirm event if the confirmation button is pressed or dismiss otherwise. $.fn.confirm = function (options) { var settings = $.extend({}, $.fn.confirm.defaults, options); return this.each(function () { var element = this; $('.modal-title', this).html(settings.title); $('.message', this).html(settings.message); $('.confirm', this).html(settings.confirm); $('.dismiss', this).html(settings.dismiss); $(this).on('click', '.confirm', function (event) { $(element).data('confirm', true); }); $(this).on('hide.bs.modal', function (event) { if ($(this).data('confirm')) { $(this).trigger('confirm', event); $(this).removeData('confirm'); } else { $(this).trigger('dismiss', event); } $(this).off('confirm dismiss'); }); $(this).modal('show'); }); }; An improvement we can make to the code above is to expose the default plugin settings. $.fn.confirm.defaults = { title: 'Modal title', message: 'One fine body…', confirm: 'OK', dismiss: 'Cancel' }; Usage example: $('#confirm').confirm().on({ confirm: function () { console.log('confirm'); }, dismiss: function () { console.log('dismiss'); } }); See live example here: http://jsfiddle.net/cdog/4q9t9pk5/. If you don't want to write your own solution you can try existing projects like: https://github.com/nakupanda/bootstrap3-dialog. It looks like what you were looking for. Docs and demos available here: http://nakupanda.github.io/bootstrap3-dialog/.
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41326501
type: Comment
has text: Since nobody mentioned it, check out http://kangax.github.io/compat-table/es6/
comment on: http://stackoverflow.com/q/26304517
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41240644
type: AnswerComment
score: 0
type: Comment
has text: Thanks anubhava, I don't think this will preserve the links in the text though. I edited my post to explain further, but I'm trying to keep the links in the text but just display 20 characters of the text to the user on the screen, with the links still intact when present.
comment on: http://stackoverflow.com/a/26284412

http://stackoverflow.com/q/26327621
has answer: http://stackoverflow.com/a/26327649
type: Question
answer count: 2
has title: jQuery - Check if 2 elements in array have same class
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: class
score: 0
possible better answer: http://stackoverflow.com/a/26328105
has comment: http://stackoverflow.com/comment/41319317
has body: I'm making a cards game, so i need to check if 2 elements (array in table) are the same, i noticed that the only way to do that is with JQuery, but i'm new with these things, i barely control Javascript, jQuery is a hell for me. My code looks like this var twoace = "&lt;img src='twoace.png' class='two'&gt;"; var twogold = "&lt;img src='twogold.png' class='two'&gt;"; var onegold = "&lt;img src='onegold.png' class='one'&gt;"; var oneace = "&lt;img src='oneace.png' class='one'&gt;" // i have a lot more code (sorry for my english) but this is the essential //initial array tablecards = [deckcard[0], deckcard[1], deckcard[2], deckcard[3]]; document.getElementById("table1").innerHTML = tablecards[0]; document.getElementById("table2").innerHTML = tablecards[1]; document.getElementById("table3").innerHTML = tablecards[2]; document.getElementById("table4").innerHTML = tablecards[3]; // here i add a card to the table tablecards.push(handcard[0]); //now i have this tablecards = [deckcard[0], deckcard[1], deckcard[2], deckcard[3], handcard[4]]; document.getElementById("table5").innerHTML = tablecards[4]; How do i check if "tablecards[4]" and "tablecards[1]" (or any other) has same class?
has comment: http://stackoverflow.com/comment/41319608
accepted answer: http://stackoverflow.com/a/26327649
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41319371
has comment: http://stackoverflow.com/comment/41319662
has comment: http://stackoverflow.com/comment/41319500
has answer: http://stackoverflow.com/a/26328105
has comment: http://stackoverflow.com/comment/41319692

http://stackoverflow.com/q/26247733
tagged with: django
upvote count: 1
has answer: http://stackoverflow.com/a/26248784
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
has body: I'm still a beginner with JS + Python and I'd be really happy to get your help on one problem. What I basically need to to is to pre-render a d3js visualization of a network (as for example http://bl.ocks.org/mbostock/4062045) into a static page. The main aim is to reduce the pageload. As a side-effect, a static page would also be a better input for scripts that render a png that could be used for thumbnails of the graph. So I imagine one site where I run the Force Directed algorithm once and then store the values of final node positions into a static file (where the node positions then are embedded). The system is currently running with Python/Django on Google App Engine. Is that possible? Code examples/Fiddle would be great! Disclosure: I have read this one here d3js large force-directed graph server side simulation and this one http://mango-is.com/blog/engineering/pre-render-d3-js-charts-at-server-side.html
favorite count: 0
type: Question
has title: D3 Pre-Rendering
linked to: http://stackoverflow.com/q/23294600
has answer: http://stackoverflow.com/a/26263815
tagged with: python
tagged with: d3.js
answer count: 2

http://stackoverflow.com/comment/41090038
comment on: http://stackoverflow.com/q/26203194
score: 0
type: Comment
type: QuestionComment
has text: There's hardly a difference whether you create your setters on the original or a new object, what you were missing is the closure.

http://stackoverflow.com/comment/41335051
has text: Oh! you are using ` if(status==0) status=6;` you also specify the last number of image isn't. i think i can manage it i will pass this number from code-behind(c#) to java-script variable so that script is dynamic in nature as i have to generate image gallery from database..
comment on: http://stackoverflow.com/a/26279254
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41275894
score: 0
has text: @KateMak: I imagine you could let ASP.NET manage the "id" and just use a "class" for the JavaScript selector.
type: Comment
comment on: http://stackoverflow.com/a/26302192
type: AnswerComment

http://stackoverflow.com/a/26249519
has comment: http://stackoverflow.com/comment/41177063
type: Answer
has body: This markup is what's putting the CAPTCHA there &lt;textarea name="recaptcha_challenge_field" rows="3" cols="40"&gt;&lt;/textarea&gt; &lt;input type="hidden" name="recaptcha_response_field" value="manual_challenge"/&gt; Just remove it from insde the &lt;noscript&gt; tag to get rid of it EDIT on second thought I can't tell but it looks like the link to the google url is what's bringing in the CAPTCHA. Maybe just remove the entire &lt;noscript&gt; tag. Or... The &lt;script&gt; after &lt;form&gt; is what's doing it. I'm just concerned that if you remove the &lt;noscript&gt; or the &lt;script&gt;, it may get rid of the whole log-in interface. My 2cents
answers question: http://stackoverflow.com/q/26249457
score: 0

http://stackoverflow.com/comment/41119016
comment on: http://stackoverflow.com/a/26218711
type: AnswerComment
score: 0
type: Comment
has text: No, `data` is your array, as it should be. It's only when you try to output the whole thing into HTML that it will be converted to a string.

http://stackoverflow.com/a/26589759
answers question: http://stackoverflow.com/q/26322783
score: 3
accepted answer of: http://stackoverflow.com/q/26322783
upvote count: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: The issue for me was caused by a conflict in css. Specifically the class 'ui-helper-hidden-accessible' has a position of absolute which for some reason causes the scrolling behavior. I chose to create a more specific rule in my own stylesheet to supercede the default jquery-ui css: .ui-buttonset .ui-helper-hidden-accessible{ position:relative; } Alternatively, you could use display:none but I wasn't sure if that would have unintended consequences in other browsers. I chose this route rather than rewriting the jquery-ui rule because I wasn't sure if there were specific use cases for other ui elements where a position of absolute will be needed and I didn't want to have to remember not to overwrite the css if I update. I figured this out through a wordpress bug ticket https://core.trac.wordpress.org/ticket/23684 although it should be noted that I am not working on a wordpress site so the solution posed is independent.

http://stackoverflow.com/q/26245516
type: Question
score: 0
has body: I'm trying to make a function that will take a few pictures and make a collage type thing for a background. I've been trying to use the HTML 5 &lt;canvas&gt; but have had no luck. I have various images each being 16x16 pixels. When I tried to add them to the canvas, they became very "smooth" but I need them to be pixelated. They also appear larger than i would expect for something 16 pixels large. I have done research on this, but no results seem to be working. Should I keep using canvas for this or is there a better/easier way? This is the JavaScript i used: var bg = document.getElementById("background".getContext("2d"); var img1 = new Image(); var img2 = new Image(); //etc... img5.onload = function(){ bg.drawImage(img1,0,0,16,16); bg.drawImage(img2,0,16,16,16); //etc... } img1.src="1.jpg"; img1.src="2.jpg"; //etc... P.S. Im sure this code is horribly inefficient, but i will clean it up later.
linked to: http://stackoverflow.com/q/7615009
answer count: 1
has answer: http://stackoverflow.com/a/26246082
linked to: http://stackoverflow.com/q/19129644
tagged with: javascript
type: UnansweredQuestion
tagged with: canvas
tagged with: jquery
has title: how to pixelate "smooth" canvas image
has comment: http://stackoverflow.com/comment/41169719

http://stackoverflow.com/a/26375788
upvote count: 3
answers question: http://stackoverflow.com/q/26278869
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26278869
type: Answer
score: 3
has body: I solved the problem using grunt plugin - 'gruntfile'. It lets you import top-level Gruntfile.js to be included in other Gruntfiles. I set parameters dynamically of parent Gruntfile from within other gruntfiles. You can find more about the plugin and usage examples on : https://github.com/shama/gruntfile
downvote count: 0

http://stackoverflow.com/comment/41143306
comment on: http://stackoverflow.com/q/26231483
has text: You also need to show a sample of the HTML to complete the puzzle :)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41289204
type: Comment
comment on: http://stackoverflow.com/a/26301595
score: 0
type: AnswerComment
has text: no mscdex, I have not required this, I know this extract the last part of url and my URL is somewhat different, consist of file key and Token like http://beta.business.applane.com/rest/file/download?token=5437bdb1811dfb0f03ec49a3&filekey=541bc4c909e41ce549567c07, which gives below file name download?token=5437bdb1811dfb0f03ec49a3&filekey=541bc4c909e41ce549567c07, but actually its filename is photo.jpg, is there any way to get this...

http://stackoverflow.com/comment/41325091
comment on: http://stackoverflow.com/a/26330585
type: Comment
has text: Hi, Thanks for the help. Yes that did gave me the alert("email already exists") which means its now working but the return false is not stoping the form from submiting. Any idea why this is hapening? Seems like return false wont work inside ajax done()
type: AnswerComment
score: 0

http://stackoverflow.com/q/26248390
answer count: 1
has body: I am trying to use addclass and hasclass to add animate.css animation to the division class. ... About Us Text The above is the HTML code that I am trying to animate. So when scrolled to aboutus section, active will be removed from main and added to aboutus section. I tried using this to detect and add animation when active exist in aboutus section. if($("section.aboutus").hasClass('active')) { $(".aboutus-text").addClass("animated fadeIn"); }; It is not working. I tried to see if addClass is working properly by removing the if statement, 'animated fadeIn' is added to aboutus-text. Anyone can tell me how do I do this? Because I only want the animation to start when aboutus is active.
has comment: http://stackoverflow.com/comment/41175169
has answer: http://stackoverflow.com/a/26248780
has comment: http://stackoverflow.com/comment/41175072
has comment: http://stackoverflow.com/comment/41175321
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26248780
has comment: http://stackoverflow.com/comment/41175363
has comment: http://stackoverflow.com/comment/41175004
has comment: http://stackoverflow.com/comment/41175020
tagged with: css
type: AnsweredQuestion
has title: jquery addclass and hasclass with animate.css
has comment: http://stackoverflow.com/comment/41174773
has comment: http://stackoverflow.com/comment/41175036
type: Question
has comment: http://stackoverflow.com/comment/41174823
has comment: http://stackoverflow.com/comment/41174790
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41175018
has comment: http://stackoverflow.com/comment/41175214
score: 0

http://stackoverflow.com/q/26306156
tagged with: logout
type: UnansweredQuestion
tagged with: save
has title: saving logout time when the user close the browser
has body: in my project i want to save the logout time to my db when the user closes the browser ( X button, File-> Exit, right click -> exit, Shift F4 ); i'm using javascript to handle the event with onbeforeunload but this event occurs also with back, forward, refresh events my question : is there any way to skip those events or another method to achieve this ?
tagged with: javascript
has answer: http://stackoverflow.com/a/26306222
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/41295449
has text: I've used the conditional statements and the line still appears in the description?
comment on: http://stackoverflow.com/a/26314678
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41119508
type: AnswerComment
comment on: http://stackoverflow.com/a/26217522
score: 0
type: Comment
has text: Hi! Thanks for the answer. I think I will use jquery purely because it might be easier to manage. Your code works perfectly fine.. thanks again.

http://stackoverflow.com/q/26257194
has answer: http://stackoverflow.com/a/26265554
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26265554
type: AnsweredQuestion
has body: I would like to use custom routing schemes so I can not use app.navigate(). How can I switch Views (remove other Views from DOM, move header and footer to selected View, etc.) without using app.navigate()?
has title: How to switch View without using app.navigate() in Kendo UI mobile?
type: Question
tagged with: kendo-mobile

http://stackoverflow.com/q/26316156
accepted answer: http://stackoverflow.com/a/26328004
tagged with: firefox-addon-sdk
tagged with: tabs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26328004
tagged with: javascript
has body: Hi all this is my first Stack Overflow question, so be gentle. I am trying to develop an addon with the Firefox SDK. I have a button attached to a panel. The panel intercepts certain web requests and displays them. My problem is that the panel maintains it's state across all of my tabs and windows. I would like each tab to have a panel with its own state. This way, when I navigate between tabs, the panel will show the data relevant to that specific tab but not the other tabs. I can't simply re-build the panel everytime I switch tabs because then the user would have to reload the page again for it to re-intercept the web requests. I've been scouring the internet for the last two days trying to figure out how to do this and I can't even find a topic relevant to it. If you need any more info/code snippets let me know.
has title: Firefox SDK different panel per tab
type: Question
score: 0
tagged with: firefox
answer count: 1

http://stackoverflow.com/comment/41251569
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26290025
has text: @aarosil That's not working, I already tried.

http://stackoverflow.com/a/26217261
has body: You can use the !important CSS rule to make sure none of your other CSS rules override something, for example: p { color: red !important; } This would ensure all p tags get colored red, and that nothing with a higher priority changes the color to something else. There is no way to prevent a user from altering HTML, CSS or Javascript from their browser.
has comment: http://stackoverflow.com/comment/41119613
answers question: http://stackoverflow.com/q/26217138
has comment: http://stackoverflow.com/comment/41118514
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41116166
has comment: http://stackoverflow.com/comment/41116545
accepted answer of: http://stackoverflow.com/q/26217138
upvote count: 1

http://stackoverflow.com/comment/41187373
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26253621
has text: I used one video player for the video portal. To load an other video I have changed the `src` attribute of the video element. I'm not sure what you mean with range-request. When you mean to skip forward or backward in the video then yes. For another project I have built an video carousel with html 5 and flash fallback. There were many video players which move in circle. No issues with video playback

http://stackoverflow.com/a/26313948
has comment: http://stackoverflow.com/comment/41344736
accepted answer of: http://stackoverflow.com/q/26299849
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26299849
downvote count: 0
has comment: http://stackoverflow.com/comment/41372841
has body: When you have a known working example, one way to figure out how this type of thing is implemented in the DOM (the entire browser window is a DOM) is to install the add-on DOM Inspector and use it to investigate what the contents of the DOM looks like. You probably also want, the Element Inspector add-on which is a very useful addition to the DOM Inspector (shift-right-click opens the DOM Inspector to the element clicked). You might also find Stacked Inspector helpful. In this instance, the downloads button starts out as a . Specifically: <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional" key="key_openDownloads" oncommand="DownloadsIndicatorView.onCommand(event);" ondrop="DownloadsIndicatorView.onDrop(event);" ondragover="DownloadsIndicatorView.onDragOver(event);" ondragenter="DownloadsIndicatorView.onDragOver(event);" label="Downloads" removable="true" cui-areatype="toolbar" tooltip="dynamic-shortcut-tooltip"/> Once a download starts the structure is changed to: <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional" key="key_openDownloads" oncommand="DownloadsIndicatorView.onCommand(event);" ondrop="DownloadsIndicatorView.onDrop(event);" ondragover="DownloadsIndicatorView.onDragOver(event);" ondragenter="DownloadsIndicatorView.onDragOver(event);" label="Downloads" removable="true" cui-areatype="toolbar" tooltip="dynamic-shortcut-tooltip" indicator="true" progress="true" counter="true"> <description id="downloads-indicator-counter" value="6h"/> <progressmeter id="downloads-indicator-progress" class="plain" min="0" max="100" value="3.484329371737533"/> The above structure change is contained in chrome://browser/content/downloads/indicatorOverlay.xul which is loaded as an overlay onto the main browser document. The code which controls the indicator is in chrome://browser/content/downloads/indicator.js. The code that actually loads the overlay is ensureOverlayLoaded() in chrome://browser/cont…
score: 3
has comment: http://stackoverflow.com/comment/41374455
type: AcceptedAnswer

http://stackoverflow.com/comment/41079794
has text: Thanks, this works in theory and in jsfiddle. However, when I use it with the actual facebook and twitter buttons it does not work unfortunately. I will let you know if I figure anything out.
score: 0
comment on: http://stackoverflow.com/a/26197384
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26328399
score: 0
has comment: http://stackoverflow.com/comment/41321210
has answer: http://stackoverflow.com/a/26328430
has body: I have some (bad) HTML that I'm trying to scrape, which looks like this "Book Name" by AUTHOR. Release Date: DATE. Published by PUBLISHER I need to extract the three things in bold i.e AUTHOR,DATE & PUBLISHER I've tried stuff like $('strong,b').each(...) but that gives the entire text. Edit: Here's the partial code I'm using, basically what I want to do is obtain all the details from a set of such divs. $(".MsoNormal").each(function(index) { var book = {} var elem = $(this).text() elem = sanitizeString(elem) // Removes whitespaces and line breaks book["title"] = getTitle(elem) // Gets the book name, which is between double quotes //Get author,date & publisher here $('b') traverses everything again } })
has comment: http://stackoverflow.com/comment/41320932
has title: How to extract bold text from a tag using jQuery
has comment: http://stackoverflow.com/comment/41320818
upvote count: 1
has comment: http://stackoverflow.com/comment/41321074
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26328430
type: Question
tagged with: cheerio
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41320897
has comment: http://stackoverflow.com/comment/41321116
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26328420
favorite count: 0
has answer: http://stackoverflow.com/a/26328420

http://stackoverflow.com/comment/72838494
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26355220
type: AnswerComment
has text: This worked nicely for me, excepting that I had to modify the quoting to embed double quotes around the hash value on the line that shows the tab: `$('.nav-tabs a[href="'+hash+'"]').tab('show');`

http://stackoverflow.com/comment/41143592
has text: `aKeys` cannot contain whitespaces since its elements are `numbers`
comment on: http://stackoverflow.com/a/26231474
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26304699
has comment: http://stackoverflow.com/comment/41279422
has comment: http://stackoverflow.com/comment/41278417
upvote count: 2
type: AcceptedAnswer
has body: You made a mistake during copy-paste. There shouldn't be a page.evaluate call and only one page.open call. You took a little too much from the basic phantomjs-node code. PhantomJS and Node.js have different runtimes and vastly different modules. There is no phantom reference. Additionally there is no system in node. You probably mean process. Then the docs say the following: Callbacks can't be set directly, instead use page.set('callbackName', callback) Fixed code: var phantom = require('phantom'); var address = "http://google.com/"; phantom.create(function (ph) { ph.createPage(function (page) { page.set("onResourceRequested", function (req) { console.log('requested: ' + JSON.stringify(req, undefined, 4)); }); page.set("onResourceReceived", function (res) { console.log('received: ' + JSON.stringify(res, undefined, 4)); }); page.open(address, function (status) { if (status !== 'success') { console.log('FAIL to load the address'); } ph.exit(); }); }); }, { dnodeOpts: { weak: false } });
has comment: http://stackoverflow.com/comment/41278539
type: Answer
has comment: http://stackoverflow.com/comment/41278587
accepted answer of: http://stackoverflow.com/q/26303494
has comment: http://stackoverflow.com/comment/41279546
has comment: http://stackoverflow.com/comment/41278132
score: 2
answers question: http://stackoverflow.com/q/26303494
downvote count: 0
has comment: http://stackoverflow.com/comment/41279470
has comment: http://stackoverflow.com/comment/41278222

http://stackoverflow.com/q/26300038
has answer: http://stackoverflow.com/a/26300342
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41269299
has comment: http://stackoverflow.com/comment/41269003
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Long UL list in DIV, auto scroll to LI element
accepted answer: http://stackoverflow.com/a/26300342
possible better answer: http://stackoverflow.com/a/26300447
has answer: http://stackoverflow.com/a/26300447
favorite count: 0
has body: I have such a weird problem, I have a div _inputHelper // it has fixed height ( 200px ) with very,very long &lt;ul&gt; list in it ( around 200 of elements) and I would like to scroll using jQuery to some &lt;li&gt; on the list, but the problem is that, when I scroll whole list in such a way: $( _inputHelper.find('ul') ).animate( { top : -1 * ( $(_this).position().top - $(_this).height() ) } , 200); _this is a LI element I would like to scroll to is scrolled down in good place, but I cannot scroll list using mouse, here is a printscreen to be more precise: I think I may scroll in wrong way, but I've tried also scrollTop/margin-top and it still didn't work. some tests: http://jsfiddle.net/uk5xqfry/3/ Any help?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41269087
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/comment/41242860
comment on: http://stackoverflow.com/q/26245772
has text: I agree. But that shouldn't cause this program to hang up. It seems that the `response` callback is getting called more than once...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41096414
score: 0
comment on: http://stackoverflow.com/q/26206057
type: Comment
type: QuestionComment
has text: facepalm...i was looking in view source code, not inspect element

http://stackoverflow.com/comment/41185351
comment on: http://stackoverflow.com/a/26253407
score: 0
type: Comment
has text: Thank you so much for putting me in the right direction! After struggling a bit and researching this is what worked: and then the javascript:
type: AnswerComment

http://stackoverflow.com/comment/41310038
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26319434
type: Comment
has text: @jfriend00 One is a paid option (not using) and the other is using what I prefer not to (a headless browser redirect for Googlebots).

http://stackoverflow.com/comment/41165832
comment on: http://stackoverflow.com/q/26242788
has text: Replace the `<g>` element that has no id attribute with an `<a xlink:href="<wherever you want to go to>">` and the `</g>` by ``
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41363869
type: Comment
type: QuestionComment
has text: its an onclick attribute, that's a click event, and it works if I don't stop the propagation of the event.
score: 0
comment on: http://stackoverflow.com/q/26351900

http://stackoverflow.com/a/26342425
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26342383
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26342383
has body: You put that code inside the function within the timeout (code spacing is important as well...): $current.removeClass(class2); setTimeout(function() { $current.css('display', 'none') if( !$current.is('#' + id) ) { $('#' + id).css('display','block'); setTimeout(function() { $('#' + id).addClass(class2) }, 1000); $current = $('#' + id); } },1000);

http://stackoverflow.com/q/26253248
tagged with: forms
has comment: http://stackoverflow.com/comment/41188609
upvote count: 1
has title: Function is not working on radio button onclick
has comment: http://stackoverflow.com/comment/41183634
has comment: http://stackoverflow.com/comment/41183478
has comment: http://stackoverflow.com/comment/41183934
tagged with: javascript
has comment: http://stackoverflow.com/comment/41184814
has comment: http://stackoverflow.com/comment/41182998
has answer: http://stackoverflow.com/a/50836209
accepted answer: http://stackoverflow.com/a/26254859
answer count: 3
possible better answer: http://stackoverflow.com/a/26253680
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26253680
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41183323
favorite count: 0
has comment: http://stackoverflow.com/comment/41182970
has comment: http://stackoverflow.com/comment/41183308
type: Question
has body: JavaScript function (here f1()) is not getting called on radio button (here id=iprange) onclick event. HTML function f1() { alert('yes'); } &lt;form role="form"&gt; &lt;div class="box-body"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="fullscan1" value="option1" /&gt; Full Scan &lt;/label&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;!-- "IP Range" is the radio button that should show a "yes" alert. --&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="iprange" value="option2" onclick="f1();" /&gt; IP Range &lt;/label&gt; From: &lt;input type="text" id="text1"&gt; To: &lt;input type="text" id="text2"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="subnet" value="option3" /&gt; Subnet &lt;/label&gt; &lt;input type="text" id="text3"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;button class="btn btn-danger"&gt;Scan&lt;/button&gt; &lt;/div&gt; &lt;/form&gt;
has answer: http://stackoverflow.com/a/26254859
has comment: http://stackoverflow.com/comment/41183769
has comment: http://stackoverflow.com/comment/41183161
has comment: http://stackoverflow.com/comment/41184455

http://stackoverflow.com/a/26264385
has comment: http://stackoverflow.com/comment/41212652
has comment: http://stackoverflow.com/comment/41204101
answers question: http://stackoverflow.com/q/26263955
downvote count: 0
score: 1
has body: If you want to leverage Underscore.js, the following standalone working example illustrates how to loop through the keys in your site object, and if one matches a referer string, then stash its corresponding code in localStorage. &lt;script src="http://underscorejs.org/underscore-min.js"&gt;&lt;/script&gt; &lt;script&gt; // this variable is just for testing var myReferer = "http://example2.com"; var site = { "example1.com": "x10", "example2.com": "x11", "example3.com": "x12" }; if (localStorage) { _.each(site, function (value, key) { // you'd replace "myReferer" with "document.referrer" here if (myReferer.indexOf(key) !== -1) { localStorage.setItem("code", value); } }); } // this is also just for testing alert(localStorage["code"]); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41205908
upvote count: 1
has comment: http://stackoverflow.com/comment/41206063
type: Answer

http://stackoverflow.com/comment/41217813
comment on: http://stackoverflow.com/a/26272023
type: AnswerComment
type: Comment
score: 0
has text: that doesnt loop from 1 to 2 and. each

http://stackoverflow.com/comment/41124360
type: Comment
has text: Have you checked the fiddle? You didn't position your divs using absolute positioning, so you don't have to modify `top` property of the divs. Changing their html order swaps their position.
comment on: http://stackoverflow.com/a/26221301
type: AnswerComment
score: 0

http://stackoverflow.com/q/26318272
tagged with: http://stackoverflow.com/tag/html
score: 1
upvote count: 1
has title: Google map API v3 plot with Radar loop overlay with automatic update to radar
type: Question
tagged with: google-maps
tagged with: javascript
has body: So im trying to create a dynamic loading to a radar loop site mixed with Google Map API v3 Currently i have this to just plot a line from 1 to another and looking to get weather center at zoom 12 function initialize() { var myLatlng = new google.maps.LatLng(34.01115000,-84.27939000); var mapOptions = { zoom: 12, center: new google.maps.LatLng(34.01115000,-84.27939000), }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var flightPlanCoordinates = [ new google.maps.LatLng(34.01115000,-84.27939000), new google.maps.LatLng(34.03050000,-84.35833000), ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, geodesic: true, strokeColor: '#0000FF', strokeOpacity: 5.8, strokeWeight: 10, fillOpacity: 0.35 }); flightPath.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); But here i wanna load in a radar loop and update the lat/long somehow but still automatically move the map and adjust the radar. <a href="http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_composite?maxlat=34.96496076302826&amp;maxlon=-89.51954101562501&amp;minlat=29.38958076527275&amp;minlon=-98.30860351562501&amp;type=00Q&amp;frame=0&amp;num=7&amp;delay=25&amp;width=800&amp;height=600&amp;png=0&amp;smooth=1&amp;min=0&amp;noclutter=1&amp;rainsnow=1&amp;nodebug=0&amp;theext=.gif&amp;merge=elev&amp;reproj.automerc=1&amp;timelabel=1&amp;timelabel.x=200&amp;timelabel.y=12&amp;brand=wundermap&amp;rand=4564" rel="nofollow">http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_composite?maxlat=34.96496076302826&amp;maxlon=-89.51954101562501&amp;minlat=29.38958076527275&amp;minlon=-98.30860351562501&amp;type=00Q&amp;frame=0&amp;num=7&amp;delay=25&amp;width=800&amp;height=600&amp;png=0&amp;smooth=1&amp;min=0&amp;noclutter=1&amp;rainsnow=1&amp;nodebug=0&amp;theext=.gif&amp;merge=elev&amp;reproj.automerc=1&amp;timelabel=1&amp;timelabel.x=200&amp;timelabel.y=12&amp;brand=wundermap&amp;rand=4564
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26348718
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26351795
tagged with: google-api

http://stackoverflow.com/q/26250266
type: AnsweredQuestion
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/26251995
tagged with: javascript
has body: I'm new to Marionette (though not to Backbone), and have decided to use it to manage my routing. Suppose I have the following situation: var AppRouterController = { //Route to the homepage home: function() { //Unload the existing route, and load this one instead }, //Route to a user profile page user: function() { //Unload the existing route, and load this one instead }, //Route to a list of tasks or something tasks: function() { //Unload the existing route, and load this one instead }, }; var TheRouter = new Marionette.AppRouter({ controller: new AppRouterController(), appRoutes: { "home": "home", "user/:id": "user", "tasks/:date": "tasks" } }); I would like for my app to load each new route dynamically, and completely remove its predecessor from the DOM (probably via an animation where, at least for a little bit, they will share screen space). I can see my app having two regions: the "navbar", and the "content" (the area where the information from a given route is rendered"): &lt;html&gt; &lt;body&gt; &lt;section region="navbar"&gt;&lt;/section&gt; &lt;section region="content" id="home|user|tasks|whateverRoute"&gt;&lt;/section&gt; &lt;/body&gt; &lt;/html&gt; So, my DOM body would always have two children: the navbar region section, and the content region section for whatever the current active route in Marionette is. What would be the best way to manage this process in Marionette? By that I mean, only grabbing the modules in a particular route when they are needed (rather than grabbing them all on load), creating a new "content" region, and replacing the existing "content" region in a smooth manner.
tagged with: routes
answer count: 1
has title: Can Marionette manage routes?
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26251995
tagged with: marionette

http://stackoverflow.com/q/26256349
has comment: http://stackoverflow.com/comment/41188358
has title: .getDay() not working in IE and Safari
tagged with: http://stackoverflow.com/tag/html
upvote count: 3
has answer: http://stackoverflow.com/a/26256428
has comment: http://stackoverflow.com/comment/41188484
tagged with: safari
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41188408
has answer: http://stackoverflow.com/a/26256795
tagged with: internet-explorer
has body: Im trying to program a calender, where the user can select a date to make an appointment. The calender itself works fine in Firefox and Chrome but not in IE and Safari which it has to. I broke the code down to find the line which causes the problem: var firstday = new Date(kalenderYear + "," + kalenderMonth + ",01").getDay(); "firstday" should get the weekday of the first day in the month (for example "3" for october, because the 1. of october was wednesday). This line of code works only in Chrome and Firefox. Any ideas how i could make it work in all major browsers?
has comment: http://stackoverflow.com/comment/41188420
possible better answer: http://stackoverflow.com/a/26256795
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26256428
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41166888
type: AnswerComment
has text: Yep, just saw that too.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26244010

http://stackoverflow.com/comment/41081760
has text: @ArunPJohny i opened a new question http://stackoverflow.com/questions/26198595/jquery-ajax-make-part-of-a-page-div-not-refresh-on-website-navigation
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26195015
type: Comment

http://stackoverflow.com/q/26320998
answer count: 2
score: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26321070
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26321159
upvote count: 2
has title: Angularjs orderBy sorting issues - ie, sorts 10 before 8
possible better answer: http://stackoverflow.com/a/26321070
tagged with: angularjs-orderby
has body: I'm working on this app that is supposed to sort py IP address, so to get around issues of soring by what is essentially a string I break the IP address into octets and attempt to sort by each octect consecutively. But I'm having some issues with Angularjs's "orderBy" function when applied to my data: {{ row.ipaddr }} {{ row.nickname }} {{ row.dnsname }} {{ row.type }} {{ row.subnet }} {{ row.location }} {{ row.vlan }} {{ row.notes }} {{row.ipA}}.{{row.ipB}}.{{row.ipC}}.{{row.ipD}} In theory this is supposed to order like: 1.1.1.1 8.8.8.8 10.10.10.10 But in reality it orders like this: 1.1.1.1 10.10.10.10 8.8.8.8 I'd like to avoid having to take the octect and converting it to a 3-digit integer (ie, 001.001.001.001); I feel like this should be something easy and I've just screwed up something simple. Things I've already tried: forcing angular to see each octect as a number (doesn't work) converting each octect to a float when each new record is saved to the DB: var octets = ($scope.ipaddr).split("."); $scope.ipA = parseFloat(octets[0]); $scope.ipB = parseFloat(octets[1]); $scope.ipC = parseFloat(octets[2]); $scope.ipD = parseFloat(octets[3]); Thanks!
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26321159
tagged with: javascript
tagged with: sorting

http://stackoverflow.com/a/26250695
score: 2
downvote count: 0
has body: what does Uncaught SyntaxError ... mean? It means that eval cannot parse the input (as JavaScript) because it contains a &lt; where there shouldn't be one. FWIW if the response is HTML, JSON.parse wouldn't help either. How do i fix the error? You either have to treat the response how it is expected to be treated, e.g. don't pass it through eval if it's HTML. Or you fix the server side and return the repsonse that the client side expects, e.g. JSON.
upvote count: 2
answers question: http://stackoverflow.com/q/26250545
type: Answer

http://stackoverflow.com/comment/41254641
type: Comment
has text: By looking at your [previously asked question](http://stackoverflow.com/questions/26210560/read-value-from-textbox-inside-html-table-cell), I think you should do it yourself, don't you think so? – Bhushan Kawadkar
type: QuestionComment
comment on: http://stackoverflow.com/q/26292178
score: 0

http://stackoverflow.com/q/26329894
has answer: http://stackoverflow.com/a/26331195
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41324510
has title: How to call a Greasemonkey function when a JavaScript link is clicked
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26331195
tagged with: greasemonkey
tagged with: javascript
has body: So I recently started working on Greasemonkey scripts without much prior experience in JavaScript. It was going fine until I hit this roadbloack. I'm writing a script for a page that has a small table of information. If a link at the bottom is clicked, the table expands fully in the page to display all information. I need to call a function in Greasemonkey when this happens, however, the link doesn't appear to have an ID or anything I can actually reference to watch it. It's simply this: &lt;a href="javascript: expandFullTable(false);"&gt;&lt;/a&gt; When it's clicked, the table expands and it then shows as true. I initially used the following to expand the table upon loading the page, but that broke several things: window.location.href = ('javascript: expandFullTable(false)'); I've attempted using "click", "onclick", and even "mouseover" to have Greasemonkey detect when it's pressed but nothing seems to work. From what I can tell it's simply a link that calls a function, but after some significant searching I wasn't able to find out anything about how to reference it in my script. I'm sure it's incredibly simple, but it's frustrated me to no end.
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/79397832
comment on: http://stackoverflow.com/a/26324037
type: AnswerComment
has text: JSON.stringify(obj, undefined, 4) This is what I was looking for. Thank you
type: Comment
score: 14

http://stackoverflow.com/q/26236536
possible better answer: http://stackoverflow.com/a/26236768
favorite count: 0
upvote count: 9
has body: Is it possible to assign a charset for at specific div? So that you can have more than one charset on a page. I'm currently importing snippets of text to my site via JS, and some of this text requires the UTF-8 charset. To be sure that my text is shown right on every page it is included (Sometimes external sites), I force the metatag into all the sites. Is it possible to apply this charset to only a specific div, span or something like that?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26237004
downvote count: 0
has answer: http://stackoverflow.com/a/26236768
tagged with: character-encoding
type: Question
score: 9
has answer: http://stackoverflow.com/a/26237004
answer count: 2
has title: Setting charset for a specific div
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26233355
type: Question
tagged with: image-gallery
has body: I need to design gallery in similar to example below with responsive feature. so far i managed to find few galleries but each one had one or the other limitation. Gallery i am working on is based on jssor example http://www.jssor.com/demos/image-gallery-with-vertical-thumbnail.html I am able to make some modification to the code and make it similar to my requirement, Unfortunately same code which is working on my local system is not working on JSFiddle. At present i tried to add the caption to the jssor gallery but it is not working, while my actual requirement is for two separate caption one will show the title of the image & other will be link to a website or web page... I would appreciate help in this regarding or a gallery which is similar to my requirement I have spend two days trying to get my hands on good code which can be easy to customize to my design. Code sample: Title
has answer: http://stackoverflow.com/a/26234007
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Image gallery with thumnail and two captions
favorite count: 0
accepted answer: http://stackoverflow.com/a/26234007
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/q/26324265
has title: create page specific JavaScript while keeping it all in one global JavaScript file?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26324312
type: Question
has comment: http://stackoverflow.com/comment/41313079
has comment: http://stackoverflow.com/comment/41313244
downvote count: 3
answer count: 1
has answer: http://stackoverflow.com/a/26324312
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -3
has comment: http://stackoverflow.com/comment/41313120
has comment: http://stackoverflow.com/comment/41313096
type: AnsweredQuestion
has body: I have a JavaScript file that is included into every page of my site. I have this code below as part of that file. This code however is only meant to work on 1 specific page and will not work on any other page of the site. So when viewing other pages of the site my Console window will show this Error message: Uncaught TypeError: Cannot read property 'top' of null This is the sort of problem I run into often, what is a good way to wrap this code below into something to prevent this error from showing on all the other pages of my site that do not have the DOM elements that it is looking for? Is it possibble to wrap this code block into a Function and then only call that function on the page that is needed somehow while keeping it al in this 1 Global JavaScript file? // Add Fixed Header Bar on Tasks Edit View with a "Save" Button var editTaskFixedHeaderBar = $('#task-edit-heading-row-labels'); var fixmeTop = editTaskFixedHeaderBar.offset().top; $(window).scroll(function() { var currentScroll = $(window).scrollTop(); if (currentScroll &gt;= fixmeTop) { editTaskFixedHeaderBar.css({ position: 'fixed', top: '0', left: '10' }); } else { editTaskFixedHeaderBar.css({ position: 'static' }); } });

http://stackoverflow.com/q/26327000
has body: I tried to add a pull request on CodeMirror, and it seems that Travis dont allow me to pass when i use Tabs on javascript. Why is that so bad to use tabs instead of spaces?
tagged with: unit-testing
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41318130
has comment: http://stackoverflow.com/comment/41318145
answer count: 1
tagged with: javascript
tagged with: github
tagged with: travis-ci
favorite count: 0
score: 0
has title: Why Travis dont let me pass when i use Tabs?
has comment: http://stackoverflow.com/comment/41318168
has comment: http://stackoverflow.com/comment/41318288
tagged with: tabs
has answer: http://stackoverflow.com/a/26327067
accepted answer: http://stackoverflow.com/a/26327067
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/30768080
answers question: http://stackoverflow.com/q/26353478
type: Answer
downvote count: 0
score: 1
has body: There's an answer over here: https://stackoverflow.com/a/18772205/2100255 Basically, you need to wrap your inner contenteditables with non-contenteditables. The event fires off the node which declares contenteditable=true.
upvote count: 1

http://stackoverflow.com/comment/41267482
has text: have you debugged your java code?
comment on: http://stackoverflow.com/q/26299298
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41360937
has text: OP: Can you provide a complete example in a Plunkr? (as well as using regular JavaScript)?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26350153

http://stackoverflow.com/comment/41260353
type: QuestionComment
comment on: http://stackoverflow.com/q/26295394
has text: I don't see any actual code here, can you post your javascript?
score: 0
type: Comment

http://stackoverflow.com/a/26335184
has comment: http://stackoverflow.com/comment/41359514
has comment: http://stackoverflow.com/comment/41359728
upvote count: 1
answers question: http://stackoverflow.com/q/26332257
has body: Here is another version of the function shown in the other answer from @teatimer that will work for all columns. I would have written this in comments but it would have been hard to read so... function myFunction() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var cell = ss.getActiveCell(); var row = cell.getA1Notation().replace(/[^0-9]/g,'');// keep only numeric values var column = cell.getA1Notation().replace(/[0-9]/g,'');//remove all numeric characters Logger.log('row '+row+' column '+column); if (row != '2') { // row is a string, you must add quotes to get an equal condition ss.toast("not valid selection, must be in row 2"); return; } var sourceVal = ss.getRange(column+(row - 1)).getValue(); cell.setValue(sourceVal); } you can also use another form of regex to get the same result : var row = cell.getA1Notation().replace(/\d/g,'');// remove non decimal values var column = cell.getA1Notation().replace(/\D/g,'');//remove decimal values
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/41227120
comment on: http://stackoverflow.com/q/26276945
score: 0
type: QuestionComment
type: Comment
has text: I added all of those variables at the start ( var barclays = 0; etc.) but that broke it in chrome also

http://stackoverflow.com/q/26299849
accepted answer: http://stackoverflow.com/a/26313948
type: Question
tagged with: firefox-addon-sdk
score: 0
answer count: 1
has body: How do you add text to your add-on's browser toolbar button? I'm interested in something exactly like how the download manager button shows the "2h" text above a progress bar, when 2 hours is remaining to download the requested file(s). Is it even possible to do this without resorting to having a whole lot of pre-made images including the text?
has title: In a Firefox non-overlay extension, how to add text to a browser toolbar icon?
tagged with: firefox
tagged with: javascript
has answer: http://stackoverflow.com/a/26313948
tagged with: firefox-addon-restartless
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41268906

http://stackoverflow.com/a/26216296
has body: Add - 100 to the scrolltop value $('a').click(function(){ $('html, body').animate({ scrollTop: $( $.attr(this, 'href') ).offset().top - 100 }, 500); return false; });
accepted answer of: http://stackoverflow.com/q/26216273
answers question: http://stackoverflow.com/q/26216273
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41232192
type: Comment
has text: very thanks gibbok both the codes are working and i am going to try both and see the page loading , whichever will load faster i will be using it , but thanks for letting the community know the new way to do the same thing
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26253205

http://stackoverflow.com/comment/41126049
has text: Could you create a function for the font-weight attribute or style that returns bold when a condition is true?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26219897

http://stackoverflow.com/comment/41236179
score: 1
has text: Note that if any plugins add events before you do, it's possible for the events to be canceled before you get to them. If you're using chrome, there's a debug method you can call in the console that will log all events that happen of a specific type on a specific element.
comment on: http://stackoverflow.com/q/26282239
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26532856
type: Answer
downvote count: 0
has body: I was researching the same issue when I found this post. What worked for me was placing the popup div in an external toolbar: http://demos.jquerymobile.com/1.4.4/toolbar-external/ "Toolbars not within a page will not be pulled into the DOM during Ajax navigation." That way you won't have multiple divs with the same ID.
score: 2
answers question: http://stackoverflow.com/q/26241843
upvote count: 2

http://stackoverflow.com/a/26255596
answers question: http://stackoverflow.com/q/26255402
has body: you can use the event onSelect on datepicker as follows $('Your-Selector').datepicker({ onSelect : function(){ } }); for further documentation refer this link hope this helps .......
score: 0
has comment: http://stackoverflow.com/comment/41190839
type: Answer

http://stackoverflow.com/a/26295506
answers question: http://stackoverflow.com/q/26295316
has comment: http://stackoverflow.com/comment/41260530
score: 1
has comment: http://stackoverflow.com/comment/41260588
has comment: http://stackoverflow.com/comment/41260662
type: AcceptedAnswer
has body: You can add toggleClass to .site-wrapper. If it has the class .show-nav it will remove it, otherwise it will add the class :) $('.site-wrapper').toggleClass('show-nav');
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26295316
downvote count: 0

http://stackoverflow.com/a/38972814
type: Answer
answers question: http://stackoverflow.com/q/26260855
score: 0
has body: Please use numbers and letters only

http://stackoverflow.com/a/26238265
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41158491
has comment: http://stackoverflow.com/comment/92467600
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/41167388
accepted answer of: http://stackoverflow.com/q/26237274
has comment: http://stackoverflow.com/comment/41165541
downvote count: 0
has body: You can set url slugs in your routes like the link shows, i.e. /games/:id. You can access them in your contoller via by name that you set in the route, i.e. req.param('id')
answers question: http://stackoverflow.com/q/26237274
has comment: http://stackoverflow.com/comment/41158577
score: 5
has comment: http://stackoverflow.com/comment/41164062

http://stackoverflow.com/a/26286494
has body: The localStorage object can store data with no expiration and it will not be deleted when the browser is closed. It's pretty simple to use with plain JavaScript and may work in your situation. Here are really basic examples you could run without using any extra libraries. // Create a localStorage object called user and store an object as a json string localStorage.user = JSON.stringify({name: 'John Smith', age: 32, eyeColor: 'brown'}); // Create a localStorage object called cars and store some cars in there localStorage.cars = JSON.stringify({ 0: { make: 'Honda', model: 'Fit', year: '2009' }, 1: { make: 'Ford', model: 'Mustang', year: '2002' } }); You can then pull your data back out and into javascript objects for use in your app. var cars = JSON.parse(localStorage.cars); var mustang = cars[1]; console.log(mustang); That should log your mustang object to the console. There are probably a few security related things to think about when using this method. I'd be cautious about what you store here, but overall I really like the localStorage option for the right situation.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26285928
has comment: http://stackoverflow.com/comment/41324976
has comment: http://stackoverflow.com/comment/41315887

http://stackoverflow.com/q/26212128
has comment: http://stackoverflow.com/comment/41107504
type: Question
has comment: http://stackoverflow.com/comment/41106917
has comment: http://stackoverflow.com/comment/41107428
tagged with: javascript
has title: html tags not matching in regex
has comment: http://stackoverflow.com/comment/41107313
score: 0
has body: I have a string that contains an html document. I need to know if this string contains the substring Anmelden - Text . Unfortunately there are some new lines in the string, so that the string looks like this: ... Anmelden - Text ... I have tried the following code: var idx = html.search( / \n*.*Anmelden.*\n*<\/title>/ ); But idx is always -1. If I remove the and the expression works. I have used http://regexpal.com/ to verify my regex. There it works on my input. What am I doing wrong?
answer count: 1
has answer: http://stackoverflow.com/a/26212159
accepted answer: http://stackoverflow.com/a/26212159
has comment: http://stackoverflow.com/comment/41106969
tagged with: regex
has comment: http://stackoverflow.com/comment/41106773
type: AnsweredQuestion

http://stackoverflow.com/q/26274544
accepted answer: http://stackoverflow.com/a/26274629
has body: I'm trying to convert this curl command to JavaScript: curl https://www.google.com/accounts/ClientLogin \ --data-urlencode Email=mail@example.com \ --data-urlencode Passwd=******* \ -d accountType=GOOGLE \ -d source=Google-cURL-Example \ -d service=lh2 I want convert this command to an $.ajax() function. My problem is that I don't know what I have to put in the setHeader function below for the options present in command curl. $.ajax({ url: "https://www.google.com/accounts/ClientLogin", type: "GET", success: function(data) { alert('hello!' + data); }, error: function(html) { alert(html); }, beforeSend: setHeader }); function setHeader(xhr) { // ? }
has title: Convert curl command to JavaScript
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/73632313
tagged with: ajax
has answer: http://stackoverflow.com/a/26274629
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/73632313
favorite count: 0
tagged with: curl
score: 17
type: Question
answer count: 2
upvote count: 17

http://stackoverflow.com/a/26318473
answers question: http://stackoverflow.com/q/26318458
has comment: http://stackoverflow.com/comment/41302467
has body: There is no $subject variable anywhere. You set the first name and last name variables properly. To check your script's response (which will be an error), go to your console and check network, and then repsonse data. Change $subject to $fname and it should "work" Also add on .on() submit event handler to your jQuery AJAX call like so: $('form').on('submit', function() { //ajax call }); Edit: You made an edit and changed $subject to $name. There is no $name variable either.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41302444

http://stackoverflow.com/comment/41308941
type: Comment
comment on: http://stackoverflow.com/a/26321724
has text: This is possible, but we need to keep the behavior from the system, and the rest of the system show messages to validate the fields.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26306090
score: 47
has title: Running a function everyday midnight
has answer: http://stackoverflow.com/a/26306266
linked to: http://stackoverflow.com/q/21482562
has comment: http://stackoverflow.com/comment/41280315
accepted answer: http://stackoverflow.com/a/26306169
possible better answer: http://stackoverflow.com/a/38084691
favorite count: 0
has answer: http://stackoverflow.com/a/26306169
has comment: http://stackoverflow.com/comment/41280252
has body: walk.on('dir', function (dir, stat) { uploadDir.push(dir); }); I am using Node, and i need make this function run everyday at midnight, this is possible?
answer count: 4
tagged with: node.js
upvote count: 47
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/3785736
has answer: http://stackoverflow.com/a/38084691
type: Question
has answer: http://stackoverflow.com/a/26306152
has comment: http://stackoverflow.com/comment/41280398
tagged with: javascript

http://stackoverflow.com/comment/41127240
type: AnswerComment
score: 0
has text: I thought it qualified as an answer, because of the "Use an index to specify which div should be visible" part.
type: Comment
comment on: http://stackoverflow.com/a/26222907

http://stackoverflow.com/a/26266006
has body: modernizer was causing the issue. Just move /js/libs/modernizr.min.js to the js directory with all the other files an problem solved.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26264768
upvote count: 1

http://stackoverflow.com/comment/41184684
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26254002
score: 0
has text: innerText doesn't work :/

http://stackoverflow.com/a/26248326
score: 4
answers question: http://stackoverflow.com/q/26248245
type: Answer
has comment: http://stackoverflow.com/comment/41174704
accepted answer of: http://stackoverflow.com/q/26248245
has body: Your Overlay div does not have the data context of the right controller. When you specify the ng-controller directive, you are telling angular to use that specific controller as its current scope. Whereas for your body section here, you did not specify the right controller. So, angular doesn't know where showloading property is coming from. Either move the overlay div into the div which has the controller as context or try using $rootScope instead.
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26348716
has body: since the remote domain doesn't support CORS, you'll need to use your own "server-side proxy", or use a free one like yql: very quickly and roughly:
score: 0
answers question: http://stackoverflow.com/q/26348004
type: Answer

http://stackoverflow.com/q/26197968
has comment: http://stackoverflow.com/comment/41081274
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41082358
has comment: http://stackoverflow.com/comment/41081403
tagged with: memory-leaks
has answer: http://stackoverflow.com/a/59539446
tagged with: memory-management
upvote count: 3
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has title: Getting large AJAX responses in Chrome without crashing
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/41082337
has body: I am working on a project which is aimed at the Chrome browser. Our goal which we would like to accomplish is to get a one million record array into the browser to work with the data. When I generated a test file that contained a million records it was a bit more than one gigabyte. For reasons I will explain, I believe we can accomplish the goal if can get the browser to collect the garbage when necessary. I believe the browser holds the text of the AJAX responses when it doesn't need to and crashes for that reason. Now, I can generate a million records within the browser and manipulate it as I need to. However, I have trouble sending the AJAX to the browser without crashing it. Since sending one million crashes it, I tried sending batches of one hundred thousand. I can get two such batches across and parse the JSON. If I do not have a onreadystatechange on my AJAX call, I can make the call a number of times. Also, if I receive a hundred thousand records, I can go over it ten times and make the full array. Because I seem to be able to actually hold one million records, I believe that, as I said, holding the response texts is overwhelming the browsers. In order to try to get better memory management, I have pushed the AJAX resquests and parsing into a web worker. When the webworker gets the AJAX and makes the hundred thousand record array, it pushes it to the DOM thread. When the DOM thread has taken the data it has the web worker do another AJAX. However, it still crashes. I am open to using websockets or something else, if that would help somehow. Here is the code in the DOM thread: var iterations=3; var url='hunthou.json'; var worker=new Worker('src/worker.js'); var count=0; worker.addEventListener('message',function(e){ alert('count: '+count); //bigArr=bigArr.concat(e.data); console.log('e.data length: '+e.data.length); bigArr[count]=e.data; console.log('bigArr length: '+bigArr.length); if(count&lt;(iterations-1)){ worker.postMessage(url); } else{ alert('done'); …

http://stackoverflow.com/q/26332420
favorite count: 0
upvote count: 5
linked to: http://stackoverflow.com/q/16962948
tagged with: maps
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5333653
has title: Google maps : Finding polygon by Id
has body: Hi I have a polygon below : var polygon = new google.maps.Polygon({ paths: coords, id : 123, strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#FF0000', fillOpacity: 0.35 }); polygon.setMap(globalMap); I attached an id property to it so i can refer to it later on, the problem is. How do I find that same polygon and trigger an event? like a change color or something? function changePolygonColor(){ //refer to the polygon with id 123 (this is my question) //change its color polygon.fillColor = '#00FF00'; } Many thanks!
has answer: http://stackoverflow.com/a/26332639
accepted answer: http://stackoverflow.com/a/26332639
type: Question
tagged with: google-maps-engine
linked to: http://stackoverflow.com/q/15208965
tagged with: polygon
tagged with: google-maps
answer count: 1
tagged with: javascript
score: 4
downvote count: 1

http://stackoverflow.com/comment/41282239
type: QuestionComment
comment on: http://stackoverflow.com/q/26307203
has text: could you please post your HTML code? The way that the grid looks is entirely dependent on the classes that you assign to it.
score: 0
type: Comment

http://stackoverflow.com/comment/41290853
comment on: http://stackoverflow.com/q/26311943
has text: Runs fine for me in Node. No hanging.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26329983
score: 12
has comment: http://stackoverflow.com/comment/41324065
type: Answer
upvote count: 13
has body: You need to select No library (pure JS) and No wrap - in head. Then it will work as a simple HTML with javascript page. This will be inserted in a &lt;script&gt; element in the &lt;head&gt;: function myclick(){ alert("myclick") } See demo
downvote count: 1
has comment: http://stackoverflow.com/comment/41323970
answers question: http://stackoverflow.com/q/26329761
has comment: http://stackoverflow.com/comment/41324269
has comment: http://stackoverflow.com/comment/41324076

http://stackoverflow.com/q/26275074
favorite count: 0
has comment: http://stackoverflow.com/comment/41223102
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41224157
has answer: http://stackoverflow.com/a/26275650
type: Question
has comment: http://stackoverflow.com/comment/41223602
tagged with: javascript
score: -1
has title: To check a password between 7 to 16 characters which does not contain three consecutive same numbers or alphabets
has body: To check a password between 7 to 16 characters which does not contain three consecutive same numbers or alphabets eg: The password should not contain aaa or 111
downvote count: 1
answer count: 1

http://stackoverflow.com/comment/41251317
comment on: http://stackoverflow.com/a/26290172
type: Comment
has text: as an addendum. this code reformats the entire string every time it changes, so that it preserves the proper MAC address format (`xx:xx:xx:xx:xx:xx`).
type: AnswerComment
score: 0

http://stackoverflow.com/a/26336648
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41336453
has comment: http://stackoverflow.com/comment/41336662
accepted answer of: http://stackoverflow.com/q/26336544
type: Answer
answers question: http://stackoverflow.com/q/26336544
upvote count: 2
has body: You need to add another handler: $(".map-button li").mouseenter(function(){ $(".map-button li ul").show(); }); $(".map-button li").mouseleave(function(){ $(".map-button li ul").hide(); });

http://stackoverflow.com/q/26253700
possible better answer: http://stackoverflow.com/a/26254093
score: 1
accepted answer: http://stackoverflow.com/a/26253740
has answer: http://stackoverflow.com/a/71502005
type: Question
has answer: http://stackoverflow.com/a/26254093
tagged with: validation
downvote count: 0
has answer: http://stackoverflow.com/a/26253740
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: input
has title: How to check the validity of a number type input sing javascript?
upvote count: 1
has comment: http://stackoverflow.com/comment/41183801
has body: I have implemented in a form a number type input, with specified min and max : &lt;input class="qty_input" name="quantit" type="number" value="5" min="1" max="50" maxlength="2" style="width:4em;"&gt;&lt;/input&gt; The input type number works : if something else then a number is entered or if the number value is not in the specified range, the input becomes Red. I have a javascript function that submit the form on input change. &lt;script type="text/javascript"&gt; (function($) { function doAjax() { $.ajax({ url : "blabla", type: "POST", data : $("#form-configurator").serializeArray(), dataType: 'json', success: function(data) { console.log(data); }, error: function () { } }); } $('input[type=number]').change(function() { // test Validity doAjax(); }); })(jQuery); &lt;/script&gt; I would like to test before running the doAjax() function if the number input is valid. Is there a simple way to do that, like testing a "valid" parameter of the number type input? (it should exists as the input performs some tests itself…) Thank you for your help, Alex
has comment: http://stackoverflow.com/comment/41187087
type: AnsweredQuestion

http://stackoverflow.com/a/26215338
type: Answer
has body: $("#caste :input"); Should select all inputs that have been appended. After that you just need to go over the list and fetch value
score: 0
answers question: http://stackoverflow.com/q/26215147

http://stackoverflow.com/q/26282855
has body: I'm using the following script to read all images off a specified folder: $path= './images/referenzen/*'; $files = explode("\n", trim(`find -L $path`)); shuffle($files); foreach ($files as $item) { if (preg_match('/\.JPG$/', $item)) { $pfad = $item; $urlarray=explode("/",$pfad); $end=$urlarray[count($urlarray)-2]; echo '&lt;div class="element-item '.$end.'"&gt;&lt;img width="80" src="'.$item.'" /&gt;&lt;/div&gt;'; } } By adding this behind the "shuffle"-command $files = array_slice($files, 0, 27); I sometimes get 27 files outputted, but sometimes also only 26, 25 or 24?! This varies, but I don't know why? Also I'd like to keep the rest of the files in a "pool" and interchange randomly one of the 27 images that get shown on siteload by one of the files off the pool. So lets say every 20 seconds one randomly picked image of the starting-images should be interchanged by one image off the pool. I don't know where to start atm. Implementing Javascript would be possible if needed. Anyone got a hint on how to achieve this?
has comment: http://stackoverflow.com/comment/41238054
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41237571
score: 0
tagged with: php
has title: pool of images - show only 27 and interchange
answer count: 1
has answer: http://stackoverflow.com/a/26283402

http://stackoverflow.com/q/26229935
has body: I'm trying to create a web form which can be used to upload a file to parse.com and add it to a normal parse object after uploading. While parse.com supports client side file upload controller as described here, it has a disadvantage that I have to expose the JavaScript key for using it. To overcome this, I have done a little hack by converting my files into base64 strings on the client side, and add it as a body-part in my submit request, and finally convert it to a ParseFile on the server side as shown below. var base64 = req.body.poster; var file = new Parse.File("poster.jpg", { base64: base64 }); var featured = new Parse.Object("Object"); featured.set("poster", file); featured.save(); While this works for all files sized less than 100KB (default body part size limit) my use case needs files sized upto 10MB to be uploaded correctly. So I have tried changing the bodyParse() body size limit as shown below. app.use(express.bodyParser({ limit: 10000000 })); // 10MB But this configuration doesn't appear to have any effects on the express server. And the response I get on making this request is as follows. 413 (Request Entity Too Large) Is there anyway that I can change the body size limit of the express server on Parse.com? PS :- I know exposing Javascript keys are not vulnerable very much, if the ACLs are configured accordingly. But in this case, I would like to keep it this way for added security.
score: 2
answer count: 0
tagged with: parse-platform
upvote count: 2
linked to: http://stackoverflow.com/q/19917401
has title: Parse.com express.bodyParser() configuration for size limits
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/json
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
has comment: http://stackoverflow.com/comment/43923473

http://stackoverflow.com/a/26532648
type: Answer
answers question: http://stackoverflow.com/q/26302139
has body: Use var done = confirm("Are you Done? y/n"); if (done) break; Instead of d prompt confirmation
score: 0

http://stackoverflow.com/comment/41120433
comment on: http://stackoverflow.com/q/26219359
score: 0
type: QuestionComment
type: Comment
has text: avez vous tente le methode getText()? c'est essentiel pour la classe textArea

ubuntu-server
type: Tag
tag name: ubuntu-server
tags question: http://stackoverflow.com/q/26276952

http://stackoverflow.com/comment/41170825
type: QuestionComment
comment on: http://stackoverflow.com/q/26246147
score: 1
has text: Personally, I've been using a JS bookmarklet that will load it on click, but theoretically you could load it with a Greasemonkey script if you have the extension. Note that even when you use the code above it modifies `window.$` and `window.jQuery`. `$.noConflict()` might help if you want to use `window.$` for something else.
type: Comment

http://stackoverflow.com/comment/41247583
comment on: http://stackoverflow.com/a/26287617
has text: Oh right, $index isn't set because it's outside the ng-repeat. Sry!
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41075851
comment on: http://stackoverflow.com/q/26195237
score: 0
has text: Perhaps it depends on the selector. I thought there were some cases where using the jQuery functions, or at least splitting up selectors, were much faster. Also, if I just use `.find('li')` then the DOM stops changing (according to Firefox Inspect). If I re-add the `:not()` portion, then every `.list` flashes whenever the function is run. I assume this indicates that the DOM is changing?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26331929
answer count: 2
has body: I am having a problem changing the value of a cell in a HTML table. I am just messing around with JavaScript because I have never used it. Here is my code: Name Health Strength Agility Intelligence Gold Class
tagged with: javascript
upvote count: 2
possible better answer: http://stackoverflow.com/a/26331952
tagged with: http://stackoverflow.com/tag/html
has title: Changing value of a cell with JavaScript
favorite count: 0
has answer: http://stackoverflow.com/a/26331952
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26332023
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/26332023

http://stackoverflow.com/q/26329019
has comment: http://stackoverflow.com/comment/41324282
possible better answer: http://stackoverflow.com/a/26329077
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26329077
upvote count: 2
has answer: http://stackoverflow.com/a/26329135
downvote count: 1
has title: short Javascript program questions( erro output)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26329141
accepted answer: http://stackoverflow.com/a/26329141
tagged with: if-statement
score: 1
type: Question
has body: const HIGH_AGE = 70, MAX_AGE = 120, BABIE_AGE=4, TEEN_AGE=16; function main () { var age; age = Number(prompt('Enter your age:')); //set prompt box ask user's age if (age &lt; BABIE_AGE || age &gt; MAX_AGE)//if user user's age are below "0" or above "120" alert('Please Enter Age Within the Range between 0-120!');//output: must enter age in valid age range else if (isNaN(age) == true || !age) alert('please enter a valid entry'); else if ((age &gt;= HIGH_AGE) || (age &gt;= 0 &amp;&amp; age &lt;= BABIE_AGE))//if age between 0-4 or above 70 alert('You may travel for free');//output: they can travel for free else if (age &gt;= CHILDREN_AGE &amp;&amp; age &lt;= TEEN_AGE )//if user's age are under 16 alert('You may travel with a half price ticket');//output they can travel for half-price else alert('You must travel with a full price ticket'); //others all travel with full price }
tagged with: javascript
has answer: http://stackoverflow.com/a/26329081

http://stackoverflow.com/a/26231637
has comment: http://stackoverflow.com/comment/41182418
has body: &lt;input type="file" style="position:absolute;opacity:0" id="file"&gt;&lt;img onclick="$('#file').click();"&gt; with jQuery or without it: &lt;input type="file" style="position:absolute;opacity:0" id="file"&gt;&lt;img onclick="document.getElementById('file').click();"&gt;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41218711
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26231564
accepted answer of: http://stackoverflow.com/q/26231564

http://stackoverflow.com/comment/41153501
type: Comment
has text: You need to inject it into your controller, see @sma answer for an example with $interval
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26237278

http://stackoverflow.com/q/26213390
has title: Having trouble getting my page to work properly
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41110973
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/26214871
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Ok im going to copy pasta my HTML and JS in a moment. but a quick rundown first so you understand where im coming from. Im in Javascript 101 essentially, and we're about six weeks in. I have a project going on where i need to do all of the following. Requirements 1.Design and structure (10 points) Use external CSS and JS files. Make sure you have a header, footer, styled text, colors, etc. Be creative. 2.Forms (10 points) Your project must use forms. Make sure to use the appropriate field types and make sure they are accessible. 3.jQuery (10 points) Unobtrusive jQuery must be used. At a bare minimum, use it in place of events (.onload, .onclick, .onsubmit, etc.) and .getElementById(). 4.Tabs (10 points) Your site must use at least three tabs: (1) your lesson, (2) your form, (3) conclusion /wrap up. You may use the code from the example in class, but make sure it is documented and the styles are completely different than the example. 5.Documentation (10 points) Make sure all of your code is well documented. So now you know what i am trying to accomplish. Problem is the everything we were taught for jQuery was from either Codecademy, or in class. The book we use (Modern Javascript - Develop and Design by Larry Ullman) has nothing about jQuery. As you can see in the requirements, i cant use "getelementid" and such, which i do understand how to use. So at this point, i dont know if im completely lost, or if it's merely syntax issues, im literally that lost. What i do have is more or less my understanding of Jquery, mixed in with some code copied from a few examples. Here's my Html- &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Health Calculator&lt;/title&gt; &lt;link id="theme" href="vader/jquery-ui-1.10.4.custom.min.css" rel="stylesheet"&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;Health Calculator&lt;/h2&gt; &lt;!-- tabs setup for page --&gt; &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tabs-1"&gt;First&lt;/a&gt;&lt;…
accepted answer: http://stackoverflow.com/a/26214871
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41306068
comment on: http://stackoverflow.com/a/26320421
type: Comment
has text: Uncaught TypeError: Cannot use 'in' operator to search for 'height' in undefined
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41327327
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26321678
has text: You will need to redefine both the circle SVG and the arrow so that they are centred at (0,0). At the moment the "centre" of both the arrow and the circles is at approx (35,35). So they are both being positioned at the wrong place.
score: 0

http://stackoverflow.com/a/48671992
answers question: http://stackoverflow.com/q/26264956
has comment: http://stackoverflow.com/comment/89952257
has comment: http://stackoverflow.com/comment/106119221
has body: Using the spread operator: const result = arr.reduce( (accumulator, target) =&gt; ({ ...accumulator, [target.key]: target.val }), {}); Demonstration of the code snippet on jsFiddle.
score: 32
type: Answer
upvote count: 35
downvote count: 3

http://stackoverflow.com/q/26208036
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41099013
has comment: http://stackoverflow.com/comment/41098992
has comment: http://stackoverflow.com/comment/41099005
has answer: http://stackoverflow.com/a/26208198
has title: How to load javascript libraries securely
has body: I apologize if this question is simplistic, beginning web developer here. I have a page that I am serving securely as https. The page uses the following two libraries: &lt;script src="http://myjs.us/param.js"&gt;&lt;/script&gt; &lt;script src="http://myjs.us/entify.js"&gt;&lt;/script&gt; I am getting errors of the following type: [blocked] The page at ... was loaded over HTTPS, but ran insecure content from 'http://myjs.us/param.js': this content should also be loaded over HTTPS. So I get why I am getting this error, it is because I am loading the javascript libraries from an unsecure source. My question is where can I get these from a secure source? Thanks in advance.
has comment: http://stackoverflow.com/comment/41098987
type: Question
linked to: http://stackoverflow.com/q/23688565
score: 0
answer count: 2
tagged with: https
linked to: http://stackoverflow.com/q/22196927
has answer: http://stackoverflow.com/a/26208081

http://stackoverflow.com/comment/41368363
has text: did you mean that server decide where to download pdf on client's machine ?
comment on: http://stackoverflow.com/a/26354010
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26204138
answers question: http://stackoverflow.com/q/26204098
type: Answer
has comment: http://stackoverflow.com/comment/41091544
has body: You can post to a script without using a form, here is a simple example $.post("get_image.php", { thumbId: thumb1 }, function(response) { console.log(response); }); And in php side $_POST['thumbId']
score: 0

http://stackoverflow.com/a/26300047
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41269523
has comment: http://stackoverflow.com/comment/41496679
has comment: http://stackoverflow.com/comment/41294837
type: Answer
has comment: http://stackoverflow.com/comment/41337110
answers question: http://stackoverflow.com/q/26298119
has comment: http://stackoverflow.com/comment/41495861
score: 1
has comment: http://stackoverflow.com/comment/41495552
upvote count: 1
has body: So, whether or not this is the best solution for you I'll explain an approach we took when it came to having a dumb Angular app that required routes be defined on the backend. So at run time the URL that the user comes in on is unknown to our app, what we do is the following: Call a service that defines our app URLs Validate the retrieved URLs Call $route.reload() to essentially restart (it doesn't actually restart the application, but just runs the route parser again) the application We then defined routes based on the app's features, eg: http://foo.bar/product/:slug. So if a user came in on http://foo.bar/product/foobar the app at run time has no idea whether or not foobar exists. This allowed us to keep the UI dumb and define the routes on the backend; therefore... In your routes config set up base routes, eg /product/:slug, /page/:slug, etc... Create a factory that keeps a boolean variable which is whether or not the app has loaded the localisation data; if it's false then your product, page, etc... controllers will just silently stop at their init In your base controller load your localisation data, validate it, etc... Once you're happy you then run $route.reload() and this time set the factory flag to true Your product, page, etc... controllers will get called again, but the factory flag will be true, then they can now refer to your loaded localisation data Profit Hopefully it doesn't sound painful, it can be an elegant solution and works really well. Just make sure you have a nice polite loader.
accepted answer of: http://stackoverflow.com/q/26298119
has comment: http://stackoverflow.com/comment/41495831
has comment: http://stackoverflow.com/comment/41495470

http://stackoverflow.com/comment/41174704
score: 0
type: AnswerComment
has text: Thanks a lot, nice explanation and advice. Using $rootScope did the trick.
type: Comment
comment on: http://stackoverflow.com/a/26248326

http://stackoverflow.com/a/26199696
answers question: http://stackoverflow.com/q/26199684
upvote count: 8
has comment: http://stackoverflow.com/comment/41083943
has comment: http://stackoverflow.com/comment/41083820
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41083790
has comment: http://stackoverflow.com/comment/41083812
has comment: http://stackoverflow.com/comment/41083956
has comment: http://stackoverflow.com/comment/41083881
has comment: http://stackoverflow.com/comment/41083893
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/41083786
has comment: http://stackoverflow.com/comment/41083778
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26199684
has body: I share your dislike of unbracketed if/else statements. Your bracketing seems correct to me. However, there's a simpler way that's equivalent: this.setFlags = function() { if (document.documentElement) { this.dataCode = 3; } else if (document.body && typeof document.body.scrollTop != 'undefined') { this.dataCode = 2; } else if (this.e && this.e.pageX != 'undefined') { this.dataCode = 1; } this.initialised = true; } As Dave Chen points out in a comment, because of the simplicity and parallelism of the if/else branches—they all assign a value to this.dataCode—you could also use nested ternary operators: this.setFlags = function() { this.dataCode = document.documentElement ? 3 : document.body && typeof document.body.scrollTop != 'undefined' ? 2 : this.e && this.e.pageX != 'undefined' ? 1 : this.dataCode; this.initialised = true; } The advantage of this is that it is clearer that all the conditions are simply determining which value to assign to this.dataCode. The disadvantage (a big one, in my opinion) is that unless the nested ternary operators are formatted in a careful way (such as what I did here), it's basically impossible to get any sense of what's going on without carefully studying the expression. Unfortunately, most JavaScript code formatters that I'm familiar with do a very poor job of formatting such expressions (or preserving such formatting). (Interestingly, several Perl formatters that I've used do a wonderful job of this. But this isn't Perl.)

http://stackoverflow.com/q/26200750
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41085641
has comment: http://stackoverflow.com/comment/41088685
has comment: http://stackoverflow.com/comment/41085609
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: Sorry for the general question, i am only looking for suggestions. I need a table (javascript plugin) which is sortable and searchable and has no paging implemented, and the search bar fires up as soon as you start typing. I am looking for something similar to http://grooveshark.com/#!/album/Halo+LP/5904939 Anybody knows something very similar to that ? You can see it here more clearly:
has comment: http://stackoverflow.com/comment/41088557
tagged with: http://stackoverflow.com/tag/html
has title: javascript: Sortable Search-able table with no paging
favorite count: 0
has comment: http://stackoverflow.com/comment/41085617
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41090719
tagged with: css
answer count: 0
score: 1

http://stackoverflow.com/comment/41212989
type: AnswerComment
type: Comment
has text: there is two way to declare a module: var mt_sim = angular.module ('mt-sim', []); or var mt_sim = angular.module ('mt-sim'); The first way to include another module which is assigned for your module. The second one is declare a new module standalone.
comment on: http://stackoverflow.com/a/26269296
score: 0

http://stackoverflow.com/comment/41297279
comment on: http://stackoverflow.com/q/26315616
type: Comment
type: QuestionComment
has text: @J148 It actually works fine with english, and works fine with arabic too. Meaning that it highlightens all the occurrences of the given characters. The only problem is that it disconnects the characters from its previous characters as i explained above.
score: 0

http://stackoverflow.com/comment/41357336
type: Comment
type: QuestionComment
has text: well second thought if a blur or resize event is raised then you might want the game to stop even before the next frame. Don't know if a user might notice that in any way. I suspect blur to cancel rendering at once, so there would be no effect. I'll test this tomorrow !!
score: 1
comment on: http://stackoverflow.com/q/26347893

http://stackoverflow.com/q/26248736
type: Question
accepted answer: http://stackoverflow.com/a/26248921
has body: So I have this menu. As you can see, when I click the menu button, the menu height changes. I'd just like the menu to kinda slide out. (Includes Bootstrap and jQuery) Is it something that can be fixed in CSS or do I have to change my Script for it? JavaScript: var main = function(){ var menuwidth = $(".menu").width(); $(".menu").width(0).hide(); $("#menubar").click(function(){ $(".menu").show(); if($(".menu").width() === 0){ $(".menu").animate({ width: menuwidth }, menuwidth*10); $(".menu").show(); }else{ $(".menu").animate({ width: 0 }, menuwidth*10, function(){$(".menu").hide();}); } }); }; $(document).ready(main); HTML: iFone iFatch FOS 9 CSS: .nav{ background-color: #494949; left: 0; top: 0; width: 100%; position: fixed; text-align:center; } #menubar{ color:white; font-size: 2em; } .menubutton{ font-size: 50; } .menu{ display:inline; }
has comment: http://stackoverflow.com/comment/41175546
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41175470
score: 0
answer count: 2
has title: Prevent menu height from changing?
has comment: http://stackoverflow.com/comment/41175666
has answer: http://stackoverflow.com/a/26248921
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41312526
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26248964
has answer: http://stackoverflow.com/a/26248964

http://stackoverflow.com/q/26349787
has answer: http://stackoverflow.com/a/26350733
has title: How to read module vs. vanilla JS library in angular?
type: Question
score: 3
has answer: http://stackoverflow.com/a/26350718
accepted answer: http://stackoverflow.com/a/26350718
tagged with: javascript
has body: I'm new to service/provider/factories modules in angular. I've been using a library called annyang for 30 mins and I wanted to find the more "angular" way of using this library. Some independent on git made a moduleProvider found here:ngAnnyang. It has zero documentation on how to use it properly. But traditional annyang you simply run: var commands = { 'remind me to *val' : reminders, }; annyang.addCommands(commands); annyang.start(); QUESTIONS: After injecting the module into my angular application: would this module be implemented the same or commands now get prefixed with nglike: ngAnnyang.addCommands(); ngAnnyang.start();? Do i still need to have the original lib of annyang as a script tag in the app? What in this angular wrapper makes it "angular" except that it now can be injected? JS:ng-annyang /** * ngAnnyang Module * * Annyang Angular wrapper */ angular.module('ngAnnyang', ['ng']) .provider('ngAnnyang', function ngAnnyangProvider() { 'use strict'; var isEnabledFn = function() {}; // events console.log('ngAnnyang: set events'); annyang.addCallback('start', function() { console.log('ngAnnyang: enabled true'); isEnabledFn(true); }); _.each(['end', 'error', 'errorNetwork', 'errorPermissionBlocked', 'errorPermissionDenied'], function(v) { annyang.addCallback(v, function() { console.log('ngAnnyang: enabled false'); isEnabledFn(false); }); }); console.log('ngAnnyang: start'); annyang.start(); this.debug = function(state) { if(state){ console.log('ngAnnyang: set debug', !!state); annyang.debug(!!state); } else { console.log('ngAnnyang: set debug', true); annyang.debug(); } }; this.setLanguage = function(lang) { if(lang){ console.log('ngAnnyang: debug', ''+lang); annyang.setLanguage(''+lang); } }; this.$get = function ngAnnyangFactory(){ return { isEnabled: function(fn) { console.log('ngAnnyang: isEnabled callback', fn); isEnabledFn = fn; }, addCommands: function(commands) { console.log('ngAnnyang: add commands', commands); annyang.addCommands(commands); }, removeC…
answer count: 2
possible better answer: http://stackoverflow.com/a/26350733
downvote count: 0
tagged with: gist
favorite count: 0
tagged with: angularjs
tagged with: annyang
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/comment/41297189
type: Comment
has text: Can you post your file tree?, i'm guessing you want recoursive search
comment on: http://stackoverflow.com/a/26315540
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41217483
type: QuestionComment
comment on: http://stackoverflow.com/q/26271783
has text: Thank you for answering, problem is values are coming from json it may change according to month
score: 0
type: Comment

http://stackoverflow.com/q/26342237
has title: Jquery Validations not a function
tagged with: javascript
score: 0
tagged with: validation
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26342376
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26342376
has comment: http://stackoverflow.com/comment/41346591
has body: I am new to Jquery / Javascript I am trying to validate a form to make sure that the fields have a value but i am getting the following Message in the console log Error Message: TypeError: "#post_origin".val is not a function Script: &lt;script&gt; $('#new_note_form').on('submit', function (event) { $(".errors").empty().remove(); $.each($('#post_origin, #post_dest, #post_radius, #post_available, #post_equipment, #post_notes, #post_origin_states, #post_dest_states'), function(i, field) { $(field).css({ "border": '#FFFFFF 1px solid'}); }); if(('#post_origin').val() == '' &amp;&amp; ('#post_origin_states').val() == '' ){ ('#post_origin').css({ "border": '#FF0000 2px solid'}); ('#post_origin_states').css({ "border": '#FF0000 2px solid'}); (".errors").empty().append('Origin City/State &amp; Origin States Can\'t Both Be Blank'); return false } if(('#available').val() == ''){ ('#available').css({ "border": '#FF0000 2px solid'}); (".errors").empty().append('Available Date Can\'t Be Blank'); return false } }); &lt;/script&gt;
type: Question

http://stackoverflow.com/a/26276360
answers question: http://stackoverflow.com/q/26276169
upvote count: 3
has comment: http://stackoverflow.com/comment/41229392
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41225398
accepted answer of: http://stackoverflow.com/q/26276169
type: Answer
has body: The problem you've got is you're mixing synchronous (loop) and asynchronous (request) operations. There is no mechanism for making the outer loop wait for inner, asynchronous operations to complete before continuing to the next iteration. Instead you could implement recursion, requiring the callback function to instigate the next iteration of the outer "loop". function do_post_req(arr_key) { request.post( 'http://localhost:3000/post', { form: { from: arr[i][0], to: arr[i][1]} }, function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(body); if (arr[key+1]) do_post_req(key+1); //&lt;-- recursion } } ); } do_post_req(0); //&lt;-- kick things off with first array key

http://stackoverflow.com/comment/41257118
type: AnswerComment
score: 0
type: Comment
has text: Its working but i want to display the same dynamically in multiple fileupload in js
comment on: http://stackoverflow.com/a/26293148

http://stackoverflow.com/comment/41108238
type: Comment
has text: @null Project requirements will vary of course, but IMO targeting IE9+ is reasonable. IE9 is two versions behind now, even Google only supports the [two most recent versions](http://googleforwork.blogspot.com/2011/06/our-plans-to-support-modern-browsers.html) of a browser.
comment on: http://stackoverflow.com/a/26208009
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41188107
score: 1
type: Comment
type: QuestionComment
has text: In what way is it off? The clocks in Western Europe go back to standard time on October 26th... what did you expect, and why?
comment on: http://stackoverflow.com/q/26256145

http://stackoverflow.com/q/26323317
has answer: http://stackoverflow.com/a/26323493
has answer: http://stackoverflow.com/a/26330224
has body: I desperately need to implement client side sorting that emulates sorting through our tastypie api, which can take multiple fields and return sorted data. So if for example I have data like: arr = [ { name: 'Foo LLC', budget: 3500, number_of_reqs: 1040 }, { name: '22nd Amendment', budget: 1500, number_of_reqs: 2000 }, { name: 'STS 10', budget: 50000, number_of_reqs: 500 }, ... etc. ] and given columns to sort e.g.:['name', '-number_of_reqs'] it should sort by name (ascending) and number_of_reqs (descending). I can't get my head around this, first of all it has to be "natural sort", it supposed to be fairly easy to get if we're talking about sorting a single column, but I need to be able to sort in multiple. Also I'm not sure why I'm getting different results (from the way how api does it) when using lodash's _.sortBy? Is _.sortBy not "natural" or it's our api broken? Also I was looking for an elegant solution. Just recently started using Ramdajs, it's so freaking awesome. I bet it would be easier to build sorting I need using that? I've tried, still can't get it right. Little help? upd: I found this and using it with Ramda like this: fn = R.compose(R.sort(naturalSort), R.pluck("name")) fn(arr) seems to work for flat array, yet I still need to find a way to apply it for multiple fields in my array
type: Question
has title: Natural sort, array of objects, multiple columns, reverse, etc
tagged with: javascript
tagged with: sorting
upvote count: 2
has answer: http://stackoverflow.com/a/26323594
linked to: http://stackoverflow.com/q/15478954
has answer: http://stackoverflow.com/a/36772342
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/26326115
accepted answer: http://stackoverflow.com/a/26326115
tagged with: lodash
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26323594
tagged with: underscore.js
tagged with: ramda.js

http://stackoverflow.com/comment/60247424
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/32402438
has text: @ThadeuLuz: Yes, you are right. Thank you for your help! I have replaced the .replaced with a split.join solution (instead of the /\\*/g global option). I have also added some examples that cover the \*a\* case.

http://stackoverflow.com/a/26271361
type: AcceptedAnswer
has body: The problem is with your create.js.erb file. You have below code: $('.todo-items').prepend("&lt;%= escape_javascript(render(@item)) %&gt;"); In this code you are pre-pending html in todo-items you should replace items each time instead. like below : $('.todo-items').html("&lt;%= escape_javascript(render(@item)) %&gt;"); This will replace html each time with new html.
type: Answer
has comment: http://stackoverflow.com/comment/41229200
has comment: http://stackoverflow.com/comment/41230687
accepted answer of: http://stackoverflow.com/q/26268382
answers question: http://stackoverflow.com/q/26268382
has comment: http://stackoverflow.com/comment/41289614
score: 0

http://stackoverflow.com/comment/41348000
has text: @GameAlchemist Nice thing about knowledge is that it is self-renewing. If you give your knowledge about watermarking to Cody Raspien then your own knowledge about watermarking is not diminished. ;-)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26337163
score: 2

http://stackoverflow.com/a/26302844
has body: You can use slice method for this: var SubArray = Array.slice(0,2); Please note that Array is reserved JS global object. You need to use different name for that variable. So your code should be for example: var MyArray = [{name:'Fadi'},{name:'Joseph'},{name:'Salim'},{name:'Tony'}]; var SubArray = MyArray.slice(0,2);
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41275858
accepted answer of: http://stackoverflow.com/q/26302823
type: Answer
answers question: http://stackoverflow.com/q/26302823
has comment: http://stackoverflow.com/comment/41275825
has comment: http://stackoverflow.com/comment/41274389

http://stackoverflow.com/comment/41298016
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26314725
type: Comment
has text: Can I store two javascript functions in `db.system.js`?

http://stackoverflow.com/q/26269211
downvote count: 0
tagged with: asynchronous
tagged with: http://stackoverflow.com/tag/q
linked to: http://stackoverflow.com/q/10058814
favorite count: 0
has answer: http://stackoverflow.com/a/34045821
has comment: http://stackoverflow.com/comment/41212956
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26269298
has comment: http://stackoverflow.com/comment/41213024
possible better answer: http://stackoverflow.com/a/39786308
has answer: http://stackoverflow.com/a/39786308
type: Question
upvote count: 9
has body: I have referred to this question already. That is, I don't believe my problem lies in a misunderstanding of async. Here is the relevant part of my module. var fs = require('fs'); var q = require('q'); var u = require('../utils/json'); var indexFile = './data/index.json'; function getIndex() { var def = q.defer(), promise = def.promise, obj; fs.readFile(indexFile, function(err,data) { if (err) { throw err; def.reject(err); } console.log('data', data); def.resolve(obj); }); return promise; } When I log 'data', I'm getting a buffer (below), rather than the JSON content of that file. &lt;Buffer 5b 7b 22 68 65 6c 6c 6f 22 3a 22 77 6f 72 6c 64 22 7d 5d&gt; Any thoughts on why?
has comment: http://stackoverflow.com/comment/41214063
tagged with: javascript
has title: Why is fs.readFile returning a buffer?
score: 9
answer count: 3
has answer: http://stackoverflow.com/a/26269298

http://stackoverflow.com/q/26253495
tagged with: shieldui
upvote count: 1
type: Question
has title: Shield UI Bar Chart Overlap
tagged with: charts
score: 1
has answer: http://stackoverflow.com/a/26530373
tagged with: bar-chart
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I want to create a bar chart that has two bar charts in it with Shield UI. When I do that it shows them side by side but I want them to be overlapped. I don't want the total Y axis value. If I use area chart for example, it does that but for the bar chart it doesn't. For Example like this Is it possible in Shield UI.
type: UnansweredQuestion

http://stackoverflow.com/comment/41240204
score: 0
comment on: http://stackoverflow.com/a/26284264
type: AnswerComment
has text: Was just updating that. :)
type: Comment

http://stackoverflow.com/comment/41283835
type: QuestionComment
comment on: http://stackoverflow.com/q/26307836
score: 0
has text: I would also like to know if there is a way to it other than including inside the head because this is going on a wordpress site and all the css styles are enqueued.
type: Comment

http://stackoverflow.com/comment/41126845
has text: oh ok, need to remember C to understand this.
comment on: http://stackoverflow.com/a/26222649
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41262963
type: Comment
has text: Yeah, that shows the space at the rear in ones string, thnakyou very much for the help
comment on: http://stackoverflow.com/a/26296015
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41253109
score: 0
comment on: http://stackoverflow.com/q/26291197
type: Comment
type: QuestionComment
has text: did you debug the code within the success handler?

http://stackoverflow.com/q/26348801
tagged with: angularjs
tagged with: browserify
has answer: http://stackoverflow.com/a/30921315
has body: I am using angulajs with browersify to build an app. To test it, I'd like to use Karma. I jave set up my conf file like this: module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine', 'browserify'], files: [ 'node_modules/angular/angular.js', 'node_modules/angular-mocks/angular-mocks.js', 'src/app/*', 'src/app/*/*' ], exclude: [ 'src/app/*/*.jade' ], reporters: ['progress'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, browserify: { debug: true }, preprocessors: {'src/app/*/*.js': ['browserify']} }); }; And my app.js file looks like this: require('angular') require('angular-mocks') var uiRouter = require('angular-ui-router') var serices = require('./services') var directives = require('./directives') var controllers = require('./controllers') var routes = require('./routes') angular.module('myApp', [uiRouter, 'ngMocks']) // load Routes .config(routes) // Services .service('someService', services.someService) // Controllers .controller('myCtrl', controllers.myCtrl) // Directives .directive('myDirective', directives.myDirective); I am using karma-browserify but I still get the following error when running test: 'require is not defined' How can I fix this?
tagged with: karma-runner
downvote count: 0
type: UnansweredQuestion
has title: getting 'require is not defined' when testing in angularjs with karma
type: Question
has comment: http://stackoverflow.com/comment/41358600
score: 1
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26349375
has body: Best practice in any mapping situation where you have that many markers is to use marker clustering. e.g. https://github.com/Leaflet/Leaflet.markercluster http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26349338
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26349338

http://stackoverflow.com/comment/41327311
type: Comment
comment on: http://stackoverflow.com/a/26302851
has text: $('#input_'+id).attr('value', $(this).html()); this was closed to what i want the first td table of dialog window to pass on input, and second td and third on link area. see my last table on my fiddle please
type: AnswerComment
score: 0

http://stackoverflow.com/a/26240871
answers question: http://stackoverflow.com/q/26206631
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26206631
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: This was fixed 6 days ago and is not yet released. So you can wait for Protractor > 1.3.1 or start using master branch. How to install Protractor from master branch In case you need sudo and using Protractor globally installed: sudo npm -g install git://github.com/angular/protractor#master I prefer to setup a NodeJS project with package.json and point to an specific Protractor version or commit, for better control: npm init npm install --save git://github.com/angular/protractor#ed1c75c7 mkdir -p bin # some handy shortcuts ln -s ../node_modules/.bin/protractor bin/p ln -s ../node_modules/protractor/bin/elementexplorer.js bin/e # elementexplorer sample usage bin/e https://angularjs.org/ # Protractor binary sample usage bin/p your-config.js

http://stackoverflow.com/q/26240651
has body: I am using code found on the link below to add a checkbox to my form that fires an alert box if the user submits the form without the checkbox being checked, but for some reason its not working. http://www.webfoot-designs.com/blog/2012/05/09/create-a-check-box-statement-before-continuing/ And here is the link to the web page that I'm using it on... http://www.dreamhomevacationrentals.com/hotels/spanish-modern-retreat/ First, click "Availability" from the left side menu and then click "BooK Now" to be able to see the form. Any help would be greatly appreciated.
has comment: http://stackoverflow.com/comment/41160649
tagged with: javascript
type: Question
tagged with: submit
has comment: http://stackoverflow.com/comment/41160008
tagged with: onclick
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26242113
tagged with: alert
has title: Javascript Alert onClick Function Not Working
type: UnansweredQuestion
tagged with: forms

http://stackoverflow.com/comment/86113962
has text: Those two functions don't do the same thing as escape. The question even states this. Also, W3 schools is not a great resource to link to.
comment on: http://stackoverflow.com/a/43068918
score: 6
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26323578
has body: Here is a sample select random color from one line of code! [].forEach.call($$("*"),function(a){ a.style.outline="1px solid #"+(~~(Math.random()*(1&lt;&lt;24))).toString(16) }) check the detail from this link
type: Answer
answers question: http://stackoverflow.com/q/26323488
score: 0

http://stackoverflow.com/comment/41107163
type: AnswerComment
score: 0
type: Comment
has text: Because the border is being added to the elements. One of the earlier style declarations is overriding the border declaration `.dataTable.hover td` and making only the top border appear. As I said, it is best not to specify too many selectors when setting rules, because you can accidentally make a declaration very specific, which then makes it very difficult to override without using something like `! important`.
comment on: http://stackoverflow.com/a/26203883

http://stackoverflow.com/a/26245503
has comment: http://stackoverflow.com/comment/41206766
has comment: http://stackoverflow.com/comment/41206246
has comment: http://stackoverflow.com/comment/41207473
type: Answer
has comment: http://stackoverflow.com/comment/41190598
has comment: http://stackoverflow.com/comment/41206593
has comment: http://stackoverflow.com/comment/41206114
score: 0
answers question: http://stackoverflow.com/q/26244876
has comment: http://stackoverflow.com/comment/41217276
has body: I am just editing your code for your better understanding CSS: /*body*/ body { margin:0px auto; width:80%; height:80%; } /*map size*/ #map_size { width:1190px; height:1300px; background:#0099FF; border-style: solid; border-color: black; position: relative; } /* desk boxes*/ .desk_box { width: 23px; height: 10px; border: 4px solid black; padding:10px; } /*station info*/ .station_info { display: none; width:150px; height:150px; border:4px solid black; background-color:white; } #desk_box:hover ~ .station_info { display: block; } HTML: $(document).ready(function () { $(".desk_box").click(function () { $id = $(this).attr("data") $("#station_info_"+$id).toggle(); }); /* based on your question -->"how can I include in the function where reclicked on the station_info DIV it will close? I have to refresh the page in order to do so" --> adding this jquery */ $(".station_info").click(function () { $(".station_info").hide() }); }); PHP: <?php //get number of rows for X,Y coords in the table while($row = mysqli_fetch_assoc($coord_result)){ //naming X,Y values $id = $row['coordinate_id']; $x_pos = $row['x_coord']; $y_pos = $row['y_coord']; //draw a box with a DIV at its X,Y coord echo " id:".$id." "; } //end while coord_result loop while($row = mysqli_fetch_assoc($station_result)){ $id_cor = $row['coordinate_id']; $x_pos = $row['x_coord']; $y_pos = $row['y_coord']; $sec_name = $row['section_name']; echo " Hello the id is:".$id_cor." Section:".$sec_name." "; } ?> check the JSfiddle to understand what I am trying to do http://jsfiddle.net/hiteshbhilai2010/arfLboy7/10/ while creating div I am trying to make some reference between clicking div desk_boxand station_div to make toggle.
has comment: http://stackoverflow.com/comment/41206601

http://stackoverflow.com/a/26279698
has body: With this code window.onscroll = function (event) { var amount = window.pageYOffset + "px"; document.getElementById("cover").style.left = amount; } You can achieve it. Working Fiddle: Fiddle
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26278886
type: Answer
score: 2

asp-classic
tags question: http://stackoverflow.com/q/26273934
tags question: http://stackoverflow.com/q/26351585
tag name: asp-classic
type: Tag
tags question: http://stackoverflow.com/q/26268286

http://stackoverflow.com/a/26340548
type: Answer
has comment: http://stackoverflow.com/comment/41344908
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26340473
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26340473
has comment: http://stackoverflow.com/comment/41345470
upvote count: 3
has body: .html() returns the html as plain text, so you can either operate on the parent object: var $parent = $(this).parent(); $parent.find.('.button').attr('id', newValue); or you can operate on the text var html_var = $(this).parent().html(); //modify the text $(this).parent().html(html_var); //replace the parent html with the modified html
has comment: http://stackoverflow.com/comment/41344878

http://stackoverflow.com/a/26254112
has comment: http://stackoverflow.com/comment/41184936
has body: Use return json_encode($return_array); Instead of return $return_array;. Json encode returns key => value pair array . Also use dataType: "json" OR dataType: "jsonp" in ajax call.
score: 1
has comment: http://stackoverflow.com/comment/41184572
answers question: http://stackoverflow.com/q/26254048
upvote count: 1
has comment: http://stackoverflow.com/comment/41188505
type: Answer
has comment: http://stackoverflow.com/comment/41185038
downvote count: 0

http://stackoverflow.com/comment/41253325
comment on: http://stackoverflow.com/a/26291342
has text: It should match the first one in the stack, so just put the /api/item/query one before the /api/item/:id one. That said, it's not a great API to have multiple meanings for the same path. I'd probably rethink your endpoints to avoid that.
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/a/26280209
upvote count: 0
answers question: http://stackoverflow.com/q/26279916
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/41232272
has body: Add New This is the div!
type: Answer

http://stackoverflow.com/q/26226542
tagged with: javascript
has comment: http://stackoverflow.com/comment/41134140
has answer: http://stackoverflow.com/a/26226671
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/26226671
has title: How to get this script to return numbers 0-9 instead of 1-10
type: AnsweredQuestion
has body: I'm trying to get numbers 0-9 to shuffle into a random order. EX: 2,4,0,1,3,5,9,7,8,6... Currently it starts at 1 instead of 0. This is what I'm working with - (my knowledge of js is min.) &lt;script type="text/javascript" language="Javascript"&gt; function pick(n, min, max){ var values = [], i = max; while(i &gt;= min) values.push(i--); var results = []; var maxIndex = max; for(i=1; i &lt;= n; i++){ maxIndex--; var index = Math.floor(maxIndex * Math.random()); results.push(values[index]); values[index] = values[maxIndex]; } return results; } function go(){ var running = true; do{ if(!confirm(pick(10, 0, 9))){ running = false; } }while(running); } &lt;/script&gt; Thanks for the input...
type: Question
upvote count: 0
score: -2

http://stackoverflow.com/a/26246187
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41170970
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26245611
has body: If you can upgrade (at least 1.2.6 apparently), use one instead of on, otherwise unregister the handler manually: function unwrapElement() { element.off('$destroy', unwrapElement); // this could also be just element.parent().remove() instead element.parent().replaceWith(element); }
answers question: http://stackoverflow.com/q/26245611
upvote count: 1
type: Answer

http://stackoverflow.com/q/26196186
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41094902
upvote count: 1
has comment: http://stackoverflow.com/comment/41173340
tagged with: youtube-api
type: Question
linked to: http://stackoverflow.com/q/26128788
score: 1
has comment: http://stackoverflow.com/comment/41180301
duplicate of: http://stackoverflow.com/q/26128788
has title: YouTube API pause video on mouseleave
has body: I'm creating a function which inserts an YouTube video on hover and then on mouseeave the video is paused. The problem is that pause works only the first time. Than if you click on the video and then when you leave div video i not paused anymore. I have trying binding the moueleave event but it still dosn't work, Thanks JSFiddle: http://jsfiddle.net/z5vfja46/ html: js: var tag = document.createElement('script'), firstScriptTag = document.getElementsByTagName('script')[0]; tag.src = "https://www.youtube.com/player_api"; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; $(".video_wrap").on({ mouseenter: function () { player = new YT.Player($(this).children().attr('id'), { height: '240', width: '320', videoId: '-NschES-8e0', playerVars: { wmode: "transparent", controls: 0, showinfo: 0, rel: 0, modestbranding: 1, iv_load_policy: 3 //anottations }, events: { 'onReady': onPlayerReady } }); function onPlayerReady(event) { player.setVolume(0); event.target.playVideo(); } $(this).children().bind( "mouseleave", function() { player.pauseVideo(); }); } });
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 0

http://stackoverflow.com/comment/41163264
type: QuestionComment
has text: Using 0 or 1 milisecond on timeout usually performs better
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26242169

http://stackoverflow.com/q/26319089
score: 0
tagged with: functional-programming
answer count: 1
has comment: http://stackoverflow.com/comment/41313186
type: UnansweredQuestion
has body: I am trying to rewrite the _.where() that does this: where_.where(list, properties) Looks through each value in the list, returning an array of all the values that contain all of the key-value pairs listed in properties. I'm having trouble accessing the different objects within the array thats passed as properties to the where(). How do you access the values of objects in an array and itterate over them? This is what I have: var arr = [{title: "Cymbeline", author: "Shakespeare", year: 1611}, {title: "The Tempest", author: "Shakespeare", year: 1611}, {title: "Cymbeline", author: "steve", year: 1671}]; var newArr = []; var where = function (list, properties) { for (var i = 0; i &lt; list.length; i++){ console.log(list[i]); // just gives the array again?? if (list[i] == properties) {// this conditional should compare the values in arr and properties newArr.push(list[i]); // if the values in arr match those in properties then the respective objects get pushed to newArr } } return newArr; } console.log(where(arr, {author: "Shakespeare", year: 1611})); What I end up getting back is arr[] and an empty "[]" when newArr is returned at the end.
tagged with: object
tagged with: underscore.js
has title: Trying to rewrite _.where function in Underscore library
type: Question
has comment: http://stackoverflow.com/comment/41303546
has comment: http://stackoverflow.com/comment/41303796
has answer: http://stackoverflow.com/a/30128075
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/41218318
type: QuestionComment
type: Comment
has text: It's a good question. But I think the issue is not effect page view, don't I?
score: 0
comment on: http://stackoverflow.com/q/26270842

http://stackoverflow.com/comment/41231847
has text: I believe the name of the 'tool-tip' you refer to may be "auto-complete". I'd also try responding to the `change` event in addition to the `keyup` event.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26279679

http://stackoverflow.com/comment/41151615
comment on: http://stackoverflow.com/q/26236136
score: 0
has text: Both your jsons are valid. However if you wrote code to work with the 2nd one, of course your first one isn't going to get through it correctly.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26216540
has answer: http://stackoverflow.com/a/26217522
has answer: http://stackoverflow.com/a/26217618
favorite count: 0
type: UnansweredQuestion
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41115390
type: Question
has comment: http://stackoverflow.com/comment/41115527
answer count: 2
has title: Check if class is present if else add height to a div
tagged with: javascript
has body: What I'm trying to do is check if class exist. If present add height by 'X' px in another class if not add height by 'Y' px Not using Jquery. And it should be supported in IE8. document.getElementsByClassName is not supported in IE8 so used className.match but then again it started to get longer. My code below does not go past the 3rd JSBIN Any one with a short IE8 friendly code? window.onload = window.onresize = function heightResize () { var browserHeight = window.innerHeight; var present=document.getElementsByTagName('p'); alert(present.length); for (var i=0; i<present.length; i++) { if (present[i].className.match(/\bbuttons-container\b/)) { alert("Yes Present"); document.getElementsByClassName("boxcontent")[0].style.height = browserHeight -150 + "px"; } else { alert("Not Present"); document.getElementsByClassName("boxcontent")[0].style.height = browserHeight -200 + "px"; } } }; HTML First Para Second Paragraph Output Third Para Buttons

http://stackoverflow.com/a/26324532
downvote count: 0
has comment: http://stackoverflow.com/comment/41313612
has body: According to ECMA Script 5 specifications, The value of the prototype property is used to initialise the Prototype internal property of a newly created object before the Function object is invoked as a constructor for that newly created object. It is clear that prototype is just to initialize the Prototype property. When we create an object, Prototype is set as the constructor function's prototype object and the prototype chain is established. In your case, when you do var obj = function() {}; obj.prototype.x = 5; var instance1 = new obj(); the Prototype looks like this console.log(Object.getPrototypeOf(instance1)); # { x: 5 } (Yes, you can access the Prototype with Object.getPrototypeOf function) So, when JS Engine looks for x in instance1, it finds the value as 5 and since y is not defined, it uses undefined. In the second case, obj.prototype = {y: 6}; var instance2 = new obj(); you are changing the prototype object of obj, so that the new objects constructed with this functions will use the new object assigned to it. So, Prototype looks like this, for instance2 console.log(Object.getPrototypeOf(instance2)); # { y: 6 } That is why, instance2 couldn't find x in it, but y. To answer the updated question, EDIT: How would I go about changing the prototype of ALL the instances? You can change, the prototype of the old object with Object.setPrototypeOf, like this Object.setPrototypeOf(instance1, { y: 6 }); Since, this makes the Prototype of instance1 different from instance2, we can just update the constructor function's prototype object, like this delete obj.prototype.x; obj.prototype.y = 6; Now, we havn't changed the internal property of both instance1 and instance2. We can check that like this console.log(Object.getPrototypeOf(instance1) === Object.getPrototypeOf(instance2)); # true console.log(Object.getPrototypeOf(instance1) === obj.prototype); # true Note: The convention is to name the constructor functions with the initial letter a cap…
type: Answer
score: 7
upvote count: 7
accepted answer of: http://stackoverflow.com/q/26324395
answers question: http://stackoverflow.com/q/26324395
has comment: http://stackoverflow.com/comment/41314297
type: AcceptedAnswer

kinect
type: Tag
tags question: http://stackoverflow.com/q/26338110
tag name: kinect

http://stackoverflow.com/q/26212627
has body: I am looking for a script/library that I can use to apply a filter to some of my icon images. They are white and I want them to be black instead. I have some limitations: I can't create a new png for it I can't change the implementation (so I can't use other icons like FontAwesome etc) I must use the same &lt;img&gt; element so I cannot make use of &lt;canvas&gt;. So somehow I want the new, transformed image to have the exact structure as the replaced image. So far I have tried Filtrr and Caman but they use &lt;canvas&gt; elements. fabric.js does the same. Do you know any other method to achieve this? It must work in Firefox/Chrome/Safari so no IE. CSS is also accepted instead of JavaScript, but as I know and tested, using filter: invert in CSS does not work in Firefox. Thanks! Example: I don't know how useful an example can be in my situation, but here it is: I have this: &lt;div class="icon"&gt; &lt;img src="myicon.png" data-activepath="activemyicon.png"&gt; &lt;/div&gt; myicon.png is a white icon and I want to make it black in the browser. How can I achieve this (using CSS or JS) and keep the same HTML structure and elements? FIX: Please note that there are 2 answers that fixed this problem. Unfortunately I can only accept one answer. So here they are: the CSS version the JS version
tagged with: css
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41108691
score: 0
has comment: http://stackoverflow.com/comment/41108353
accepted answer: http://stackoverflow.com/a/26213982
type: Question
possible better answer: http://stackoverflow.com/a/26214107
has comment: http://stackoverflow.com/comment/41108100
has answer: http://stackoverflow.com/a/26214107
has comment: http://stackoverflow.com/comment/41108015
has comment: http://stackoverflow.com/comment/41107813
has comment: http://stackoverflow.com/comment/41108358
has comment: http://stackoverflow.com/comment/41114911
has title: I have a white icon - how to make it black without replacing it with CANVAS? It is a .png icon
tagged with: canvas
has comment: http://stackoverflow.com/comment/41107667
has comment: http://stackoverflow.com/comment/41108710
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26213982
has answer: http://stackoverflow.com/a/26214192
has answer: http://stackoverflow.com/a/26212746
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41110748

http://stackoverflow.com/comment/45679707
has text: @mireilleraad You'll get the CSV-file here: www.naturpark-aukrug.com/fileadmin/template/mapbox/csv/poi-npa.csv This is how I've done it: https://jsfiddle.net/Kelevra/tjz1ac19/20/ Please note that omnivore won't work with a link as a csv-path ( at least I couldn't get it work) so you need to recreate the fiddle localy where the csv-file is in some directory with your html/js file. it should work then.
type: Comment
comment on: http://stackoverflow.com/a/26995851
score: 0
type: AnswerComment

http://stackoverflow.com/q/26324954
accepted answer: http://stackoverflow.com/a/26355796
has comment: http://stackoverflow.com/comment/41314456
linked to: http://stackoverflow.com/q/20773306
tagged with: javascript
score: 7
linked to: http://stackoverflow.com/q/14645011
favorite count: 0
has body: I have a web application that opens multiple windows. The problem that I have is that when the parent window is closed/refreshed, the child windows remain opened. I've tried using onunload and onbeforeunload but none of them catches the window close event (in Chrome and Firefox). I have an array of windows but after refresh the reference to them is lost. Is there any other way to catch this event? This is my code related to closing windows (running closeAll() outside unload and onbeforeunload closes all my opened window, but not when the page is refreshed): window.unload = function() { closeAll(); } window.onbeforeunload = function() { closeAll(); } var closePopup = function(popup) { removePopup(popup); popup.close(); }; var closeAll = function() { for (var popup in _this.popups) { closePopup(_this.popups[popup]); } } This works only in Chrome but not in Firefox and IE (latest versions).
upvote count: 8
has answer: http://stackoverflow.com/a/26324983
has answer: http://stackoverflow.com/a/26355796
has comment: http://stackoverflow.com/comment/41314985
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26324983
has answer: http://stackoverflow.com/a/55601462
has title: Close all child windows when parent window is closed
downvote count: 1
has comment: http://stackoverflow.com/comment/41314477
type: Question
has answer: http://stackoverflow.com/a/34731530

http://stackoverflow.com/comment/41227513
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26276042
has text: @VitorinoFernandes it looks like the third dialog is partly there, with a class of just `dialog`, but no ID. jQuery UI itself doesn't add that class, so the OP must have.
score: 0

http://stackoverflow.com/a/26347260
score: 3
answers question: http://stackoverflow.com/q/26347088
has body: try this : if($(".lives_in_ccs").is(':checked')){ $("#orders_shipping_from option[value='MRW']").remove(); } Hope this helps :)
has comment: http://stackoverflow.com/comment/111834051
downvote count: 1
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41220995
has text: Change id of your html tag as donut1,donut2 etc....Then it works
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26271937
score: 0

http://stackoverflow.com/comment/107456230
type: Comment
comment on: http://stackoverflow.com/a/26244081
has text: Tip: if you dont want DOCTYPE, HTML and BODY wrapper around new html use `LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD` in `loadHTML()` so it would be `$s = new DOMXPath($d, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);`
type: AnswerComment
score: 0

http://stackoverflow.com/comment/62156049
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26456191
type: AnswerComment
has text: Is this code broken. When I check the demo, on smaller screen the slide is still there, it is just shown vertically ?

http://stackoverflow.com/a/26339633
answers question: http://stackoverflow.com/q/26339380
downvote count: 1
upvote count: 0
has comment: http://stackoverflow.com/comment/41347794
type: Answer
score: -1
has body: for e.g. $( document ).ready(function() { $("#fbhtmlImage .image_thumb").on('click',function(){ $(this).parent().find("label").click(); }); //For Facebook }); hope it will work as .live() is deprecated. For ref : http://api.jquery.com/on/
has comment: http://stackoverflow.com/comment/41341511

http://stackoverflow.com/q/26221034
type: AnsweredQuestion
downvote count: 3
has title: how to put a div on a replace in javascript
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26221247
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41123675
favorite count: 0
has comment: http://stackoverflow.com/comment/41123758
has comment: http://stackoverflow.com/comment/41123734
has body: HTML start reset JS: // 0/1 = start/end // 2 = state // 3 = length, ms // 4 = timer // 5 = epoch // 6 = disp el // 7 = lap count var t=[0, 0, 0, 0, 0, 0, 0, 1]; function ss() { t[t[2]]=(new Date()).valueOf(); t[2]=1-t[2]; if (0==t[2]) { clearInterval(t[4]); t[3]+=t[1]-t[0]; /*document.getElementById('lap').innerHTML+= ' '+(t[7]++)+' '+ format(t[1]-t[0])+' '+ format(t[3])+' ';*/ t[4]=t[1]=t[0]=0; disp(); } else { t[4]=setInterval(disp, 43); } } function r() { if (t[2]) ss(); t[4]=t[3]=t[2]=t[1]=t[0]=0; disp(); //document.getElementById('lap').innerHTML=''; t[7]=1; } function disp() { if (t[2]) t[1]=(new Date()).valueOf(); t[6].value=format(t[3]+t[1]-t[0]); var este = t[6].value=format(t[3]+t[1]-t[0]); document.title = este + " - O Cronometro"; var tempo = document.getElementById('disp').value; var tempo = $('#disp').text(tempo); } // * The function * here is the REPLACE*** function format(ms) { var d=new Date(ms+t[5]).toString() //.replace(/.*( [0-9][0-9]<\/div>:[0-9][0-9]:[0-9][0-9]).*/, '$1'); .replace(/.*([0-9][0-9]):([0-9][0-9]:[0-9][0-9]).*/, ' $1 , $2 '); //.replace(/.*([0-9][0-9]:[0-9][0-9]:[0-9][0-9]).*/, '$1'); var x=String(ms%1000); while (x.length<3) x='0'+x; d+='.'+x; return d; } function load() { t[5]=new Date(1970, 1, 1, 0, 0, 0, 0).valueOf(); t[6]=document.getElementById('disp'); //disp(); if (!window.opener && window==window.top) { document.getElementById('remote').style.visibility='visible'; } } function remote() { window.open( document.location, '_blank', 'width=800,height=350' ); return false; } Example: .replace(/.*("open div tag"[0-9][0-9]"close div tag":[0-9][0-9]:[0-9][0-9]).*/, '$1'); The function thus is showing the div tag for the User but I do not want this tag appears onscreen. thank you!
score: -3
accepted answer: http://stackoverflow.com/a/26221247

http://stackoverflow.com/comment/41444837
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26387654
has text: Thanks for the help and providing me sample codes. I have solved the problem by selecting proper audio driver while connecting. The sample code would help me to go further. Thanks again :)

http://stackoverflow.com/a/26218743
has body: According to https://github.com/gruntjs/grunt/issues/752 If you enable the es5 option for linting your Gruntfile with JSHint, this error should go away. Alternatively, just change grunt.file.delete to grunt.file['delete']
has comment: http://stackoverflow.com/comment/41163470
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26218322
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26218322

http://stackoverflow.com/a/26305272
type: AcceptedAnswer
downvote count: 0
has body: You can filter it listTableHeaders.filter(function(){ return !$(this).is('[class]'); }).remove();
type: Answer
answers question: http://stackoverflow.com/q/26305241
score: 3
accepted answer of: http://stackoverflow.com/q/26305241
upvote count: 3

http://stackoverflow.com/comment/41157057
type: QuestionComment
comment on: http://stackoverflow.com/q/26238765
has text: Even so, you should probably use `$(this).val()`, to avoid repeating the selector and be more efficient. Also, why use a partial match if you can do an exact match?
score: 0
type: Comment

http://stackoverflow.com/q/26327171
has comment: http://stackoverflow.com/comment/41320828
tagged with: memoization
possible better answer: http://stackoverflow.com/a/35407352
accepted answer: http://stackoverflow.com/a/26327486
has answer: http://stackoverflow.com/a/35407352
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41319839
has comment: http://stackoverflow.com/comment/41323663
linked to: http://stackoverflow.com/q/22578831
has comment: http://stackoverflow.com/comment/41318575
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41319976
linked to: http://stackoverflow.com/q/24488862
answer count: 2
downvote count: 0
tagged with: higher-order-functions
has title: Higher Order Internal Memoization In JavaScript does not Work
has answer: http://stackoverflow.com/a/26327486
has body: Context. Memoization is a functional technique operating over recursive functions with overlapping invocations aiming to optimize time performance by using an internal cache that remembers previous results with already used parameters. A typical use case is the fibonacci function. Below, it is shown a non memoized and memoized version of that function and an assisting function for timing purposes: function time (fn) { return function () { var before = Date.now(); var result = fn.apply(this, arguments); var after = Date.now(); return { value : result, time : after - before }; }; } var fib = function (n) { if (n &lt; 2) return n; else return fib(n-1) + fib(n-2); }; var mfib = function (n) { var cache = {}; var memoizefib = function (n) { if (n &lt; 2) return n; else { var k1 = JSON.stringify(n-1); var k2 = JSON.stringify(n-2); var v1 = k1 in cache ? cache[k1] : (cache[k1] = memoizefib(n-1)); var v2 = k2 in cache ? cache[k2] : (cache[k2] = memoizefib(n-2)); return v1 + v2; } }; return memoizefib (n); }; If now we test our functions we realize that memoization dramatically reduces execution time: (function test (n) { var tfib = time(fib); var tmfib = time(mfib); console.log(tfib(n)); // -&gt; { value: 433494437, time: 5780 } console.log(tmfib(n)); // -&gt; { value: 433494437, time: 1 } })(43); Problem. As it frequently happens in functional programming, memoization becomes a useful tool when applied at the higher order to allow defining a memoize function that can transform over a generic function fn. Typical solutions similar to the next one can be found on the Web [1][2][3]: function memoize (fn) { var cache = {}; return function () { var args = [].slice.call (arguments); var key = JSON.stringify(args); return key in cache ? cache[key] : cache[key] = fn.apply(this, args); (1) }; } fn.js - http://eliperelman.com/fn.js underscore - http://underscorejs.org Addy Osmani on Memoization - http://addyosmani.com/blog/faster-javascript-memoization Question. Nevertheless, surpri…
favorite count: 0
has comment: http://stackoverflow.com/comment/41324057
has comment: http://stackoverflow.com/comment/41320351

http://stackoverflow.com/q/26320255
answer count: 1
tagged with: angularjs
has title: Preserving the object key value ordering when it is pushed into array
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26320366
type: Question
has body: When elements in an object is ordered using filter and then pushed onto array it loses the ordering and uses alphabetical order of key how to preserve the ordering after inserting into array ? app.controller('MainCtrl', function($scope, $filter) { var bigArr = []; var arr = [ { "Type1" : "Canada", "ColPos" : 3 }, { "Type2" : "UK", "ColPos" : 1 }, { "Type3" : "US", "ColPos" : 2 }, { "Type4" : "Madagascar", "ColPos" : 0 }, ] var ordered = $filter('orderBy')(arr,'ColPos'); console.log(ordered); var obj = _.assign.apply(_, ordered); console.log(obj) bigArr.push(obj); console.log(bigArr); // ordering is lost }); Demo : http://plnkr.co/edit/sgFDVRrbrIXg2drUZzL3?p=preview
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26320366
score: 0

http://stackoverflow.com/a/26393559
answers question: http://stackoverflow.com/q/26268266
score: 0
has body: I was able to inject jQuery into the page but was not able to successfully determine the time when I could run jQuery code after that. DOMNodeInserted executes but probably in a different context than page DOM. MyExtensionJavaScriptClass.prototype = { run: function(arguments) { var my_awesome_script = document.createElement("script"); my_awesome_script.setAttribute("src","//code.jquery.com/jquery-1.11.0.min.js"); if (my_awesome_script.addEventListener) { my_awesome_script.addEventListener ('DOMNodeInserted', OnNodeInserted, false); } document.head.appendChild(my_awesome_script); function OnNodeInserted (event) { // event comes out undefined and $ is also undefined $(document).on('paste', function(e){ alert('You just pasted!') }); }
type: Answer

http://stackoverflow.com/q/26342245
favorite count: 0
has answer: http://stackoverflow.com/a/26342328
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Is there a way to find out whether a HTML-tagName comes in pair or alone (Standalone-Tag)? E.g. &lt;div&gt;&lt;/div&gt;, &lt;em&gt;&lt;/em&gt;, &lt;p&gt;&lt;/p&gt;, ... they come in pair, but &lt;br/&gt;, &lt;input&gt;, &lt;area&gt; ... are Standalone. I need a function which should find out if a HTML-Code snippet is entered correct. Therefore the function has to investigate among others which HTML-Element can be created with Standalone-Tag. Do you have any idea how can I find out if an HTML element is standalone? Except for example something like this: var myArray = [ list of Standalone-Tags ]; if(jQuery.inArray("test", myArray) != -1 ) { ... } Thanks.
has title: How can I find out whether a HTML-Tagname is Standalone
has comment: http://stackoverflow.com/comment/41346648
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41347135
score: 1
linked to: http://stackoverflow.com/q/15458876
accepted answer: http://stackoverflow.com/a/26342328
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/41346529
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26306819
has comment: http://stackoverflow.com/comment/41282726
has comment: http://stackoverflow.com/comment/41281748
tagged with: javascript
tagged with: jquery
has body: I am currently trying to add a bunch of elements to a list using javscript after querying from parse. I am able to get the full list if I don't add any click listeners, however if I do add click listeners, only the first 5 items appear in the list. Here is the code in my javascript file, it is called first in the html: if (!Parse.User.current()){ window.location.href = 'index.html'; } else { getParticipants(); } $( document ).ready(function() { $('#sign-out').click(function(){ Parse.User.logOut(); window.location.href = 'index.html'; }); }); function getParticipants (){ var Participants = Parse.Object.extend("Participants"); var query = new Parse.Query(Participants); query.ascending("patientID"); query.find({ success: function(results) { for (var i = 0; i &lt; results.length; i++) { var object = results[i]; var id = object.get("patientID"); $(".list-group").append("&lt;li class='list-group-item' id='" + id + "'&gt;" + id + "&lt;/li&gt;"); (function (id) { $('#' + object.get("patientID")).click(function (e) { e.preventDefault(); if (typeof(Storage) !== "undefined") { localStorage.setItem("patientID", id); } else { // Sorry! No Web Storage support.. } window.location = 'profile.html'; }); }(id)); } }, error: function(error) { alert("Error: " + error.code + " " + error.message); } }); }
score: 0
has comment: http://stackoverflow.com/comment/41281936
answer count: 1
accepted answer: http://stackoverflow.com/a/26306898
tagged with: parse-platform
has answer: http://stackoverflow.com/a/26306898
has comment: http://stackoverflow.com/comment/41281598
has title: Can't add to DOM content before page load Javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41281501
type: Question

ghostscript
tags question: http://stackoverflow.com/q/26206309
tag name: ghostscript
type: Tag

http://stackoverflow.com/comment/41308608
score: 0
type: Comment
has text: I ended up using ng-repeat-start to do it. A little bit hacky but works. Thanks!
type: AnswerComment
comment on: http://stackoverflow.com/a/26321127

http://stackoverflow.com/q/26198934
favorite count: 0
accepted answer: http://stackoverflow.com/a/26223842
has body: I'm generating a map with the route from and to places using the Google Maps Directions API, but how do I get the actual text directions with the javascript API? var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var mapOfDirections; directionsDisplay = new google.maps.DirectionsRenderer(); var center = new google.maps.LatLng(lat, lon); var mapOptions = { zoom:6, center: center } maps = new google.maps.Map(document.getElementById('main'), mapOptions); directionsDisplay.setMap(maps); var request = { origin:from, destination:to, travelMode:google.maps.TravelMode.DRIVING }; directionsService.route(request, function(result, status){ if(status==google.maps.DirectionsStatus.OK) directionsDisplay.setDirections(result); });
type: AnsweredQuestion
has title: get actual directions from Google Maps Directions API
downvote count: 1
type: Question
tagged with: google-maps
upvote count: 0
answer count: 1
tagged with: javascript
score: -1
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26223842
has comment: http://stackoverflow.com/comment/41084327

http://stackoverflow.com/a/34658064
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26257268
score: 5
has body: If using a Donught Chart, and you want to prevent user to trigger your event on click inside the empty space around your chart circles, you can use the following alternative : var myDoughnutChart = new Chart(ctx).Doughnut(data); document.getElementById("myChart").onclick = function(evt){ var activePoints = myDoughnutChart.getSegmentsAtEvent(evt); /* this is where we check if event has keys which means is not empty space */ if(Object.keys(activePoints).length &gt; 0) { var label = activePoints[0]["label"]; var value = activePoints[0]["value"]; var url = "http://example.com/?label=" + label + "&amp;value=" + value /* process your url ... */ } };
upvote count: 5

http://stackoverflow.com/comment/41108647
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26212190
has text: you should not use because its on textbox you should use button or submit
type: AnswerComment

http://stackoverflow.com/comment/41130848
has text: Looks like that's correct. It's basically the same way you would notate arrays in Javascript.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26224389

http://stackoverflow.com/comment/41327523
type: Comment
comment on: http://stackoverflow.com/a/26331812
type: AnswerComment
score: 0
has text: it should be: return self.selectedClient().clientStrategies();

http://stackoverflow.com/a/26255681
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26203420
score: 1
answers question: http://stackoverflow.com/q/26203420
type: Answer
upvote count: 1
has body: So while I really appreciated everyone's input, I thought, for the record, I would no so much add my own answer, but detail a little bit some of the answers and describe what I ended up doing. Now as Quentin suggests, but without making it really clear, is that regardless of whether the data is passed via the URL or in anything over form, eventually if this data (text) gets displayed to the browser's page, it will of course be HTML text, where in HTML, as he said, every \n, is treated as a space. Thus regardless of what you are trying to do, if you get something like this in your text editor: this is a test on two lines It will be rendered like that in the browser: this is a test on two lines. Again, that's true regardless of the way you process the data (in my case passing it on to a PHP page using AJAX and the post method. Eventually the PHP page returns the content of that text to the JS script, and this text becomes HTML, thus the two lines are displayed on one line. SOLUTION: I am sure they are other ways, but the one I used was indeed, as suggested, to parse the string and do the formatting of that string using HTML tags. So literarily something like this: var output_text = ''; for (i = 0; i &lt; text.length; ++i) { if (text.charAt(i) == '\n') { output_text += '&lt;br/'&gt;; } else if ... } Then I passed output_text to the PHP page. If it's not a problem for the PHP text to receive the an HTML encoded string then that's okay, and worse case, if you need to also store the string before the HTML encoding, then you can always pass the 2 strings to the PHP page via POST (the 'text' and 'output_text' in my example). PS: having the question down voted wasn't necessary, and if when you do so, please explain why.

http://stackoverflow.com/q/26219422
favorite count: 0
has comment: http://stackoverflow.com/comment/41120735
tagged with: ajax
has comment: http://stackoverflow.com/comment/41120798
has answer: http://stackoverflow.com/a/26219475
type: UnansweredQuestion
has body: I've been trying for hours to get the data form an array of checkboxes with the same name. &lt;input type="checkbox" name="node"/&gt; var selectedValues = []; $(document.getElementsByName("node")).each(function () { selectedValues.push($(this).checked); }); $.ajax({ url: "/Summary/Test", type: "POST", data: selectedValues, traditional: true }); public void Test(string [] nodes) { } What am I doing wrong here? I cant figure out why it's skipping that line.
has comment: http://stackoverflow.com/comment/41121601
has title: Post values form an array of checkboxes
has comment: http://stackoverflow.com/comment/41120640
tagged with: model-view-controller
has comment: http://stackoverflow.com/comment/41121788
has comment: http://stackoverflow.com/comment/41120613
linked to: http://stackoverflow.com/q/6403562
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41120687
type: Question
has answer: http://stackoverflow.com/a/26219594
has comment: http://stackoverflow.com/comment/41120400
tagged with: javascript
has comment: http://stackoverflow.com/comment/41120757
answer count: 2
has comment: http://stackoverflow.com/comment/41120442
downvote count: 0

http://stackoverflow.com/comment/45220248
comment on: http://stackoverflow.com/a/26254086
has text: Can you provide an example of when a race condition would occur?
score: 10
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26291095
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26291009
score: 3
has body: Providing the HTML formatting is being saved into your db/datasource displaying it as follows &lt;div ng-bind-html="rule.message" &gt; will obey the formatting. You also need to include angular sanitize module into your project. EDIT After reading your question I again I think I misunderstood it a bit so here is a more detailed answer. If you'd like to see how to display a HTML encoded string properly in a div take a look at this plunk http://plnkr.co/edit/cPSfL8Y0WWpTVxWo4OyR?p=preview If you would like to display HTML encoded string in a textarea while keeping formatting - that is not possible - textarea doesn't deal with HTML as far as I know. If you still want to display HTML encoded string in a 'textarea` with formatting you need to use something like this http://textangular.com/ - it replaces your textarea with a div that looks and behaves like textarea hence why it's able to display proper HTML formatting
type: AcceptedAnswer
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26291009

client-server
tags question: http://stackoverflow.com/q/26225685
tags question: http://stackoverflow.com/q/26294656
type: Tag
tag name: client-server

http://stackoverflow.com/comment/41383106
type: AnswerComment
score: 0
type: Comment
has text: Ma2s I noticed that in some cases that solution may freeze the browser when you click on the close button. So, if you need just send me a message here and i'll get a solution for ExtJS4 (my bad, I was looking for extjs problems and didnt notice you also tagged ExtJs4)
comment on: http://stackoverflow.com/a/26347691

http://stackoverflow.com/comment/41291721
comment on: http://stackoverflow.com/q/26312538
score: 0
has text: HTML5 session storage?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41265268
type: Comment
score: 0
has text: I was under the impression that I needed a minimum of 5. I have taken out the Java and PHP tags but it may well be caused by a coding issue and the Analytics code is written in JS.
type: QuestionComment
comment on: http://stackoverflow.com/q/26298028

http://stackoverflow.com/q/26344294
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/41351205
tagged with: http://stackoverflow.com/tag/json
has title: Sorting data AngularJS / NodeJS / MongoDB
type: Question
tagged with: javascript
score: 0
tagged with: mongodb
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41350283
has body: I have more than 25000 data in a collection so I have to optimize for the front-end. First with node JS, I did a pagination for the rest API: app.get('/api', function(req, res, next) { Image.paginate({}, req.query.page, req.query.limit, function(err, pageCount, articles, itemCount) { if (err) return next(err) res.format({ html: function() { res.status('articles').send({ articles: articles, pageCount: pageCount, itemCount: itemCount }) } }) }) });app.listen(3000); So i can access my data with: localhost:3000/page=1&amp;limit=5 localhost:3000/page=2&amp;limit=5 ... But I would like to be able to search by id in all the JSON I have: localhost:3000/id=[search by id] because, in my JSON I have for each data: "_id":"542e65368a1cec1227ae2bac", "_id":"542e66b78a1cec1643e0f032", ... How I can to do that? Thanks for your help!

http://stackoverflow.com/a/26241284
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41162374
has body: Deepak Here is the plnkr with the solution http://plnkr.co/edit/69Beli?p=preview. Instead of updating the $scope.userData.username directly and bypassing the parser pipeline of 'model to view', use jQuery to update the input field and trigger the 'change' event and use the 'view to model' pipeline provided by Angular. $timeout(function(){ jQuery("[name=username]").val('$#deepak'); jQuery("[name=username]").trigger('change'); }, 5000); Another plnkr http://plnkr.co/edit/Zct92r with $render implemented. This is for 'model to view' pipeline, $render is invoked after $parser and setting the styles based on errors. controller.$render = function() { console.log('in render'); iAttrs.$set('value', controller.$viewValue); if (controller.$invalid &amp;&amp; controller.$viewValue.length !== 0) { iElm.css("border", "1px solid red"); } else if (controller.$viewValue.length === 0) { iElm.css("border", "1px solid gold"); } else { iElm.css("border", "1px solid green"); } }; Both solution feels like a hack and $render feels more so. Whatever is set in $render, has to be compensated in $parser and undone.
answers question: http://stackoverflow.com/q/26222150
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41480720
score: 0
type: Comment
has text: One tiny thing -- the single quotation mark seems to be okay, but I get a parsing error w/ the double-quotation mark.
type: AnswerComment
comment on: http://stackoverflow.com/a/26229012

http://stackoverflow.com/q/26266036
has comment: http://stackoverflow.com/comment/41207131
type: Question
has answer: http://stackoverflow.com/a/26266248
tagged with: javascript
has comment: http://stackoverflow.com/comment/41206937
score: 0
answer count: 2
tagged with: marionette
tagged with: web
tagged with: jquery
has answer: http://stackoverflow.com/a/26267346
has comment: http://stackoverflow.com/comment/41207014
tagged with: backbone.js
has body: I'm trying to override Backbone.Model constructor with my own, in order to be able to pass my parameters from outside and not as a created-object. here is my code: var Video = Backbone.Model.extend({ constructor : function (videoUrl,imageSource,title,rating,description,starsImageSource){ this.videoUrl = videoUrl; this.imageSource = imageSource; this.title = title; this.rating = rating; this.description = description; this.starsImageSource = starsImageSource; Backbone.Model.apply(this, arguments); } }); when trying to enter new Video("www.yahoo","coins.jpg","Yahoo",4,"hhhh","5stars.png") the following error appear: TypeError: invalid 'in' operand obj here is my includes: thanks!
type: UnansweredQuestion
has title: Backbone: Unable to override constructor
has comment: http://stackoverflow.com/comment/41207034

http://stackoverflow.com/comment/41182624
comment on: http://stackoverflow.com/q/26252296
type: QuestionComment
type: Comment
score: 1
has text: What is your question exactly?

http://stackoverflow.com/q/26321810
type: AnsweredQuestion
score: 1
tagged with: hybrid-mobile-app
has answer: http://stackoverflow.com/a/28462646
has comment: http://stackoverflow.com/comment/45250961
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I am working on a hybrid app and having a problem while testing in Android (4.4). I am using Ionic (AngularJS+Cordova). I have searched high and low for the answer to this problem to no avail. I am trying to make it so that when a text box has focus the mobile keyboard is set to capitalize the first letter. I DO NOT want it to only appear capitalized (text-transform), but actually have a capitalized value, but only if the user wants that. It's almost like I want the shift key to get pressed automatically whenever a text input gets focus.
has title: How to set set Android keyboard to capitalize first letter in Mobile Hybrid app
favorite count: 0
possible better answer: http://stackoverflow.com/a/72150970
accepted answer: http://stackoverflow.com/a/28462646
has answer: http://stackoverflow.com/a/72150970
tagged with: android
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
upvote count: 1
has comment: http://stackoverflow.com/comment/45230399

http://stackoverflow.com/q/26202736
tagged with: canvas
has comment: http://stackoverflow.com/comment/41089328
has comment: http://stackoverflow.com/comment/41092773
answer count: 1
tagged with: colors
has title: Getting the RGB value of image for colour wheel
has answer: http://stackoverflow.com/a/26205122
accepted answer: http://stackoverflow.com/a/26205122
type: AnsweredQuestion
type: Question
has body: I am trying to grab the RGB value from a click on a colour wheel image. Now i am trying to grab the RGB from this Colour wheel image below without using canvas getImageData. How can i do this without canvas? With canvas you can run. $('#picker').click(function(e) { // mouse move handler // get coordinates of current position var canvasOffset = $(canvas).offset(); var canvasX = Math.floor(e.pageX - canvasOffset.left); var canvasY = Math.floor(e.pageY - canvasOffset.top); alert("canvasX " + canvasX + " canvasY " + canvasY); // get current pixel var imageData = ctx.getImageData(canvasX, canvasY, 1, 1); var pixel = imageData.data; alert(JSON.stringify(pixel)); }); I cannot use canvas for this only javascript can anyone tell me the best way to getImageData from a image would i need to build a rgb grid with a for loop over the top and work out the selected pixel from the x and y value and then match it. Really stumped on where to start any help?
tagged with: javascript
tagged with: image
score: 0

http://stackoverflow.com/a/58339378
has body: function postYourAdd () { var iframe = $("#forPostyouradd"); iframe.attr("src", iframe.data("https://www.google.com/")); } OPEN
type: Answer
answers question: http://stackoverflow.com/q/26285955
score: 0

http://stackoverflow.com/comment/41299151
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26316564
has text: This answer works, but if your intention is to just put text into a DOM node, you should use `innerText` instead of `innerHTML`. It's a good habit that may save you from code-injection attacks in the future, even though it doesn't matter in this example.
type: AnswerComment

http://stackoverflow.com/q/26248461
type: AnsweredQuestion
has title: New to JavaScript RegEx - Selecting Middle Word from Three-Word String
downvote count: 0
has answer: http://stackoverflow.com/a/26248520
score: 1
has answer: http://stackoverflow.com/a/26249155
accepted answer: http://stackoverflow.com/a/26249155
has answer: http://stackoverflow.com/a/26248503
type: Question
has comment: http://stackoverflow.com/comment/41211273
has answer: http://stackoverflow.com/a/26248512
tagged with: javascript
upvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26248512
has body: I am very new to JavaScript's RegExp library, and need help selecting the middle word from a three-word string. For example: Saturday October 1 would return October. My (feeble) attempt was \s.*\s, but this returned (space)October(space). However, I need the spaces to be omitted from the match. Any help is appreciated! Thanks
tagged with: regex
has comment: http://stackoverflow.com/comment/41174954
answer count: 4

http://stackoverflow.com/q/26237814
has comment: http://stackoverflow.com/comment/41159995
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/41158437
tagged with: javascript
tagged with: jquery
score: 4
answer count: 2
linked to: http://stackoverflow.com/q/18499909
has title: Debugging AngularJS Internet Explorer Lock-up
has comment: http://stackoverflow.com/comment/41156590
favorite count: 0
has comment: http://stackoverflow.com/comment/41156395
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41467399
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41161045
upvote count: 4
has answer: http://stackoverflow.com/a/26289743
has comment: http://stackoverflow.com/comment/41161840
tagged with: performance
has answer: http://stackoverflow.com/a/26284380
has body: I've got a problem with IE10 that I can duplicate readily. After bouncing around in my app through a few pages, IE entirely locks up (no "long running script" warning, just entirely frozen). I have to kill it from the Task Manager. I've disabled all add-ons and have a clean slate. I'm running on a sizeable workstation (Win7, 16GB ram, i7, yadda yadda). It doesn't freeze in Chrome or Firefox. Only IE10 and IE11. About my app I'm integrating with an industrial control system to show the active status of my system. I have a lot of XHR polling going on (will be moving to WebSocket, but for now, this is easy to integrate with my API). Refreshing data from an endpoint every 500ms, which updates a bunch of fields on the page. When the app isn't frozen, it's nice and snappy to navigate through. Can't find any specific condition that causes the freeze. At any given time, my app has between 75 and 400 $watches (counted using this answer). Currently running AngularJS v1.3.0-rc.4. Had similar lockups on 1.2.25. So, my question How do I even go about debugging this? I've tried leaving F12 Developer Tools open, and nothing gets outputted to the console. Running script profiler (Batarang not available in IE) shows that I spend about 200ms (inclusive) every 10s in the $digest. What do I try next?
downvote count: 0

http://stackoverflow.com/q/26307545
linked to: http://stackoverflow.com/q/5908466
answer count: 1
has body: I have a javascript object: function getSearchBO() { var individual = ($('#individual').attr('checked') == 'checked') ? "true" : "false"; var organization = ($('#organization').attr('checked') == 'checked') ? "true" : "false" var enrollmentId = $('#enrollmentId').attr('value').trim(); var medicareId = $('#medicareId').attr('value').trim(); var npi = $('#npi').attr('value').trim(); var contractId = $('#contractId').attr('value').trim(); var firstName = $('#firstName').attr('value').trim(); var lastName = $('#lastName').attr('value').trim(); var ssn = $('#ssn').attr('value').trim(); var dob = $('#dob').attr('value').trim(); var licenseNumber = $('#licenseNumber').attr('value').trim(); var licenseState = $('#licenseState').attr('value').trim(); var specialtyType = $('#specialtyType').attr('value').trim(); var licenseExpirationDate = $('#licenseExpirationDate').attr('value') .trim(); var businessName = $('#businessName').attr('value').trim(); var ein = $('#ein').attr('value').trim(); var organizationType = $('#organizationType').attr('value').trim(); var ciy = $('#ciy').attr('value').trim(); var state = $('#state').attr('value').trim(); var zipCode = $('#zipCode').attr('value').trim(); var startDate = $('#startDate').attr('value').trim(); var endDate = $('#endDate').attr('value').trim(); var searchBO = { "individual" : individual, "organization" : organization, "enrollmentId" : enrollmentId, "medicareId" : medicareId, "npi" : npi, "contractId" : contractId, "firstName" : firstName, "lastName" : lastName, "ssn" : ssn, "dob" : dob, "licenseNumber" : licenseNumber, "licenseState" : licenseState, "specialtyType" : specialtyType, "licenseExpirationDate" : licenseExpirationDate, "businessName" : businessName, "ein" : ein, "organizationType" : organizationType, "ciy" : ciy, "state" : state, "zipCode" : zipCode, "startDate" : startDate, "endDate" : endDate } return searchBO; } SearchBO.java import java.io.Serializable; public class SearchBO implements Serializable { private Str…
tagged with: ajax
has title: JQuery datatable passing JSON to Spring controller, got error 400 Bad Request
has answer: http://stackoverflow.com/a/26342470
type: UnansweredQuestion
tagged with: spring-mvc
tagged with: java
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/26196822
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26196896
type: AnsweredQuestion
score: -4
tagged with: wordpress
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/26196896
downvote count: 4
upvote count: 0
answer count: 1
has body: I am wanting to add a Webpage (1 page) into my domain name that has WordPress installed. I want to view my page in mywordpressite.com/page1. I already have my html, css, and JavaScript files ready I just need to know HOW I can view the page in WordPress. Information like where to add the files would be great. Thank you, Abraham G.
tagged with: javascript
favorite count: 0
has title: How to upload my webpage files into wordpress?
has comment: http://stackoverflow.com/comment/41081815

http://stackoverflow.com/q/26253959
tagged with: textarea
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: tinymce
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
has body: I am trying to load tinyMCE editor into div , on ajax call. When 'add' button clicks ,first time it loads text area with toolbars. But from second time onwards , it appends textarea to the previously loaded textarea , and tool bar at the proper. First click : Second click : here is the code : add.php <?php $id=$_POST['id']; ?> <textarea style="width: 300px; height: 100px;" id="area<?php echo $id;?>" name="value[]"> why it is not appending properly.whats wrong ?
score: 1
type: Question
linked to: http://stackoverflow.com/q/14971384
downvote count: 0
tagged with: javascript
has title: TinyMCE editor not loading properly
has comment: http://stackoverflow.com/comment/41200264

http://stackoverflow.com/q/26339484
has answer: http://stackoverflow.com/a/26339638
score: 0
tagged with: iframe
tagged with: triggers
type: Question
has body: I have two different pages: the main page and the second page (that will be displayed in the main page as an iFrame). The fact is that I cannot edit the main page, except from the iFrame href link. What I want to do is to manually trigger the iFrame "onLoad" event in the main page, by using jQuery in the second page. This is getting really hard cause of the impossibility to edit the main page, and the only thing I managed to do is to manually trigger the "ready" event on the second page, but this is not related to the "onLoad" event, unfortunately. Any help would be greatly appreciated. Thanks in advance.
tagged with: javascript
has title: Manually trigger onLoad event of iFrame
linked to: http://stackoverflow.com/q/4249809
answer count: 1
has comment: http://stackoverflow.com/comment/41341612
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41344659
has text: @PaulRoub Oops, fixed.
type: AnswerComment
comment on: http://stackoverflow.com/a/26341244
score: 0
type: Comment

http://stackoverflow.com/q/26284090
upvote count: 0
accepted answer: http://stackoverflow.com/a/26284136
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has answer: http://stackoverflow.com/a/26284136
downvote count: 1
type: Question
type: AnsweredQuestion
has body: I am converting the content of some tutorials and extracting the html tags. I made this regex: /&lt;html\&gt;(?!html)([\s\S]*)&lt;\/html\&gt;/ trying to make it capture just the content of the first HTML group, but it captures everything untill the last html, despite my (maybe bad placed) negative lookahead. What did I miss here? (live example) This is text &lt;html&gt; &lt;div&gt; some content &lt;/div&gt; &lt;/html&gt; This is more text &lt;html&gt; &lt;div&gt; some content &lt;/div&gt; &lt;/html&gt;
possible better answer: http://stackoverflow.com/a/26284163
has title: regex capturing all content instead of just untill first defined string
has answer: http://stackoverflow.com/a/26284163
score: -1
answer count: 2

http://stackoverflow.com/comment/41212166
type: QuestionComment
has text: please provide a fiddle
score: 0
comment on: http://stackoverflow.com/q/26268780
type: Comment

http://stackoverflow.com/comment/41130246
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26222357
has text: duplicate: http://stackoverflow.com/q/25346522/1771795

http://stackoverflow.com/q/26335917
type: UnansweredQuestion
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26967271
tagged with: parse-cloud-code
score: 0
has title: Decrease Parse Push Requests with Array
has body: I'm currently using a Parse Cloud Code Background Job to notify users when a new missing pet is found in their specified radius. For example Pet XYZ is gone missing all users who have Push Enabled and are within their specified radius will be getting the push notification of the new missing pet. My main problem now is, that if there is a lot of users near the missing pet that the push notifications will exceed the API Request limit of parse since I'm currently sending them one at a time. How could I improve this? I was thinking maybe using an array with all the Users_Ids which should be getting the notification (Text for every Pet is the same) Here's my (working) code so far: Main Job Function which is checking for new pets Parse.Cloud.job("pushRadius", function(request, response) { Parse.Cloud.useMasterKey(); console.log('pushRadius'); var Pet = Parse.Object.extend("Pet"); var petQuery = new Parse.Query(Pet); petQuery.equalTo("initialPushSent", false); petQuery.equalTo("status", "missing"); petQuery.equalTo("deleted", false); petQuery.find().then(function(pets) { console.log("found " + pets.length + " pets"); var promises = []; _.each(pets, function(pet) { promises.push(checkUsersForPet(pet)); Parse.Cloud.useMasterKey(); pet.set("initialPushSent", true); pet.save(); }); return Parse.Promise.when(promises); }).then(function(obj) { console.log('All Pets checked'); }, function(error) { console.log('whoops, something went wrong ' + error.message); }); }); Get Users in range for each found pet in the main function function checkUsersForPet(pet){ console.log("check Pet" + pet.id); var petLocation = pet.get("lastSeenLocation"); var query = new Parse.Query("User"); query.withinKilometers("lastLocation", petLocation, 50); query.equalTo("pushActivated", true) query.find().then(function(users) { console.log("found " + users.length + " users for pet " + pet.id); var promises = []; _.each(users, function(user) { if (petLocation.kilometersTo(user.get("lastLocation")) &lt;= user.…
tagged with: parse-platform

http://stackoverflow.com/a/26339914
downvote count: 0
score: 1
has body: Sure can! Your inner directive has isolated scope, so can't see anything outside of itself, but you can pass in the function to your directive with the '&amp;' binding, so your directive might look something like: &lt;my-directive foo="func()"&gt;&lt;/my-directive&gt; I've done you a fiddle here.
type: AcceptedAnswer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26339228
answers question: http://stackoverflow.com/q/26339228
type: Answer

http://stackoverflow.com/a/26236216
has body: I believe the easiest alternative, if you don't use Tableau Server, is to export your workbook as .twbx to share with other people, who will be able to open the file with Tableau Reader (which is free). You can check Tableau JS API. I don't know it too well, but I guess it may not give what you need. http://www.tableausoftware.com/new-features/javascript-api
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26227032
accepted answer of: http://stackoverflow.com/q/26227032

excel
tags question: http://stackoverflow.com/q/26291171
tags question: http://stackoverflow.com/q/26260971
tag name: excel
tags question: http://stackoverflow.com/q/26247985
tags question: http://stackoverflow.com/q/26289566
tags question: http://stackoverflow.com/q/26323933
tags question: http://stackoverflow.com/q/26301811
type: Tag
tags question: http://stackoverflow.com/q/26274531
tags question: http://stackoverflow.com/q/26335252
tags question: http://stackoverflow.com/q/26350291

http://stackoverflow.com/q/26335428
has answer: http://stackoverflow.com/a/31620224
has answer: http://stackoverflow.com/a/26336149
score: 1
has body: I like the Array.prototype.map method, and some time ago I came across a use of it I didn't expect. var xargByID = { a: 1, b: 2 }; Array.prototype.map.bind(xargByID)(function (xarg) { }); I don't know how Array.prototype.map internally works so I have to ask, is it reliable? Might it break with time?
answer count: 3
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26335854
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has title: Is Array.prototype.map.bind reliable to use with objects?
type: Question

http://stackoverflow.com/comment/41245295
type: Comment
type: QuestionComment
score: 0
has text: @tymeJV Nothing, even console.log('foo') instead of alert fails
comment on: http://stackoverflow.com/q/26286342

http://stackoverflow.com/comment/41310784
type: Comment
comment on: http://stackoverflow.com/a/26322925
has text: Well, in general I agree that big regexps are hard to read and maintain, but one could also use XRegExp, which allows you to comment them, add white space, and write them on multiple lines.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26288839
tagged with: angularjs
has title: Loop over a reference object multiple times to copy its properties to other objects in Javascript/Angularjs
has body: Let's say I have an array of objects called arr1: [{a:1, b:2, c:3, type:1}, {c:1, type:2}, {d:1, e:2, type:2}] The objects in it share a property called 'type' with other objects in the array arr2: [{d:1, e:2, type:1}, {a:1, b:2, type:2}] How can I refer to the 'type' property to copy arr2's remaining properties into arr1? The desired result would be: [{a:1, b:2, c:3, d:1, e:2 type:1}, {a:1, b:2, c:1, type:2}, {a:1, b:2, d:1, e:2, type:2}] When I use something like angular.extend([], arr1, arr2), it only copies arr2's properties into the first 2 objects in arr1 (the 3rd object doesn't get love). What am I missing? Advanced thanks to all.
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26289906
upvote count: 1
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26289906
favorite count: 0

http://stackoverflow.com/comment/41284722
has text: I did that but it will only display "One with the elements" neither of the other two work, and it does it without being checked.
comment on: http://stackoverflow.com/q/26308133
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26229467
type: Answer
accepted answer of: http://stackoverflow.com/q/26225402
has body: You've two issues within the animation. The simplest is duration, it can't per the SVG specification begin with a . so flash.setAttributeNS(null, 'dur', '.5s'); is strictly speaking not valid and Firefox rejects it. I believe there are plans to change the SVG specification to match Chrome's laxer behaviour but until that happens write it as flash.setAttributeNS(null, 'dur', '0.5s'); Secondly your main issue is that once you run the animation the document timeline goes from 0 to 5.5 seconds (that's how long all your animations take). The next time you create the animation, the document timeline is therefore at 5.5 seconds and the initial animation doesn't run because it's in the past as it's supposed to start at 0s. You could solve this either by a) calling setCurrentTime to reset the timeline to 0, or b) having the initial animation trigger from the button press event.
has comment: http://stackoverflow.com/comment/41160952
answers question: http://stackoverflow.com/q/26225402
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26276469
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26276830
has body: I show loading message after form submit like this: &lt;div id="loading" style="display:none;"&gt;&lt;img class='image-widthauto' src="/img/Progressbar.gif" /&gt;&lt;/div&gt; &lt;div id="content-alert"&gt;&lt;/div&gt; &lt;form id="login" method="POST" action="" onsubmit="$('#loading').show();"&gt; ..... //input &lt;/form&gt; i validate my form using jquery validation plugin: $(document).ready(function () { $("#login").validate({ errorElement: "div", errorPlacement: function(error, element) { error.appendTo("div#content-alert").addClass('alert alert-danger'); }, rules: { name: { required: true, minlength: 6, alpha: true, }, }, messages: { name: { required: "requied message", minlength: "6 character" }, } }); }); Now, in form submit i see loading message and error box of validation(submit empty form value). i need to show loading message when my form not have a error using validation plugin. how do fix this ?
has answer: http://stackoverflow.com/a/26276544
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26276560
answer count: 3
tagged with: forms
upvote count: 1
has answer: http://stackoverflow.com/a/26276560
accepted answer: http://stackoverflow.com/a/26276544
tagged with: javascript
tagged with: jquery
has title: jquery show/hide div after form validation
type: AnsweredQuestion
tagged with: validation

http://stackoverflow.com/comment/41331557
has text: @Winestone - It won't make the page "crash".
score: 0
comment on: http://stackoverflow.com/q/26334108
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26318138
accepted answer: http://stackoverflow.com/a/26318304
has comment: http://stackoverflow.com/comment/41301871
favorite count: 0
score: 6
has body: I can't find the documentation on what are the parameters for the always() method. Right now, I'm just using: $.post("foo.do", { ... }, function(data) { ... }).fail(function(jqXHR, textStatus, errorThrown) { ... }).always(function() { ... });
upvote count: 7
type: AnsweredQuestion
has title: What are the parameters sent to .always in jQuery?
downvote count: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26318304

http://stackoverflow.com/comment/41166310
comment on: http://stackoverflow.com/a/26243614
has text: It's not scripts "later on the same page", it's scripts called _after the DOM ready event_. Anything called in between will fail because `myApp.foo` will be `undefined`.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41318570
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26327131
type: Comment
has text: You are absolutely right. I guess I'll have to accept your answer as best solution but could you do me a favor and edit your fiddle so that it includes another hr divider before the navigation? I updated the code in my original post accordingly.

http://stackoverflow.com/a/26198973
has body: Your issue is that you're reusing the same xhrs variable for all your ajax calls. Thus all the calls in play at once can't find the xhrs variable that belongs to their specific request when the onreadystatechange event fires. Thus, they all end up looking at the xhrs.readyState from the last request so you only ever see the last request complete. You should be able to switch to using this to refer to the request who generated the onreadystatechange event: for(i = 0; i &lt;= 735; i += 15) { var xhrs = new XMLHttpRequest(); xhrs.open("get", 'http://fakeURL.com/' + i, true); xhrs.onreadystatechange = function() { if (this.readyState == 4) { $(this.responseText).find('a').each(function() { var url = $(this).attr('href'); console.log(url); }); } } xhrs.send(); } As others have said, if $ indicates that you're using jQuery, then jQuery.ajax() would likely be a lot easier.
upvote count: 1
answers question: http://stackoverflow.com/q/26198450
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41299205
comment on: http://stackoverflow.com/a/26316246
type: AnswerComment
type: Comment
has text: I cant believe I was so dumb! alright. Here you go ;)
score: 0

http://stackoverflow.com/q/26350345
downvote count: 0
answer count: 1
favorite count: 0
tagged with: ajax
has body: I try to change the onreadystatechange callback. My Javascript looks like this (function() { var open_original = XMLHttpRequest.prototype.open; var send_original = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.open = function(method, url, async, unk1, unk2) { // console.log(url); open_original.apply(this, arguments); }; XMLHttpRequest.prototype.send = function(data) { this.onreadystatechange = function() { console.log('asdasdh adzl8 ada'); } send_original.apply(this, arguments); }; })(); The anonymous function never gets called. Why?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41363293
has comment: http://stackoverflow.com/comment/41361322
has comment: http://stackoverflow.com/comment/41363356
tagged with: hook
has title: Javascript change XMLHttpRequest onreadystatechange callback
type: Question
has comment: http://stackoverflow.com/comment/41361394
has comment: http://stackoverflow.com/comment/41361554
tagged with: javascript
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/26370750
has comment: http://stackoverflow.com/comment/41361386
has comment: http://stackoverflow.com/comment/41361312
linked to: http://stackoverflow.com/q/7908895

http://stackoverflow.com/a/26238554
answers question: http://stackoverflow.com/q/26238553
type: Answer
upvote count: 1
has body: First, you will need to ensure you handle complete lines from stdout, which may give fragments between lines: var acc = ''; child.stdout.setEncoding('utf8'); // get strings rather than buffers child.stdout.on('data', function(data){ // when output is written by child // split lines, including linebreaks: data.split(/(\r?\n)/).forEach(function(frag) { if (frag == '\r\n' || frag == '\n') { // if linebreak, console.log(filterAnsi(acc, width)); // output filtered completed line acc = ''; // clear accumulator line } else { // if not linebreak, acc += frag; // add fragment to accumulator } }); }); Next the filter itself: // Crop the length of lines, ANSI escape code aware // Always outputs every escape char, regardless of length (so we always end up with a sane state) // Visible characters are filtered out once length is exceeded function filterAnsi(str, len) { if (!len || len &lt; 10) return str; // probably not a valid console -- send back the whole line var count = 0, // number of visible chars on line so far esc = false, // in an escape sequence longesc = false; // in a multi-character escape sequence var outp = true; // should output this character return str.split('').filter(function(c){ // filter characters... if (esc &amp;&amp; !longesc &amp;&amp; c == '[') longesc = true; // have seen an escape, now '[', start multi-char escape if (c == '\x1b') esc = true; // start of escape sequence outp = (count &lt; len || esc); // if length exceeded, don't output non-escape chars if (!esc &amp;&amp; !longesc) count++; // if not in escape, count visible char if (esc &amp;&amp; !longesc &amp;&amp; c != '\x1b') esc = false; // out of single char escape if (longesc &amp;&amp; c != '[' &amp;&amp; c &gt;= '@' &amp;&amp; c &lt;= '~') {esc=false; longesc=false;} // end of multi-char escape return outp; // result for filter }).join(''); // glue chars back into string }
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26238553

http://stackoverflow.com/q/26338733
has comment: http://stackoverflow.com/comment/41344758
tagged with: google-maps
has comment: http://stackoverflow.com/comment/41340282
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26344977
has comment: http://stackoverflow.com/comment/41344587
favorite count: 0
tagged with: google-maps-api-3
has title: shortest route when using waypoints
has comment: http://stackoverflow.com/comment/41342578
has comment: http://stackoverflow.com/comment/41344360
has body: i can use waypoints perfectyl.but i can not get shortest directions.i try to use route alternatives but it doesn't work. i need some thing like this : http://i58.tinypic.com/2vjbt6d.jpg is there any way ? my codes function codeAddress(adres) { var address = adres; geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); } }); } function calcRoute() { var grid = document.getElementById('GridView1'); var start = document.getElementById('DropDownList_ilce').value + "," + document.getElementById('DropDownList_il').value; var end = document.getElementById('GridView1').rows[grid.rows.length - 1].cells[4].innerHTML + "," + document.getElementById('GridView1').rows[grid.rows.length - 1].cells[3].innerHTML; var waypts = []; for (var i = 0; i &lt; grid.rows.length - 2; i++) { waypts.push({ location: document.getElementById('GridView1').rows[i+1].cells[4].innerHTML + "," + document.getElementById('GridView1').rows[i+1].cells[3].innerHTML, stopover: true }); } var request = { origin: start, destination: end, waypoints: waypts, optimizeWaypoints: true, travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } });
upvote count: 2
has comment: http://stackoverflow.com/comment/41346823
downvote count: 1
has answer: http://stackoverflow.com/a/26344977
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41345026
score: 1
type: Question

http://stackoverflow.com/q/26284187
has title: Multiple timepickers in the same page bug
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41240663
favorite count: 0
tagged with: timepicker
type: UnansweredQuestion
has body: I notice a strange behavior when there are multiple timepickers in the same page. After switching between the two timepickers, eventually one of them isn't removed/hidden, and will persist till we refresh the page. I thought it was a problem with my code but then i did a test with a simple bootstrap example i found on google. Fiddle bug example: http://jsfiddle.net/kW3G7/282/ The only code that is used is: `$('.timepicker').timepicker(); Thanks in advance. Edit: i created a issue in there github project Edit 2: It seems that the timepicker stops calling the document onclick event(code above) $(document).on('mousedown.timepicker, touchend.timepicker', function (e) { // This condition was inspired by bootstrap-datepicker. // The element the timepicker is invoked on is the input but it has a sibling for addon/button. if (!(self.$element.parent().find(e.target).length || self.$widget.is(e.target) || self.$widget.find(e.target).length)) { self.hideWidget(); } });
downvote count: 0
tagged with: twitter-bootstrap
score: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26301817

http://stackoverflow.com/comment/41230979
comment on: http://stackoverflow.com/a/26279488
type: AnswerComment
score: 0
type: Comment
has text: Nope... `keyup` does exactly that, fires on any key up :D. You can always make an array of bad keycodes and check the index of the current keycode against that array.

http://stackoverflow.com/comment/41270224
has text: also not only mocking i want to test the asc functionality too
type: Comment
comment on: http://stackoverflow.com/a/26298966
score: 0
type: AnswerComment

http://stackoverflow.com/q/26255098
type: Question
has title: cannot add bing theme using image overlay
accepted answer: http://stackoverflow.com/a/26260185
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26260185
has body: I'm using this sample to add and image overlay to a bing map in a web app http://blogs.bing.com/maps/2013/05/22/image-overlays-with-bing-maps-javascript/ and is working fine. Now I need to add pushpins with tooltip, and looks like that I have to add the Microsoft.Maps.Themes.BingTheme theme. If I load this module I can't see the image overlay anymore: If I remove the loadModule the image works fine again. How can I make work both together? thanks, Luca
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41188076
tagged with: bing-maps

http://stackoverflow.com/q/26248013
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/64562124
has comment: http://stackoverflow.com/comment/41174157
has comment: http://stackoverflow.com/comment/41174361
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26248237
has title: jQuery error: Cannot use 'in' operator to search for 'using' in 100
has comment: http://stackoverflow.com/comment/41174271
has comment: http://stackoverflow.com/comment/41174257
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41174840
tagged with: javascript
has body: This code was working at one point, but now is throwing this error and I'm not really sure what it means. I googled it but it seems that the ones I found are close, but not exact to the issue that I am having. error: Uncaught TypeError: Cannot use 'in' operator to search for 'using' in 100 JS code: $('a.page-scroll').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset(100).top }, 1500, 'easeInOutExpo'); //check to see if its a drop down button if(!$(this).hasClass("dropdown")) { if ( $(window).width() &lt; 767){ $('.navbar-toggle').click(); } } event.preventDefault(); }); This is the part that seems to be causing the issue: $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset(100).top }, 1500, 'easeInOutExpo');
score: 0

http://stackoverflow.com/q/26219554
has title: SailsJS - Create New Record with a custom ID
type: Question
tagged with: mongodb
tagged with: sails.js
has answer: http://stackoverflow.com/a/26219921
accepted answer: http://stackoverflow.com/a/26219921
tagged with: javascript
upvote count: 1
downvote count: 0
answer count: 1
favorite count: 0
has body: in SailsJS, when you create a new record, for example creating a new user, SailsJS will generate a random ID for that record. In the project I'm working on, I would like to use a current ID that was generated before instead letting sailsjs generate for me. The reason for that is I'm trying to make 2 instances of sailsjs in sync with each other, and the IDs of the records has to match. so when i import data from one sailsjs to another i want to make sure that everything is exactly the same. I don't have any problem with the regular data, such as for example name, address, email. But when it comes to IDs sails refuse to create a record with a given Id. Note that I'm using MongoDB, which generates ID such as "5420873b5b9338143ac15c09"
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/41099567
type: AnswerComment
comment on: http://stackoverflow.com/a/26207866
score: 0
type: Comment
has text: you should have written something simple in the first place then :p

http://stackoverflow.com/comment/41115130
score: 3
comment on: http://stackoverflow.com/q/26216740
type: Comment
type: QuestionComment
has text: What about `.toFixed(2)`?

http://stackoverflow.com/comment/41082197
type: AnswerComment
type: Comment
has text: @SLaks you're right. I saw he's never assigning anything to clicked and updated my answer to do so.
score: 0
comment on: http://stackoverflow.com/a/26198833

http://stackoverflow.com/comment/41108224
has text: Thanks. That solved it. The calls were originating from a subdomain, created for test purposes.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26212100

http://stackoverflow.com/a/26310584
answers question: http://stackoverflow.com/q/26310322
upvote count: 1
downvote count: 0
score: 1
has body: This is what I have been able to come up with: ([\&amp;\|\(]+)?([a-zA-Z0-9 ]*)([!=&lt;&gt;]+)([a-zA-Z0-9 ]*) http://www.regexr.com/39mfq This will give you the groups, operands and the operators. There is caveat here, that it will only be able to grab the first opening parenthesis, so you can add the closing ones yourself be checking the constructed groups. Assuming I have this string "displayState=error&amp;(state!=aborted|(state=cancelled&amp;state=timed out))" From the regex given above, I will get the following groups: displayState = error &amp;( state != aborted |( state = cancelled &amp; state = timed out It is fairly simple to compute this, as you can start by checking for and opening ( and if you find one, then you know that the expression ahead of it would be enclosed in it. I know this isn't a great solution but it might help.
type: Answer

http://stackoverflow.com/comment/41277821
has text: so calling like Parenizor.method('method') is invalid ??
comment on: http://stackoverflow.com/a/26304790
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41312918
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26323682
type: Comment
has text: I don't really know what that drivel is you posted there. But `.then` needs a function. you are passing an object.

http://stackoverflow.com/comment/41349068
comment on: http://stackoverflow.com/a/26343335
score: 0
type: Comment
has text: Try `currentWindow: true` instead of passing an explicit constant. Also, did you properly reload the extension after the manifest change?
type: AnswerComment

http://stackoverflow.com/comment/41095550
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26206070
has text: @Prashant It will be as real-time as the JavaScript code "yields".
score: 0

http://stackoverflow.com/comment/41234582
type: Comment
has text: It seems to be fine. But i found, that each result item has a same DATE_TO and DATE_FROM.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26280625

http://stackoverflow.com/comment/41314639
comment on: http://stackoverflow.com/q/26325035
has text: yeah, each image would have a unique ID though. but I can't figure out how to get that unique ID to be passed to the function? Just added an image
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26378038
has body: Two things The $scope.secondsToAnswer should be declared outside the function globally not when startTimer is called. In HTML code, you should wrap the area where you need to use the scope. In this case, inside the timer directive
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26245820
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41353426
has text: didn't work on refresh. It's not important really because I got it done using `load()` only that I'm curious whether there's other alternative for loading external file or echo json.
comment on: http://stackoverflow.com/a/26334580
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26253455
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
downvote count: 1
has title: Change scrollspy link color when scrolling
type: AnsweredQuestion
has body: In the following example http://jsbin.com/huhavejipepi/2/edit?html,js I would change the color of the links in the navbar fixed at the top. ie. when the user is at the top of the page all the links should be black. when the user scroll down only the active scrollspy element should be black instead the others one should be light gray and change theirs color when they become active.
type: Question
tagged with: scrollspy
upvote count: 1
has answer: http://stackoverflow.com/a/26327496
accepted answer: http://stackoverflow.com/a/26327496
answer count: 1

http://stackoverflow.com/comment/41321183
comment on: http://stackoverflow.com/q/26317521
type: Comment
type: QuestionComment
has text: I have edited the question to be a specific question.
score: 0

http://stackoverflow.com/comment/41131754
type: Comment
has text: What do you mean by tabs?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26224988

http://stackoverflow.com/q/26290061
has comment: http://stackoverflow.com/comment/41251430
has answer: http://stackoverflow.com/a/26290158
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41251017
has comment: http://stackoverflow.com/comment/41251033
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26290158
has body: So I have a set of numbers such as this: Donation Amount $5.00 $10.00 $15.00 $20.00 $25.00 $30.00 $35.00 $40.00 $45.00 $50.00 $55.00 $60.00 $65.00 $70.00 $75.00 $80.00 $85.00 $90.00 $95.00 $100.00 Every time this is changed I have some javascript that runs: Now it almost works. Except for the toFixed(2) part of everything. Let's say we select 10.00. The value is 1000 and I am wanting to display 10.00. It instead displays like: 1000.00. What more do I need to do? I converted the text to a integer and then fixed it two decimal places.
has comment: http://stackoverflow.com/comment/41252716
type: AnsweredQuestion
has title: JQuery toFixed() not displaying correctly

http://stackoverflow.com/comment/41284079
has text: @Oriol That was silly of me. Thanks (Y)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26307836

http://stackoverflow.com/comment/41157462
type: AnswerComment
type: Comment
has text: the above code works great... here is an updated version http://jsfiddle.net/0vc9ep17/50/ I'm just now looking into sliding down to the next question once one question is answered. do you know off hand how to process this function?
score: 0
comment on: http://stackoverflow.com/a/26238961

http://stackoverflow.com/q/26316735
type: AnsweredQuestion
has body: How calculate grand total from total using java script (onkeyup)? This my coding Price Total Price Grand Total : it's already correct for cal1 and cal2, but grand total keep empty when cal and cal2 already calculate?? how to grand total auto calculate +??? form total cal1 and total cal2
has comment: http://stackoverflow.com/comment/41299858
accepted answer: http://stackoverflow.com/a/26316844
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/41299608
has title: Calculate the grand total with javascript (onkeyup)
tagged with: javascript
has comment: http://stackoverflow.com/comment/41299618
score: 0
has comment: http://stackoverflow.com/comment/41299694
has comment: http://stackoverflow.com/comment/41299395
has comment: http://stackoverflow.com/comment/41299588
has answer: http://stackoverflow.com/a/26316844
has comment: http://stackoverflow.com/comment/41299331

http://stackoverflow.com/q/26330035
has answer: http://stackoverflow.com/a/26330089
type: Question
has comment: http://stackoverflow.com/comment/41324046
has comment: http://stackoverflow.com/comment/41324054
downvote count: 2
tagged with: javascript
tagged with: jquery
answer count: 3
upvote count: 1
has body: I'm trying to implement a simple functionality using the hover property in jQuery. When I hover on the div, some text must be displayed in the span element. That is pretty much the concept. This code is not working! Can someone enlighten me?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/26330089
has answer: http://stackoverflow.com/a/26330109
has comment: http://stackoverflow.com/comment/41324122
has title: display and hide text using hover in jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26330121
accepted answer: http://stackoverflow.com/a/26330121
has comment: http://stackoverflow.com/comment/41324146
score: -1
has comment: http://stackoverflow.com/comment/41324052
has comment: http://stackoverflow.com/comment/41324002

http://stackoverflow.com/q/26335496
tagged with: here-api
accepted answer: http://stackoverflow.com/a/26385830
has body: I'm trying to render Antarctica geojson shape on a map using the HERE maps api. The geojson is found here: https://github.com/johan/world.geo.json/blob/master/countries/ATA.geo.json You can see github renders it nicely. Using the same geojson on geojson.io also renders it nicely. But somehow it seems to render the 'inverse' of Antarctica when using it in HERE maps. It colors everything except antarctica. see: http://imagebin.ca/v/1dZIn5vsEuFx (I've tried making an expample using jsfiddle, but it's not able to load external json. And the HERE maps api doesn't allow you to load geoJSON from a string) Is there an issue with the geoJSON? Is there an issue with the HERE maps api?
tagged with: geojson
type: Question
possible better answer: http://stackoverflow.com/a/52633272
has answer: http://stackoverflow.com/a/26385830
has answer: http://stackoverflow.com/a/52633272
tagged with: javascript
score: 0
answer count: 3
has title: Displaying Antarctica using GeoJSON in heremaps
has answer: http://stackoverflow.com/a/69244082
type: AnsweredQuestion

http://stackoverflow.com/comment/41219337
has text: If you are the developer of the bar.com site as well, you can just add a click event to all tags to enforce this (using jquery or something like that), but if you're not, I'm afraid you're out of luck, because the [Same-origin policy](http://en.wikipedia.org/wiki/Same-origin_policy) prevents the javascript of foo.bar from accessing the content of the iframe.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26272760
score: 1

http://stackoverflow.com/comment/41187604
type: AnswerComment
score: 0
has text: Edited my post. Now, it will not give the syntax error.
type: Comment
comment on: http://stackoverflow.com/a/26255744

http://stackoverflow.com/comment/41175881
has text: Can you show how did you include your internal page?
type: AnswerComment
comment on: http://stackoverflow.com/a/26248858
score: 0
type: Comment

http://stackoverflow.com/q/26240783
has answer: http://stackoverflow.com/a/26251647
has comment: http://stackoverflow.com/comment/41160330
has comment: http://stackoverflow.com/comment/41160350
has comment: http://stackoverflow.com/comment/41160507
has comment: http://stackoverflow.com/comment/41160393
type: Question
has body: I have the href: I need to hide the function openFullList();. How to do this? Ok, the code: is forms . The idea is to prevent function "openFullList();"
has answer: http://stackoverflow.com/a/26240943
has answer: http://stackoverflow.com/a/26240938
has title: Javascript or css onclick function hide
has comment: http://stackoverflow.com/comment/41160510
tagged with: javascript
has comment: http://stackoverflow.com/comment/41160505
has comment: http://stackoverflow.com/comment/41160443
score: 0
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41160300
tagged with: css
has comment: http://stackoverflow.com/comment/41160402

http://stackoverflow.com/a/26344452
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26341372
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26341372
has body: You're mostly there. You need to save the current position when you leave the page and then navigate back that position when you get back to the page. Try this: In MainPage.xaml.cs: static Point ScrollPosition = new Point(); private void MyWebView_ScriptNotify(object sender, NotifyEventArgs e) { string[] Coordinates = e.Value.Split(','); ScrollPosition.X = double.Parse(Coordinates[0]); ScrollPosition.Y = double.Parse(Coordinates[1]); } private async void MyWebView_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args) { await MyWebView.InvokeScriptAsync("SetScrollPosition", new string[] { ScrollPosition.X.ToString(), ScrollPosition.Y.ToString() }); } In MainPage.xaml: &lt;WebView x:Name="MyWebView" Width="800" Height="500" Source="ms-appx-web:///HTMLPage1.html" ScriptNotify="MyWebView_ScriptNotify" NavigationCompleted="MyWebView_NavigationCompleted"/&gt; In HTMLPage1.html: window.onscroll = GetScrollPosition; function GetScrollPosition() { window.external.notify(window.pageXOffset + "," + window.pageYOffset); } function SetScrollPosition(X, Y) { window.scrollTo(X, Y); window.external.notify(window.pageXOffset + "," + window.pageYOffset); }

http://stackoverflow.com/a/26290476
answers question: http://stackoverflow.com/q/26290355
has comment: http://stackoverflow.com/comment/41251836
type: Answer
accepted answer of: http://stackoverflow.com/q/26290355
score: 2
downvote count: 0
upvote count: 2
has body: $(function () { var filters = []; var edit_rows = function () { filters = []; $('input:checkbox[name=filter]:checked').each(function () { filters.push(this.value); }); // Edit the Rows $(".gameStatus").each(function () { $(this).parent('tr') .toggleClass('filtered', filters.indexOf($(this).text()) &gt; -1 ); }); } edit_rows(); // On Change of Radio Buttons $('input').on('change', edit_rows); }); jsfiddle edit: added functionality so it gets invoked on page load
type: AcceptedAnswer

http://stackoverflow.com/a/26354079
has comment: http://stackoverflow.com/comment/52239627
score: 1
has body: Look at my working example localgeo and sources on github You can find like this: var nearMarkers = allMarkers.find({ location: { $near: { $geometry: { type: "Point", coordinates: location }, $maxDistance: radius } } }); Location is this type of MongoDB. And remember: in MongoDB Lng - first, Lat - second, I don't know why. I do it on client side, but you can make publication in the same way, depend on radius.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26348465
answers question: http://stackoverflow.com/q/26348465
type: Answer
has comment: http://stackoverflow.com/comment/52173371
downvote count: 0
has comment: http://stackoverflow.com/comment/52038821

http://stackoverflow.com/comment/41197873
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26261382
has text: No, I'm just using it manual. I don't inject in a controller that doesn't need it, this way I'm injecting it in a closure where I need it.

http://stackoverflow.com/q/26260431
has comment: http://stackoverflow.com/comment/41216486
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41264700
has comment: http://stackoverflow.com/comment/41269361
has answer: http://stackoverflow.com/a/26315576
has title: redcarpet markdown - execute javascript code
has comment: http://stackoverflow.com/comment/41265253
has comment: http://stackoverflow.com/comment/41200438
tagged with: markdown
tagged with: redcarpet
type: Question
has comment: http://stackoverflow.com/comment/41264980
answer count: 2
has comment: http://stackoverflow.com/comment/41199732
has body: I am created documentation using tripit/slate. All documentation content is in .md file. slate is using redcarpet markdown engine. Now when I put ``` it will be converted to in html. And the statement is in tag so will render as on page. The statement prints the path of an api endpoint. I want to execute this statement on a page which means the statement should print the value of a varible window._restapiurl. If I manually write the tag in html after page build, the statement will be executed and print the value of a variable. Update: tried with :escape_html => true, :filter_html => true in config.rb but it didn't work. more update I need to execute javascript statement in my language selector curl tab. more update Even If I remove triple ticks ```, the script tag does not execute. It just prints the script statement on a page. How do I execute javascript code written in markdown ??? So that I don't need to update the api endpoint path whenever new version is released and I can manage it by changing the value of variable only.
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26300269
tagged with: ruby

http://stackoverflow.com/comment/41237975
comment on: http://stackoverflow.com/q/26282932
has text: Glad it solved it, I put the comment into an answer with an additional way of dealing with it.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/26199513
has comment: http://stackoverflow.com/comment/41083724
tagged with: backbone.js
answer count: 0
type: UnansweredQuestion
has title: Backbone: appending views results in collapsed views?
has body: I'm splitting a collection into collections based upon an event date. I then want to append each of these grouped dates to the html so views will show up together based upon date. However, I'm getting the views appended but all collapsed on top of each other. They are literally on top of each other :( This is my collectionView for everything render. Initial content is the div I want to append all the dayViews into. render: function(){ var groupedModels = this.collection.groupBy(function(eventItems){ return eventItems.get('date'); }), view = new eventCollectionView({ collection: this.collection }); _.each(groupedModels, function(group) { var dayView = new dayCollectionView({collection: group}); $("#initialContent").append(dayView.render().el); $("initialContent").append("&lt;br&gt;"); }); } This is my day view, although the tag is already a div, I added an extra to see if it would make a difference, it doesn't. The eventView is a a handlebars template created isotope.js card. (just a pretty html card) render: function(){ var date = this.collection[0].get('date'); this.$el.append("&lt;h2&gt;" + date + "&lt;/h2&gt;&lt;div&gt;"); for (var i = 0; i &lt; this.collection.length; i++) { var view = new eventView({model: this.collection[i]}); this.$el.append(view.render().el); } this.$el.append("&lt;/div&gt;"); return this; } When I don't split my collection into separate day collections, it appends perfectly fine. However, when I split it into separate collections and append those, the problems start appearing. Any ideas for this collapse? Normally should be [] [] [] But now it's like [] Thanks!!
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41083515
has comment: http://stackoverflow.com/comment/41102366

http://stackoverflow.com/comment/41122281
comment on: http://stackoverflow.com/q/26219872
type: Comment
type: QuestionComment
has text: I think you misunderstand "packaged app". Apps are available for everyone the same way extensions are. You also need to consider whether you'll actually need the extension component, or an app alone would siffice.
score: 0

http://stackoverflow.com/q/26280006
has title: Jquery onClick-event for submit form in Chrome
linked to: http://stackoverflow.com/q/18971284
tagged with: form-submit
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26281096
has comment: http://stackoverflow.com/comment/41232248
tagged with: onclick
has comment: http://stackoverflow.com/comment/41232281
has comment: http://stackoverflow.com/comment/41233169
has answer: http://stackoverflow.com/a/26280535
type: Question
has comment: http://stackoverflow.com/comment/41249444
has comment: http://stackoverflow.com/comment/41232967
has comment: http://stackoverflow.com/comment/41232197
answer count: 2
has body: I have a js-code: $(document).on('click', '#form #submitForm', function(e){ $('#form').submit(); return false; }); $(document).on('submit', '#form', function(e){ // ajax request on submit form return false; }); where #form is the id of form, #submitForm is the id of submit-button inside this form. I use .on() because of fact that my form is dynamically generated by ajax requests on submit. Some people with Google Chrome on Win7 complaints about this isn't working and by pressing #submitForm just redirect to "form action"-url occurs. I have Google Chrome on Win7 and it's working perfectly. Want do I missing or did wrong?
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26307983
has body: It really doesn't matter, the only thing that matters is that the key is unique among siblings within the parent element. It doesn't have to be unique across your entire app, just inside the parent you're appending these items to. Often for simple iteration over elements, such as &lt;li&gt; or &lt;option&gt; it's fine to just use the index within your iterator. EG: var options = []; for (var i=0; i&lt;this.props.options.length; i++) { var option = this.props.options[i]; options.push( &lt;option key={i} value={option.value}&gt;{option.name}&lt;/option&gt; ); } The only time this doesn't work well is if you are adding/removing keyed elements in different orders etc later on so that your key might clash with another sibling. In which case you're going to want to generate the key in some other way to make sure it's unique - or use a known unique key from your model. Whichever way you do it as long as it's unique among it's siblings, it'll be fine.
score: 6
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26306762
answers question: http://stackoverflow.com/q/26306762
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41170787
comment on: http://stackoverflow.com/q/26246063
has text: @MikeW Thanks for the advice, I plan on creating a function to replace the `eval()`. Thanks!
score: 0
type: Comment
type: QuestionComment

getusermedia
tags question: http://stackoverflow.com/q/26244112
tag name: getusermedia
type: Tag

http://stackoverflow.com/q/26266459
linked to: http://stackoverflow.com/q/51013182
answer count: 1
downvote count: 0
tagged with: asynchronous
tagged with: callback
favorite count: 0
tagged with: parsing
accepted answer: http://stackoverflow.com/a/26267287
tagged with: http://stackoverflow.com/tag/csv
score: 16
upvote count: 16
has body: I'm sort of embarrassed to ask this question because it seems like it should be so obvious, but I'm pretty weak on dealing with async problems, and I'm confused on how to proceed. I'm using Papa Parse (http://papaparse.com/docs.html#remote-files) to parse a remote CSV. I want to stash the result of the parse in an object to use later. Here's my code: var dataset = {}; Papa.parse("http://path/to/some.csv", { download: true, dynamicTyping: true, complete: function(results) { dataset = results.data; } }); console.log(dataset); This, of course, results in an empty object being logged to the console. Any attempts at using dataset don't work because, of course, the dataset object hasn't actually received its data by the time the code executes. Can someone please help me refactor or explain how I deal with this?
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26267287
has title: Retrieve parsed data from CSV in Javascript object (using Papa Parse)
tagged with: javascript

http://stackoverflow.com/q/26242189
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26285752
type: Question
accepted answer: http://stackoverflow.com/a/26285752
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: mobiscroll
has body: I'm want to use the mobiscroll selector (demo | source) on my (desktop oriented) website. I've got a basic version working here. The way that works is that when you click the input at the top, it loads the (enormously sexy) spinner as an overlay with a dark layer over the rest of the site (try it out). What I would rather have instead of this behaviour though, is that on my desktop website it shows this spinner instead of the input. So not as an overlay, but integrated with the rest of the design without needing to click to bring it up. That way the user is saved one click and it is immediately clear what's expected of him or her. Does anybody know how I would be able to use this spinner instead of the input, so that it integrates nicely with the rest of my page instead of working as some sort of pop-up/overlay? All tips are welcome!
has title: How to use mobiscroller *instead of* input?

http://stackoverflow.com/a/26316614
upvote count: 6
has body: Try something like this: $table.find('tr').filter(function() { return this.children.length &lt; 3; }).eq(0).append(myTDvar);
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26316572
type: Answer
score: 6
accepted answer of: http://stackoverflow.com/q/26316572

http://stackoverflow.com/comment/41102941
has text: The imageArray would be even better grabbed from the src of the $("img", "#imageContainer");
comment on: http://stackoverflow.com/a/26208476
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26348120
has answer: http://stackoverflow.com/a/26365937
type: AnsweredQuestion
has title: How to make two Pebbles talk to each other. Preferably using javascript with Pebble.js, but open to using PebbleKit sdk or Standard C Pebble
tagged with: pebble-watch
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26365937
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26360892
linked to: http://stackoverflow.com/q/23419315
has answer: http://stackoverflow.com/a/26360892
has body: I'm creating my first application with Pebble using Pebble.js from this github project https://github.com/pebble/pebblejs The point is that I'm trying to have an application that runs on two different pebbles that sends messages to a server and send a message back to each pebble depending on what each pebble says. I was wondering if there was a simple way to do this? I spoke to a friend and he said to try using 'Node.js' but then I mentioned Pebble, and he said that you couldn't use that with Pebble. I have never programmed in Javascript or Pebble before, but I assumed it would be easier than doing it with the C sdk (I'm pretty good at C though, so if it's easier to do it that way I'm all ears). Sorry if I'm not being clear, if you want me to clarify anything just tell me!

http://stackoverflow.com/a/39248422
upvote count: 1
answers question: http://stackoverflow.com/q/26300322
downvote count: 0
has body: There is this hashchange event of the 'window' Document Object that's exactly what you require to catch this behavior. You can use: Javascript solution: window.addEventListener('hashchange', function(){ // smooth scroll code }); jQuery solution (v1.8+): jQuery(window).on('hashchange', function(){ // smooth scroll code }); Note: The hashchange event gets triggered on url hash change (location.hash) on the same page but not from a different page e.g. going from www.example.com/about.html#first to www.example.com/contact.html#second won't trigger the hashchange event.
type: Answer
score: 1

http://stackoverflow.com/comment/41324223
score: 0
type: Comment
has text: the text does not appear when I hover
type: AnswerComment
comment on: http://stackoverflow.com/a/26330089

http://stackoverflow.com/q/26351422
has comment: http://stackoverflow.com/comment/41362999
has comment: http://stackoverflow.com/comment/41363495
has comment: http://stackoverflow.com/comment/41364425
has comment: http://stackoverflow.com/comment/41363933
has comment: http://stackoverflow.com/comment/41363647
has comment: http://stackoverflow.com/comment/41363694
downvote count: 0
answer count: 1
tagged with: jquery
has title: The second jquery plugin not working online but in localhost works
favorite count: 0
has answer: http://stackoverflow.com/a/26352304
has comment: http://stackoverflow.com/comment/41363975
has comment: http://stackoverflow.com/comment/41363676
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41363075
tagged with: php
has comment: http://stackoverflow.com/comment/41363826
has comment: http://stackoverflow.com/comment/41363783
has comment: http://stackoverflow.com/comment/41363626
has body: The index page of my website has two jquery pluggins.The second plugin located below the first banner plugin doesn't work(move) when uploaded to the live server.However in the localhost it works. I wonder why? banner.php(first plugin) <?php require_once('Connections/wedding_conn.php'); ?> <?php mysql_select_db($database_wedding_conn, $wedding_conn); $query_RecBanner = "SELECT * FROM tbl_bannerstore WHERE banner_status = 1"; $RecBanner = mysql_query($query_RecBanner, $wedding_conn) or die(mysql_error()); $totalRows_RecBanner = mysql_num_rows($RecBanner); ?> <?php while($row_RecBanner = mysql_fetch_assoc($RecBanner)){ if(($row_RecBanner['banner_id'])!=0) { ?> <img u="image" src="banner_online_store/<?php echo $row_RecBanner['banner_img']; ?>" /> <?php }} ?> responsive carousel featured.php (second plugin which is not working) <?php require_once('Connections/wedding_conn.php'); ?> <?php mysql_select_db($database_wedding_conn, $wedding_conn); $query_feature="SELECT tbl_productscontents.*,tbl_productsgallery.*,tbl_productscategory.*,tbl_subcategory.* FROM tbl_productscontents,tbl_productsgallery,tbl_productscategory,tbl_subcategory WHERE tbl_productscontents.pc_id=tbl_productscategory.pc_id AND tbl_productscontents.productid=tbl_productsgallery.productid AND tbl_productscontents.productfeature='yes' AND tbl_subcategory.sub_id=tbl_productscontents.sub_id"; $result_feature=mysql_query($query_feature)or die(mysql_error()); ?> Featured Products <?php while($row_feature=mysql_fetch_array($result_feature)) { ?> <a href="view_featured.php?id=<?php echo $row_feature['productid'];?>&cat_id=<?php echo $row_feature['pc_id']; ?>"><img class="class1" src="productshow/images/gallery/<?php echo $row_feature['pc_name'];?>/<?php echo $row_feature['sub_name'];?>/<?php echo $row_feature['ga_photo'];?>"/> <a href="view_featured.php?id=<?php echo $row_feature['productid'];?>&cat_id=<?php echo $row_feature['pc_id']; ?>"><?php echo $row_feature['productname'];?> <?php if($_SESSION['mem_type']=…
upvote count: 1
has comment: http://stackoverflow.com/comment/41363042
has comment: http://stackoverflow.com/comment/41363596
type: Question
has comment: http://stackoverflow.com/comment/41363990
has comment: http://stackoverflow.com/comment/41363820
score: 1
has comment: http://stackoverflow.com/comment/41364055
tagged with: javascript

http://stackoverflow.com/comment/41311931
comment on: http://stackoverflow.com/a/26323594
score: 1
has text: yeah, should work... yet not very elegant. I bet it's possible to make it more declarative with Ramda
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41218565
type: QuestionComment
comment on: http://stackoverflow.com/q/26272244
score: 0
has text: You need to update you question to include the partial view
type: Comment

http://stackoverflow.com/comment/41289185
comment on: http://stackoverflow.com/a/26310959
type: AnswerComment
score: 0
has text: Hey, yes it does make sense now .. Thank you
type: Comment

http://stackoverflow.com/comment/41213189
score: 1
type: Comment
comment on: http://stackoverflow.com/q/26269395
type: QuestionComment
has text: this is very vague... what kind of information? and what kind of graph?

http://stackoverflow.com/comment/41578931
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26213819
has text: Can you post the Stomp frame headers?

http://stackoverflow.com/a/26319400
type: Answer
has comment: http://stackoverflow.com/comment/41304329
score: 2
has body: I'm assuming that a is an array of objects, that you want to filter in order to keep only those whose b property is equal to the string 'data'. That being the case: // this outputs to the console, you should probably press 'F12' var a = [{ 'b': 'data' }, { 'b': 'something else' }, { 'b': 'data' }, { 'b': 50 }], pending = a.filter(function(elem) { return elem.b === 'data'; }); console.log(pending); References: Array.prototype.filter().
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41304350
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26319146
answers question: http://stackoverflow.com/q/26319146
upvote count: 2

http://stackoverflow.com/comment/41339123
type: AnswerComment
comment on: http://stackoverflow.com/a/26337420
type: Comment
has text: @user3108072 — You are still making a GET request. Saying that the request body is `"Content-Type": "application/javascript; charset=utf-8",` is still nonsense as you still don't *have* a request body.
score: 1

http://stackoverflow.com/comment/41230819
type: QuestionComment
type: Comment
score: 0
has text: Well that code is not valid HTML. Where is the dt?
comment on: http://stackoverflow.com/q/26279189

http://stackoverflow.com/q/26324667
has title: how to get the created event of element which generated by angularjs?
has body: I used ng-repeat to generate some html elements . like this: &lt;textarea ng-repeat="t in tips"&gt;{{t.content}}&lt;/textarea&gt; then i want to resize all of textarea's hight according to t.content. and textarea width is fixed ,what should i do?
upvote count: 1
linked to: http://stackoverflow.com/q/15207788
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/41315302
has comment: http://stackoverflow.com/comment/41313853
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/454202
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41313851
has answer: http://stackoverflow.com/a/26324746

http://stackoverflow.com/comment/41166294
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26243550
type: AnswerComment
has text: @dfsq Ahh, I understand your point. My intention wasn't to imply that the root cause was using `.size()`. I was simply trying to fix the code, and remove the use of deprecated APIs in the process. :)

http://stackoverflow.com/comment/41666331
score: 0
comment on: http://stackoverflow.com/a/26478219
type: Comment
has text: There are certain things I don't want Nashorn to have access to such as reflection so AllPermission is not an option.
type: AnswerComment

http://stackoverflow.com/a/26195642
has comment: http://stackoverflow.com/comment/41077745
type: Answer
answers question: http://stackoverflow.com/q/26195581
has comment: http://stackoverflow.com/comment/41081275
has comment: http://stackoverflow.com/comment/41081314
upvote count: 1
has body: To invoke the percentage function, remove the function keyword. The next issue is that samp, sallyp, and donaldp are scoped to the function percentage, so they're not accessible in the go function. You should make percentage take an argument function percentage (score) { return score / 10 * 100; }; Then, in go: function go () { console.log("Sam: " + percentage(sam) + ", Sally: " + percentage(sally) + ", Donald: " + percentage(donald)); };
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26195581

http://stackoverflow.com/comment/41320881
score: 0
comment on: http://stackoverflow.com/q/26328294
type: Comment
type: QuestionComment
has text: you can try defining some root object. Define the `User` property in that object, then you can access the `User` like this `root["User"]`, next you can access the `find` like this `root["User"]["find"](...)`

http://stackoverflow.com/comment/41268604
type: AnswerComment
type: Comment
has text: Can you edit your example above to feed more than one pair? How do the pairs not get mixed up? Percentage shouldn't end up as #.
comment on: http://stackoverflow.com/a/26299853
score: 0

http://stackoverflow.com/a/26285026
has comment: http://stackoverflow.com/comment/41260303
type: Answer
has comment: http://stackoverflow.com/comment/41260011
has comment: http://stackoverflow.com/comment/41242532
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41262746
has body: I would just use CURL for App Notifications instead: $accessToken = $appId . '|' . $appSecret; $notificationText = 'The cake is a lie.'; //init curl $ch = curl_init(); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, 'facebook'); //send notification $url = 'https://graph.facebook.com/' . $userId . '/notifications' . '?access_token=' . $accesstoken . '&amp;template=' . $notificationText . '&amp;href='; curl_setopt($ch, CURLOPT_URL, $url); $curlResult = curl_exec($ch); Source: http://blog.limesoda.com/2014/08/app-notifications-facebook-apps/ As long as the user authorized your App, this should be fine. And keep in mind that you will not see the App Notifications on mobile devices. One more thing: "apps.wehubs.com/..." is incorrect, it would need to be the absolute URL - or a relative URL for the Canvas (apps.facebook.com/yournamespace/relativeurl). Not sure though if it even works with an external URL, because App Notifications are for Apps on facebook.com only (https://developers.facebook.com/docs/games/notifications).
has comment: http://stackoverflow.com/comment/41257239
has comment: http://stackoverflow.com/comment/41241884
has comment: http://stackoverflow.com/comment/41242041
downvote count: 0
has comment: http://stackoverflow.com/comment/41257259
has comment: http://stackoverflow.com/comment/41253147
has comment: http://stackoverflow.com/comment/41241903
answers question: http://stackoverflow.com/q/26284937

http://stackoverflow.com/comment/41208732
score: 0
type: Comment
has text: Ok, then display it on the form, and then, add an event 'onsubmit' on the form so that you can post all the data with the javascript. Or, you can make a hidden input inside the form and add the imgData as a value on the hidden input.
comment on: http://stackoverflow.com/a/26266765
type: AnswerComment

http://stackoverflow.com/comment/41333093
comment on: http://stackoverflow.com/a/26329235
type: AnswerComment
score: 0
has text: @bluenile unfortunately I don't think so. You can Try firing an event using the jQuery.trigger method, but I don't really think it would work. Given that, you should still find the right event (and the right properties) to trigger, and that's not very easy.
type: Comment

http://stackoverflow.com/comment/41314075
type: Comment
comment on: http://stackoverflow.com/a/26314942
has text: does it maybe have to do something with the comment in line 9 of main.js //Those are required but they are ignored?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26244866
downvote count: 0
has comment: http://stackoverflow.com/comment/41169293
has body: You are preventing the wrong event. You need the 'onsubmit' event of the form not the 'onclick' event of the submit button. $('#myform').on('submit', function(event){ event.preventDefault(); /* your code here */ }); For more info please read : How to prevent form from being submitted?
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41168960
has comment: http://stackoverflow.com/comment/41169410
has comment: http://stackoverflow.com/comment/41169063
has comment: http://stackoverflow.com/comment/41169025
answers question: http://stackoverflow.com/q/26244669
has comment: http://stackoverflow.com/comment/41169156

http://stackoverflow.com/q/26207127
possible better answer: http://stackoverflow.com/a/26207173
has comment: http://stackoverflow.com/comment/41097400
upvote count: 3
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/41097417
has body: I am currently working through Eloquent Javascript and I wanted to learn some hard fast rules to using code blocks or bracket notation. Here's a sample block that I understand.. it's trying to just print out the number of chickens and cows that a farm has, and if the number is "7", it makes it 3 digits long so it reads "007". function printFarmInventory(cows, chickens) { var cowString = cows while (cowString.length &lt; 3) cowString = "0" + cowString; console.log(cowString + "Cows") var chickensString = chickens while (chickensString.length &lt; 3) chickensString = "0" + chickensString console.log(chickensString + "Chickens") } printFarmInventory(7,11) =&gt; 007 Cows 011 Chickens So it seems like we need code blocks when defining an executable code block for a function. Do we also need/use it for conditionals? Can the above code be written as: function printFarmInventory(cows, chickens) { var cowString = cows while (cowString.length &lt; 3) { cowString = "0" + cowString; } console.log(cowString + "Cows") var chickensString = chickens while (chickensString.length &lt; 3) { chickensString = "0" + chickensString } console.log(chickensString + "Chickens") } Can we include brackets for while loops? Apparently we DO use brackets for if/else conditionals... but what about while loops? Are these brackets optional? function MyFunction(){ if(a==1){ alert("Hello world!") }else{ alert("Goodbye world!") } } PS: The reason why I am not simply testing this myself is because I do not have a good way to test Javascript code. What do people use? How do I write blocks of code in Chrome developer tools?
tagged with: javascript
has answer: http://stackoverflow.com/a/26207233
has answer: http://stackoverflow.com/a/26207173
accepted answer: http://stackoverflow.com/a/26207233
favorite count: 0
has comment: http://stackoverflow.com/comment/41097399
has comment: http://stackoverflow.com/comment/41097525
has comment: http://stackoverflow.com/comment/41097378
type: AnsweredQuestion
has title: When should I use code blocks or brackets in Javascript?
type: Question
has comment: http://stackoverflow.com/comment/41097970
score: -1

http://stackoverflow.com/q/26219239
score: 1
has answer: http://stackoverflow.com/a/28039222
has comment: http://stackoverflow.com/comment/41121734
has title: Inject controller actions from within Ember Addon
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ember.js
tagged with: ember-cli
has comment: http://stackoverflow.com/comment/41121156
has comment: http://stackoverflow.com/comment/41120739
tagged with: ember-addon
has body: Lets say I have a standalone addon with a playback component: {{my-record play="recordPlay" stop="recordStop"}} /app/components/my-record.js import Ember from 'ember'; export default Ember.Component.extend({ actions: { play: function() { this.sendAction('play'); }, stop: function() { this.sendAction('stop'); } } }); I want the addon to work independently with backend and handle all actions internally. How do I handle these two actions recordPlay and recordStop from within the addon itself so that I don't need to touch controller/routes of the consuming application? I have tried: creating application controller within the addon eg. `/app/controllers/application.js - this is never called creating application route within the addon eg. `/app/routes/application.js - this is called unless consuming application has it's own ApplicationRoute which overrides the addon's route Can I use initializers somehow from within the addon to inject these two actions to ApplicationController? EDIT: Dirty workaround using ApplicationRoute._actions /app/initializers/record.js export default { name: 'record', initialize: function(container, app) { var applicationRoute = container.lookup('route:application'); applicationRoute._actions.recordPlay = function(id) { console.log('CALLED recordPlay', id); }; applicationRoute._actions.recordStop = function(id) { console.log('CALLED recordStop', id); }; } };
accepted answer: http://stackoverflow.com/a/28039222
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/26269797
has comment: http://stackoverflow.com/comment/41215007
has comment: http://stackoverflow.com/comment/41217636
score: 4
accepted answer of: http://stackoverflow.com/q/26269704
answers question: http://stackoverflow.com/q/26269704
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
has body: I see two options: Pass the other component as prop, e.g. &lt;Wrap icons={&lt;Icons /&gt;}&gt;&lt;h1&gt;...&lt;/h1&gt;&lt;/Wrap&gt; Pass two children two Wrap and render each of them in the appropriate places, e.g. &lt;Wrap&gt; &lt;Icons /&gt; &lt;h1&gt;...&lt;/h1&gt; &lt;/Wrap&gt;

http://stackoverflow.com/q/26274531
has comment: http://stackoverflow.com/comment/41230668
has comment: http://stackoverflow.com/comment/41222442
has title: is there any way to load data from excel in to text boxes of html web page and submit it dynamically?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41222027
tagged with: java
tagged with: excel
type: Question
has comment: http://stackoverflow.com/comment/41223174
has comment: http://stackoverflow.com/comment/41233184
tagged with: javascript
has comment: http://stackoverflow.com/comment/41223529
has comment: http://stackoverflow.com/comment/41260514
score: 0
has body: instead of entering several values in respective text box and submitting it... is there any way to automate the process such that it will automatically pick values from EXCEL sheet and enters in to respective text fields and clicks on submit Can we do this in java if yes kindly help me out with the best way.. suggest me if there is any other alternative solution..
has comment: http://stackoverflow.com/comment/41222353
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41248407
has text: @Bergi, yes, good point. In that regard, UML deserves a mention ... as indeed you have done below :)
comment on: http://stackoverflow.com/q/26287859
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26294949
accepted answer of: http://stackoverflow.com/q/26294624
score: 1
has comment: http://stackoverflow.com/comment/44272932
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: There are few ways you can convert your map to image which are listed below. To save image in your application you need to use carrierwave or file handling option. You can do it with direct html2canvas conversion: http://html2canvas.hertzen.com/examples.html Highchart also provide way to export image : http://www.highcharts.com/docs/export-module/export-module-overview http://api.highcharts.com/highcharts#exporting.buttons.contextButton.onclick Rails gem that uses wkhtmltoimage for image conversion: https://github.com/csquared/IMGKit
answers question: http://stackoverflow.com/q/26294624
downvote count: 0

http://stackoverflow.com/a/26244208
has body: You need to put the function after you've defined undefinedVar, so it looks like this: undefinedVar = kendo.observable({ randomVariable: [], itsFunction: function () { #blahblahblah } }); function functionName() { varX.ready(undefinedVar.itsFunction()); }; varX.ready(functionName); Also, you've defined undefinedVar, but are looking to reference unDefinedVar. Make sure the case matches!
answers question: http://stackoverflow.com/q/26244099
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26244099

http://stackoverflow.com/comment/41155328
comment on: http://stackoverflow.com/q/26236455
has text: h3Height = $(this).closest('.title').height() - can anyone tell me why this doesn't get the height of the closest h3?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/58632598
has text: Possible duplicate of [Gruntjs concat & minify | Option to replace the code in destination file instead of appending](http://stackoverflow.com/questions/20866937/gruntjs-concat-minify-option-to-replace-the-code-in-destination-file-instead)
score: 1
comment on: http://stackoverflow.com/q/26279789
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26222036
score: 2
has body: As far as I see, you want to fire up a cloud function whenever new entry is saved to Parse DB. For this scenario afterSave is the way to go. However, your function declaration is wrong. The function must be in the format; Parse.Cloud.afterSave("Message", function(request) { ..... } where the request contains the currently saved entry information.Hope this helps.Regards.
accepted answer of: http://stackoverflow.com/q/26221576
answers question: http://stackoverflow.com/q/26221576
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41125823
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41126406

http://stackoverflow.com/comment/73187933
type: Comment
type: QuestionComment
has text: For the record, I made a pull request to pass onProgress and onError callbacks, hopefully it will be merged at some point. https://github.com/mrdoob/three.js/pull/5423
comment on: http://stackoverflow.com/q/26230604
score: 0

http://stackoverflow.com/comment/41303221
comment on: http://stackoverflow.com/a/26317260
type: Comment
has text: Yes,something like. But...It is difficult for me to understand redrawCountries function. Please, can you explain?
score: 0
type: AnswerComment

http://stackoverflow.com/a/26338530
score: 0
has comment: http://stackoverflow.com/comment/41340660
type: Answer
has comment: http://stackoverflow.com/comment/41339568
answers question: http://stackoverflow.com/q/26338254
has comment: http://stackoverflow.com/comment/41339495
has comment: http://stackoverflow.com/comment/41339828
has body: i try this query it give perfect graph. for (var i=0; i&lt;data.value.length; i++) { **series**.push({ name: data.value[i].name, data:data.value[i].value }); } var chart = new Highcharts.Chart({ chart: { renderTo: 'graph_view', defaultSeriesType: 'spline', marginRight: 0, marginBottom: 25 }, credits: { text: '', href: '' }, title: { text: '', x: -20 //center }, subtitle: { text: '', x: -20 }, xAxis: data.orderDate, yAxis: { title: { text: '' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, legend: { align: 'top', verticalAlign: 'top', x: -10, y: 100, borderWidth: 0 }, series:**series** }); } }); } }

http://stackoverflow.com/q/26314133
answer count: 4
has comment: http://stackoverflow.com/comment/41294472
type: AnsweredQuestion
type: Question
has title: jQuery find checkbox in first td
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26314629
possible better answer: http://stackoverflow.com/a/26314154
has body: I have many tables and in that I want to do the following, find a table which is present in class. find first tr, first td in a table check checkbox present first td in a table if checkbox present in first td then add class. Below is my code which is not working function myFunction() { debugger; var FindClass = $("table.Panel"); debugger; var FindClass = $(".Panel table.Table"); debugger; debugger; if (FindClass != null) { $("#FindClass tr").find("td:first").tagname("input"); } }
has answer: http://stackoverflow.com/a/26332864
has answer: http://stackoverflow.com/a/26314171
has answer: http://stackoverflow.com/a/26314154
has answer: http://stackoverflow.com/a/26314629

http://stackoverflow.com/comment/41078389
type: Comment
has text: I know of that method, however I am looking for a method that involves using the math object.
type: AnswerComment
comment on: http://stackoverflow.com/a/26196555
score: 0

http://stackoverflow.com/a/30575018
has body: You may want to set the word wrap too. editor.getSession().setUseWrapMode(true)
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26210839
downvote count: 0

http://stackoverflow.com/q/26245639
score: 0
has comment: http://stackoverflow.com/comment/41169786
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26246225
type: Question
has comment: http://stackoverflow.com/comment/41169792
has body: How can i make this code wait till the form gets a response. the form must submit to recurly and receive a response from recurly before it can go on. if there is a way to assure there is a response would be nice kinda like success: or error: $("#pay_window").dialog({ autoOpen: false, width: 600, buttons: { "Submit Payment": function(){ $("#PaymentForm").submit(); &lt;--- NEED A WAIT FUNCTION HERE ---&gt; var dialogbox = $(this); $.ajax({ url: "/payment", data: $(this).find([company_id, billing_email, first_name, last_name, recurly_token, selected_plan, account]).serialize(), type: "POST", success: function (data) { dialogbox.dialog("close"); alert('Payment Completed') }, error: function (jqXHR, textStatus, errorThrown) { alert('error: ' + textStatus + ': ' + errorThrown); } }); return false; } } });
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Wait till for completes using jQuery / Javascript
accepted answer: http://stackoverflow.com/a/26246225

http://stackoverflow.com/comment/41267891
score: 0
type: Comment
type: AnswerComment
has text: Thanks a lot :D you deserve a beer :D you saved my time. Just wanted to mention in the if condition "i" should be replaced by "max" the name of the variable :D thanks a lot.
comment on: http://stackoverflow.com/a/26298111

http://stackoverflow.com/comment/41087967
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26202082
has text: Do you want ` 306> ... 88 ...`?

http://stackoverflow.com/q/26226706
accepted answer: http://stackoverflow.com/a/26288545
tagged with: javascript
has body: As the title says, I'm trying to implement some conditional display logic to my form built using backbone-forms. The environment also uses Backbone.js, Underscore.js and jQuery. I have reviewed the similar question here on SO "backbone-forms with conditional fields", but our use case is a bit different: we have fields that depend on multiple conditions (e.g. only display if foo=1 and bar=2). [edit: I've already written a generic form change event handler to handle hiding and showing the different fields, so I don't want suggestions about that part.] I'm trying to use data attributes to contain a JSON representation of the field's conditions, but I'm open to other solutions. Here's roughly what I'm currently trying to achieve: &lt;input id="field3" name="field3" data-conditional-conditions='{"field1":"yes","field2":"yes"}' type="text"&gt; I've discovered that backbone-forms uses jQuery's attr() method to set any properties specified in the model's schema (here's the relevant line in backbone-forms' source), and it seems that attr() in turn uses Object.prototype.toString() to represent an object as a value when rendering the editor.* So what I've been trying to do is implement a Conditions object as follows: var Conditions = function(args){ c = { toString: function(){ return(JSON.stringify( _.omit(this, _.functions(this)) )); } }; c.toString = _.bind(c.toString, c); //makes 'this' refer to the 'c' object args = _.isObject(args) ? args : {}; //default value for args c = _.defaults(c, args); //sets object key/value pairs from arguments return c; }; My goal with the above was to replace the toString() method with one that would return a JSON-formatted representation of the object, without having to modify backbone-forms. Unfortunately, the above doesn't quite work, as the form field appears as follows: &lt;input id="field3" name="field3" tostring="{"data-conditional-conditions":{"field1":"yes","field2":"yes"}}" data-conditional-conditions="[object Object]" type="text"&gt…
tagged with: jquery
score: 0
tagged with: backbone.js
linked to: http://stackoverflow.com/q/11433314
has answer: http://stackoverflow.com/a/26288545
possible better answer: http://stackoverflow.com/a/26227627
has answer: http://stackoverflow.com/a/26227627
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: forms
has title: Trouble overriding toString on object/class
type: Question
answer count: 2

file
type: Tag
tag name: file
tags question: http://stackoverflow.com/q/26264900
tags question: http://stackoverflow.com/q/26278639

http://stackoverflow.com/comment/41087519
type: QuestionComment
has text: Your problem is that `$('#content').load(this.href);` in your case is a cross domain request, because your href is `http://www.google.com`. And as google does not allow you to load the content it will fail.
comment on: http://stackoverflow.com/q/26201676
score: 0
type: Comment

http://stackoverflow.com/a/26296966
type: Answer
answers question: http://stackoverflow.com/q/26293512
has comment: http://stackoverflow.com/comment/41356419
has body: I found a solution that could work for my requirement, but I haven't adapted it yet (still trying to figure it out): //assume tbl has id foobar document.getElementById('foobar').addEventListener('change',function(e) { e = e || window.event; var target = e.target || e.srcElement; var name = target.id || target.getAttribute('name'); alert('the ' + name + ' element changed!'); },false); Unfortunately the two solutions provided above do not work for my requirement.
score: 0

http://stackoverflow.com/comment/41088613
has text: change `nave` to `nav`
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26202288

http://stackoverflow.com/comment/41266106
has text: @4EACH that's not what OP asked for
comment on: http://stackoverflow.com/q/26298585
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26329900
has answer: http://stackoverflow.com/a/26330162
tagged with: stopwatch
downvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/57652013
has answer: http://stackoverflow.com/a/57652013
has answer: http://stackoverflow.com/a/51180703
has comment: http://stackoverflow.com/comment/41324009
score: 2
type: AnsweredQuestion
has body: I am implementing a stopwatch by using Javascript. I have basic html document setup and a javascript file called stopwatch.js in which I have the following code. I make use of setInterval function to execute the clockRunning function every 1 second(1000ms). This gives me control over sec, min and hour to increment them accordingly, but I am having difficulty with inserting millisecond into the stopwatch. How should I increment the millisecond from 0 to 1000 and then reset to zero? I have tried by decreasing the interval time for setInterval function to be called every 1ms and then set millisecond variable to time%1000 in which time variable is increased by 1 every time the function is called. But it does not give the result I want. The millisecond seems to be increasing way too slow. var running = 0 var time = 0; var hour = 0; var min = 0; var sec = 0; var millisec = 0; function start(){ started = window.setInterval(clockRunning, 1000); } function stop(){ window.clearInterval(started); } function clockRunning(){ time++; sec++; if (sec == 60){ min += 1; sec = 0; if (min == 60){ hour += 1; min = 0; } } document.getElementById("display-area").innerHTML = (hour ? (hour > 9 ? hour : "0" + hour) : "00") + ":" + (min ? (min > 9 ? min : "0" + min) : "00") + ":" + (sec > 9 ? sec : "0" + sec); }; Stopwatch 00:00:00.000 Start Stop Reset
type: Question
accepted answer: http://stackoverflow.com/a/26330162
has title: How do I display millisecond in my stopwatch?
tagged with: javascript
upvote count: 3
answer count: 3

http://stackoverflow.com/a/26254031
upvote count: 6
score: 6
has body: I don't think the dynamic super method that is provided by the most frameworks does work asynchronously - but if you use promises, it does need to (promises are always asynchronous). So if you need to call the parent's initialisation method from the promise callback, you can either try MyObject.extend({ init: function(parent, data){ var _super = this._super.bind(this); instance.web.Model('advanced.search') .call('check_duplication', [data]) .done(function (name) { _super(parent, name); }); // or in short, even just: // .done(this._super.bind(this, parent)); } }); or don't use _super at all but the native capability to reference your parent class: MyObject.extend({ init: function(parent, data){ var self = this; instance.web.Model('advanced.search') .call('check_duplication', [data]) .done(function (name) { instance.web.search.ExtendedSearchProposition.prototype.init // or whatever the parent method is .call(self, parent, newData); }); } });
has comment: http://stackoverflow.com/comment/41187863
has comment: http://stackoverflow.com/comment/41185106
has comment: http://stackoverflow.com/comment/41185941
has comment: http://stackoverflow.com/comment/41186389
has comment: http://stackoverflow.com/comment/41186064
downvote count: 0
answers question: http://stackoverflow.com/q/26252620
has comment: http://stackoverflow.com/comment/41184912
type: Answer

http://stackoverflow.com/q/26309648
tagged with: ajax
has answer: http://stackoverflow.com/a/26311868
type: UnansweredQuestion
has title: why when I´m using fileupload in primefaces I can do ajax call?
has body: I´ve an uploader that appears inside a dialog. So when I upload my file with success; I want my dialgo to close and if I got an error after the upload I don´t want to close my dialog. So my upload works but when it´s time to close my dialog I get the message from firebur: ReferenceError: args is not defined. Here is the code for my dialog: <p:dialog maximizable="true" minHeight="400" minWidth="400" id="dialogCarga" header="Cargar gestores" widgetVar="gestorCargarDialog" resizable="false" modal="true"> <p:ajax event="close" listener="#{gestorMB.handleClose}" update="agregarGestor"/> <h:form id="cargarGestor"> <p:growl id="growl2" showDetail="false" /> <h:outputText id="layoutUpd" value="Subir archivo:" /> <p:fileUpload invalidSizeMessage="El archivo tiene un tamaño superior al válido" label="Escoger" cancelLabel="Cancelar" uploadLabel="Cargar archivo" fileUploadListener="#{gestorMB.handleFileUpload}" id="SigUPD" oncomplete="handleCargarGestRequest(args)" invalidFileMessage="Tipo de archivo inválido, solo se aceptan archivos con extensión csv." process="@this" allowTypes="/(\.|\/)(csv)$/" sizeLimit="20971520" update=":gestorForm:, erroresCarga, growl2, SigUPD" fileLimit="1" fileLimitMessage="Favor de cargar un archivo a la vez."> </p:fileUpload> <p:outputPanel id="layoutGestores"> Descargar formato de carga de gestores. </p:outputPanel> * Nota: Todos los campos del archivo son obligatorios menos la extensión. El archivo debe estar libre de errores para poder cargar los gestores. <p:dataTable id="erroresCarga" value="#{gestorMB.msgError}" var="element" paginator="true" rows="10" emptyMessage="No existen errores" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,40" > <f:facet name="header"> Errores en el archivo #{gestorMB.nombreArchivo} </f:facet> <p:column headerText="Error"> #{element} </p:column> </p:dataTable> </h:form> </p:dialog> and here is the co…
tagged with: primefaces
type: Question
tagged with: jsf-2
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26214746
has comment: http://stackoverflow.com/comment/81706323
downvote count: 1
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/81662737
accepted answer of: http://stackoverflow.com/q/26213721
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26213721
type: Answer
has body: I'm not getting why you're not using a radio button, but here is a pretty easy example using only javascript. Working fiddle: http://jsfiddle.net/qgqto6t7/ HTML: Immediatly Later Javascript: var chk1 = document.getElementById("isChecked1"); var chk2 = document.getElementById("isChecked2"); chk1.onchange = function() { chk1.checked ? chk2.disabled = true : chk2.disabled = false; }; chk2.onchange = function() { chk2.checked ? chk1.disabled = true : chk1.disabled = false; }; However, please take in consideration using radio buttons for such a task. I'm pretty sure that they were invented for a reason :) Also, my example is in pure javascript because I'm not very familiar with angularjs or whatever you're using. In any case, you should easily be able to accomplish it using javascript only without affecting your scripts that much. Edit:: Moreover, according to your IDs, this script should already be working for you, regardless angularjs or not

http://stackoverflow.com/a/26217442
type: Answer
has comment: http://stackoverflow.com/comment/41116868
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/41116725
has body: pb is a jQuery object. not a dom reference so there is no innerHTML or style properties in it. You need to use the utility methods provided by jQuery to set those var pb = $('#spinner'); pb.html('&lt;img src="./ajax-loader.gif" width=200 height=40/&gt;').show(); In your case you can use .html() to set the innerHTML and .show() to make it visible
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26217398
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26217398
has comment: http://stackoverflow.com/comment/41116607

http://stackoverflow.com/a/26203517
score: 12
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41095461
upvote count: 12
downvote count: 0
has body: You need to fix several issues before having your code running properly. I've created a fork of your code and I've added some modifications that you'd need to include for being able to record the WebRTC stream. The fork is here. In addition, let me provide you a few comments: The example you have chosen (the 'Hello World') cannot be stopped (it doesn't have a 'stop' button in the GUI). Hence, you won't be able to stop the recording. You should use a more advanced example having "start" and "stop" buttons so that you can stop the recording to be able to access the stored media and view it. Probably you should use better the Magic Mirror Tutorial as your stating point because it uses WebSockets for signaling and it enables you to stop the recording. You should avoid race conditions. In you code, you're using a 'recorderEndpoint' rariable which have a race condition because it's initialized in a callback and used on a different callback, being both callbacks executing in paralell and being both subject to have race conditions. Edit: The example indeed has a stop button that, when pressed, releases the pipeline and, with that, stops the recording. Hence, comment 1 is nor really applicable.
answers question: http://stackoverflow.com/q/26199314
has comment: http://stackoverflow.com/comment/41096374
accepted answer of: http://stackoverflow.com/q/26199314

http://stackoverflow.com/a/26214487
answers question: http://stackoverflow.com/q/26213936
score: 0
type: Answer
has body: Some different between id selector and attribute selector is Since id selector called document.getElementById(), it only return the first element that have a id equal to that. However, if you use attribute selector, it will return all elements that have the id attribute that equals to that. But duplicated id is actually invalid in HTML, and should never used. if you really want to do that, use class instead. example $("#id-selector").click(function(){ $("#test").css("color", "red"); }); $("#attr-selector").click(function(){ $("*[id=test]").css("color", "blue"); }); http://jsfiddle.net/toucyqas/1/

http://stackoverflow.com/comment/41312749
type: AnswerComment
comment on: http://stackoverflow.com/a/26324023
has text: HTML tags are not enhanced and appear in plain text
type: Comment
score: 0

http://stackoverflow.com/q/26294531
accepted answer: http://stackoverflow.com/a/26294562
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26294727
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26294562
score: 0
has body: I wrote a directive with angularjs and jQuery cycle &lt;div class="slideshow" cycle&gt; &lt;img src="http://malsup.github.com/images/beach1.jpg" width="200" height="200" /&gt; &lt;img src="http://malsup.github.com/images/beach2.jpg" width="200" height="200" /&gt; &lt;img src="http://malsup.github.com/images/beach3.jpg" width="200" height="200" /&gt; &lt;img src="http://malsup.github.com/images/beach4.jpg" width="200" height="200" /&gt; &lt;img src="http://malsup.github.com/images/beach5.jpg" width="200" height="200" /&gt; &lt;/div&gt; var myApp = angular.module('myApp',[]); myApp.directive('cycle', function() { return { restrict: 'A', link: function(scope, element, attrs) { $(element).cycle({ fx: 'fade', timeout: 10 }); } }; }); this directive have no problem but I want extend it with some parameters for example I need something like this &lt;div class="slideshow" cycle='fade'&gt; &lt;img src="http://malsup.github.com/images/beach1.jpg" width="200" height="200" /&gt; ... &lt;/div&gt; you can see I set cycle='fade' cycle is directive and fade is my directive`s parameter for cycling effect How i can have a directive with parameter and use it like above ? &lt;div class="slideshow" cycle='fade'&gt; ////???????????? myApp.directive('cycle', function(effect) { ////????????????????? return { restrict: 'A', link: function(scope, element, attrs) { $(element).cycle({ fx: effect , ////????????????????? timeout: 10 }); } }; });
type: Question
has title: Directives with parameters in angularjs
tagged with: javascript
has answer: http://stackoverflow.com/a/26294727

http://stackoverflow.com/a/26361581
has comment: http://stackoverflow.com/comment/41384288
upvote count: 1
has body: you should use controller as syntax
answers question: http://stackoverflow.com/q/26345183
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41224948
comment on: http://stackoverflow.com/q/26276024
score: 0
has text: wow, that was great, didn't thought it was that easy. the template itself hadn't the option do disable jquery. but i found the corespondenting line of code and comment it out.seems to work pretty well. great. thanks a lot!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26314969
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26315036
possible better answer: http://stackoverflow.com/a/26315041
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26315041
tagged with: javascript
tagged with: jquery
has title: How can i get path without base href?
has body: Base assigned in html like this: &lt;base href="http://root/tempop/panel/"/&gt; Current browser URL is: http://root/tempop/panel/about/1 And i want this: about/1 How can i get?
accepted answer: http://stackoverflow.com/a/26315036
score: 0

http://stackoverflow.com/q/26336592
type: AnsweredQuestion
has title: Can't view Google Maps in HTML, Cordova
has answer: http://stackoverflow.com/a/26355051
type: Question
has comment: http://stackoverflow.com/comment/41337014
tagged with: google-maps
tagged with: javascript
tagged with: jquery
has body: I'm trying to displayGoogle Maps on a html page in cordova. The example code I'm trying to replicate is this one: https://developers.google.com/maps/documentation/javascript/examples/map-simple?hl=it Here is my code: HTML: Hello World index.js (I used some alert() and every method was called) var app = { initialize: function() { this.bindEvents(); }, bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function() { toIndex(); } }; $(document).ready( function(){ app.initialize(); }); function toIndex(){ google_map.init(); } google_map.js the class which take care of the map var google_map = (function(){ var _map; var _$map_canvas; function init(){ _$map_canvas = $('.app').find('#map-canvas'); var mapOptions = { zoom: 8, center: new google.maps.LatLng(-34.397, 150.644) }; _map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function getMap(){ return _map; } return { init:init, getMap:getMap } })(); and the index.css file #map-canvas { height: 100%; margin: 0px; padding: 0px } Instead of displaying the map, I see a white page. Second question: code here: http://jsfiddle.net/qbddfdk7/1/ This one doesn't work too, the problem is at line 14: if I change it from map = new google.maps.Map(map_canvas, mapOptions); to map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); It will work, but I can't undesrstand why.
answer count: 3
accepted answer: http://stackoverflow.com/a/26355051
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26341399
tagged with: cordova
has answer: http://stackoverflow.com/a/26336920
score: 0
possible better answer: http://stackoverflow.com/a/26336920

http://stackoverflow.com/comment/41114278
has text: yes..After hover in callback you are making h2 empty so that text disappears...I don't understand why you have written callback ..
comment on: http://stackoverflow.com/q/26216151
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/126424796
type: Comment
has text: And if one wants to try it out... https://www.w3schools.com/js/tryit.asp?filename=tryjs_debugger
type: AnswerComment
comment on: http://stackoverflow.com/a/55599220
score: 0

http://stackoverflow.com/comment/41219990
type: Comment
has text: site.com/blasnake would also match then.
score: 1
comment on: http://stackoverflow.com/a/26273315
type: AnswerComment

http://stackoverflow.com/comment/41289998
type: Comment
has text: Then where is `photo.jpg` coming from in the response?
comment on: http://stackoverflow.com/a/26301595
type: AnswerComment
score: 0

http://stackoverflow.com/a/26230183
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26230055
has comment: http://stackoverflow.com/comment/41141012
has body: This simplified version of your code seems to work: UK-clickme http://jsfiddle.net/0o1syz29/ What browser / version are you using?

http://stackoverflow.com/comment/41191034
score: 0
type: AnswerComment
has text: wow thanks a lot I appreciate it your help it's working well! Do you mind explaining the 3rd line of the code where it starts with 'div.station_info:contains(this text replace) css etc etc. ? I dont understand whats happening there and why are you replacing ":" and "is" ? Also, How can I include when I reclick on the same station_info DIV it will close ? I have to refresh the page in order for it to dissapear. Also, how does the JQuery know which ID station_info is being clicked on to show? I just dont want to copy this and not understand whats happening. thanks again!!
type: Comment
comment on: http://stackoverflow.com/a/26249955

http://stackoverflow.com/a/26314725
downvote count: 0
has comment: http://stackoverflow.com/comment/41298641
answers question: http://stackoverflow.com/q/26313476
has comment: http://stackoverflow.com/comment/41298608
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41298016
has comment: http://stackoverflow.com/comment/41296170
score: 1
has comment: http://stackoverflow.com/comment/41297022
has comment: http://stackoverflow.com/comment/41296810
has comment: http://stackoverflow.com/comment/41300895
has comment: http://stackoverflow.com/comment/41297730
has body: Add the second parameter to processDocument as below: function processDocument (id, myDocumentUtils) { var doc = db.myCollection.findOne({ _id : ObjectId(id)}); doc = myDocumentUtils.doStuff(doc); // need access to global myDocumentUtils object db.myCollection.save(doc); return doc; }; Then write db.eval() like this way: db.eval(function() { return processDocument.apply(this, arguments); }, "54382cb3233283cd3331ca1d", myDocumentUtils); For your environment, you can add the call back just behind the last parameter myDocumentUtils. APPEND --------------------- store below tow functions into db.system.js : function getMyDocumentUtils() { return myDocumentUtils = { doStuff: function (doc) { // do stuff with doc ... return doc; } }; } function processDocument (id) { var doc = db.myCollection.findOne({ _id : ObjectId(id)}); var myDocumentUtils = getMyDocumentUtils(); // added line doc = myDocumentUtils.doStuff(doc); // need access to global myDocumentUtils object db.myCollection.save(doc); return doc; }; Then call db.eval() as your original style.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26313476

http://stackoverflow.com/comment/41318017
has text: So, `eval` is needed? The data is safe, so it isn't a problem. Just paranoid from all those people saying "eval is evil! Never use is!"
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26326962

http://stackoverflow.com/q/26351728
linked to: http://stackoverflow.com/q/13390588
type: UnansweredQuestion
has title: make javascript added by setting innerHTML fire
linked to: http://stackoverflow.com/q/1197575
has comment: http://stackoverflow.com/comment/41363539
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41363517
duplicate of: http://stackoverflow.com/q/13390588
linked to: http://stackoverflow.com/q/1891947
tagged with: javascript
has body: I have a project where I need to run code that is set using innerHTML like so: element.innerHTML = ' '; When I do this, the code doesn't run. What can I do to make the code run? Thank you! If you down vote, please tell me why so I can improve this question.
score: 0
has comment: http://stackoverflow.com/comment/41363543

http://stackoverflow.com/comment/41182272
type: Comment
comment on: http://stackoverflow.com/a/26252730
has text: oh yes my bad, forgot to edit this part too ^^, i just removed return sentence
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41135022
type: QuestionComment
has text: you could try changing `$(".buttons").click(function () {` to `$(".buttons").on('click', function () {`
comment on: http://stackoverflow.com/q/26226875
score: 0
type: Comment

http://stackoverflow.com/q/26346238
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/41353941
has comment: http://stackoverflow.com/comment/41354138
has comment: http://stackoverflow.com/comment/41354088
has title: head tag repeating in body with ajax call on rails
has comment: http://stackoverflow.com/comment/41354396
has comment: http://stackoverflow.com/comment/41354172
has body: I'm new to ajax and I'm practicing a bit but I keep getting this kinda error which I can't seem to find an answer anywhere. I am at the index page and I want to load another page body with ajax for example: localhost:3000/main/index I want to load: localhost:3000/main/about currently I have this $('#site-nav').find('li:eq(1)').on('click', function(event){ event.preventDefault(); $.ajax('/main/about', { success: function(response) { $('body').html(response); }, error: function(request, errorType, errorMessage) { alert('Error: ' + errorType + ' with message: ' + errorMessage); }, timeout: 5000, beforeSend: function() { $('body').fadeOut(1000); }, complete: function() { $('body').fadeIn(1000); } }); }); when I do that, my body is repeated with the &lt;head&gt;...&lt;/head&gt; stuff and it also freezes for like 2 seconds. thanks! edit: this is what the body looks like &lt;body&gt; &lt;div id="overlay"&gt;&lt;/div&gt; &lt;header id="site-header" class="header section light"&gt; &lt;div class="container"&gt; &lt;div class="row"&gt; &lt;div id="logo" class="col-29 no-padding"&gt; &lt;h1 class="site-title"&gt;&lt;a href="/"&gt;&lt;img src="/assets/main/logo.png" alt="logo"&gt;&lt;/a&gt;&lt;/h1&gt; &lt;/div&gt; &lt;div id="header-widgets" class="col-7"&gt; &lt;!-- start social icons --&gt; &lt;!-- To be partial --&gt; &lt;nav id="header-social" class="text-right"&gt; &lt;a href="#" class="icon circle tooltip" title="Like us on facebook"&gt;&lt;i class="fa fa-facebook"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href="#" class="icon circle tooltip" title="Follow us on Twitter"&gt;&lt;i class="fa fa-twitter"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href="#" class="icon circle tooltip" title="Google Plus"&gt;&lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/nav&gt; &lt;!-- start site navigation --&gt; &lt;%= render partial: 'shared/main_nav' %&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/header&gt; &lt;main id="main"&gt; &lt;%= yield %&gt; &lt;/main&gt; &lt;div class="row row1"&gt; &lt;di…
has comment: http://stackoverflow.com/comment/41354206
answer count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41354474
has comment: http://stackoverflow.com/comment/41354603
type: Question

http://stackoverflow.com/comment/41256938
has text: What you are doing is ok, what do you mean by generating it dynamically, can you give a better example?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26293473
score: 0

http://stackoverflow.com/a/26332944
has body: Have you tried using something like this? Are you getting an error? Sorry, I cannot leave comments yet. StreamWriter _testData = new StreamWriter(Server.MapPath("~/data.txt"), true); _testData.WriteLine(TextBox1.Text); // Write the file. _testData.Flush(); _testData.Close(); // Close the instance of StreamWriter. _testData.Dispose(); // Dispose from memory.
type: Answer
has comment: http://stackoverflow.com/comment/41329960
answers question: http://stackoverflow.com/q/26332860
has comment: http://stackoverflow.com/comment/41351084
has comment: http://stackoverflow.com/comment/41365065
score: 0

http://stackoverflow.com/q/26286579
upvote count: 1
has body: I'm trying to write a script that can be run against any site, so i dont want to use any inline onchange approach. The script should fire any time there is a change to the inputCollection being created. When I run the snippet below, I get an instant iteration and output of ALL the input fields and their value. But on "change" nothing happens. So two issues: 1. I want it to only output the input that changed. 2. I want it to only run on the "change" event Any insights in to what I'm doing wrong here? Here is a fiddle. http://jsfiddle.net/owq4n2eg/ (function () { var inputCollection = document.getElementsByTagName("input"); for(var i=0;i&lt;inputCollection.length;i++) { inputCollection[i].addEventListener("change",console.log("name:" + inputCollection[i].name + ",value:"+inputCollection[i].value),false); }; })(); Thanks!
possible better answer: http://stackoverflow.com/a/26286770
linked to: http://stackoverflow.com/q/111102
has answer: http://stackoverflow.com/a/26286770
tagged with: javascript
has title: JavaScript - Capture "change" to any input
has answer: http://stackoverflow.com/a/26286970
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
favorite count: 0
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26286970

http://stackoverflow.com/q/26304694
tagged with: angularjs-scope
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: How can I make the object inherit all the properties from the other object. This is the code: this.makeReady = function(order) { var tempOrder = angular.copy(order); tempOrder.status = 1; angular.forEach(tempOrder.items, function(item){ item.status = 1; }) return $http.put('/rest/change/invoice/'+order.id+'/', tempOrder).success(function(){ order = tempOrder; // this doesn't work }); } In case of success: change the value of that object.
accepted answer: http://stackoverflow.com/a/26308111
answer count: 2
has comment: http://stackoverflow.com/comment/41283744
has answer: http://stackoverflow.com/a/26304844
has title: How an angular object gets the value of another object
has comment: http://stackoverflow.com/comment/41278968
favorite count: 0
possible better answer: http://stackoverflow.com/a/26304844
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
tagged with: object
has answer: http://stackoverflow.com/a/26308111
score: 1

http://stackoverflow.com/comment/64868492
comment on: http://stackoverflow.com/a/34856788
score: 0
type: AnswerComment
has text: @Darryl: what browser and OS are you using? You can try to remove autoplay and start the video manually.
type: Comment

http://stackoverflow.com/a/26299794
score: 0
has comment: http://stackoverflow.com/comment/41269688
has comment: http://stackoverflow.com/comment/41269330
answers question: http://stackoverflow.com/q/26299525
has body: You could pass the $default_date value in a data attribute of an html element. For example: &lt;p id="myDate" data-date="&lt;?php echo $default_date; ?&gt;"&gt;&lt;/p&gt; After that you can extract it with with Jquery like this: var date = $("#myDate").data("date");
type: Answer

http://stackoverflow.com/q/26339699
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41343115
has comment: http://stackoverflow.com/comment/41344899
type: Question
accepted answer: http://stackoverflow.com/a/26340653
has comment: http://stackoverflow.com/comment/41342138
has comment: http://stackoverflow.com/comment/41342301
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41342186
has title: Rendering JavaScript templates
score: 0
has comment: http://stackoverflow.com/comment/41341995
answer count: 1
tagged with: templates
has answer: http://stackoverflow.com/a/26340653
has body: I wish to display a popup when the user hovers over a particular link. To do so, I first request the particular JSON data from the server via Ajax. The server queries the DB, and escapes any data which happens to be user provided using htmlspecialchars(), and echos json_encode($data). The client then assembles the HTML using the below template. The client then displays the popup. My question only relates to rendering the template. Is there a better approach which will provide one or all of the following benefits? Templates are more readable. Templates are easier to maintain. Templates can be extended. Custom methods to display phone numbers, etc need not be created. Site is safer from an XSS respective. htmlspecialchars escaping is moved from the server to the client. Other benefits which I have not even thought of? Thank you function getTemplate(type,json) { switch(type) { case 'person': return ' Name: '+((d.firstname&&json.lastname)?json.firstname+' '+json.lastname:((json.firstname)?json.firstname:json.lastname))+' ' +' Account: '+json.account_name+' ' +((json.title)?' Title: '+json.title+' ':'') +' User Name: '+json.username+' ' +' Password: '+json.password+' ' +' Communication Method: '+json.communication_method+' ' +((json.email)?' Email: '+json.email+' ':'') +((json.account_phone)?' Account Phone: '+ayb.display_phone(json.account_phone)+' ':'') +((json.phone)?' Direct Phone: '+ayb.display_phone(json.phone)+' ':'') +((json.mobile_phone)?' Mobile Phone: '+ayb.display_phone(json.mobile_phone)+' ':'') +((json.account_fax)?' Account Fax: '+ayb.display_phone(json.account_fax)+' ':'') +((json.fax)?' Direct Fax: '+ayb.display_phone(json.fax)+' ':'') +((json.address || json.location)?' Address: '+json.address+((json.address && json.location)?' ':'')+json.location+' ':'') +' '; break; case 'company': return 'bla bla bla'; break; case 'somethingElse': return 'bla bla bla'; break; return ' Invalid Template '; } }

http://stackoverflow.com/comment/62766998
has text: Wish I had seen your answer an hour ago Gary. I used your code, and slightly updated version and it fixed my problem immediately.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/28254989

http://stackoverflow.com/q/26216900
type: Question
has comment: http://stackoverflow.com/comment/41115817
has body: In mozilla firefox entering data into a textbox which acts as a radio button needs a double click...how to make it possible through single click.Even after selecting the radio button and If i click the textbox once and try to enter only the radio button gets selected and the data is not entered.
upvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
score: -1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41116103
has title: in firefox entering data into a textbox which acts as a radio button needs a double click
has comment: http://stackoverflow.com/comment/41116429
has answer: http://stackoverflow.com/a/26275850
downvote count: 1

http://stackoverflow.com/a/26291972
has body: var vals = []; $('input:checkbox:checked').each(function() { vals.push($(this).val()); });
score: 0
answers question: http://stackoverflow.com/q/26291910
type: Answer

http://stackoverflow.com/q/26273938
has answer: http://stackoverflow.com/a/26282447
has body: I use Q.all in conjunction with spread in order to migrate two promise.then being simultaneously performed on successful resolution of a promise: var p1=112; var p2=function(data){ console.log(data); return getFormDataWithDropdown(objtype,scenario); }; var guidRequest=processGuidRequest(); if(!Q.isPromise(guidRequest)) { guidRequest=Q(guidRequest); } guidRequest.all([p1,p2]) .spread(function(geoVal,formVal){ console.log(geoVal); console.log(formVal); }).done(); p1 is a value and p2 is a function that returns a function called getFormDataWithDropdown which returns a promise or a value based on the resolution of a chained set of promises.However I get this error when I run this code: Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type The error occurs in this function: Promise.prototype.spread = function (fulfilled, rejected) { return this.all().then(function (array) { return fulfilled.apply(void 0, array);//error occurs here }, rejected); };
type: AnsweredQuestion
has title: Error using spread with Q.all
type: Question
tagged with: browser
answer count: 1
accepted answer: http://stackoverflow.com/a/26282447
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
score: 0
tagged with: promise

http://stackoverflow.com/q/26280366
type: AnsweredQuestion
upvote count: 0
type: Question
has answer: http://stackoverflow.com/a/26280421
has answer: http://stackoverflow.com/a/26280401
accepted answer: http://stackoverflow.com/a/26280421
has title: Weird HTML & JavaScript Error
tagged with: javascript
score: -1
has body: I keep getting an error saying my function "key" is not defined. Here is the HTML code: Money: 0 And the JavaScript: int money = 0; function key() { money += 1; document.getElementById("money").innerHTML = money; }
answer count: 2
downvote count: 1
tagged with: undefined
tagged with: defined
favorite count: 0
possible better answer: http://stackoverflow.com/a/26280401
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41232605

http://stackoverflow.com/comment/41282112
type: QuestionComment
score: 0
has text: You are missing PX in top and why not using .parent() instead of closest()
comment on: http://stackoverflow.com/q/26307130
type: Comment

http://stackoverflow.com/q/26306255
type: Question
tagged with: firefox
has answer: http://stackoverflow.com/a/30899147
tagged with: javascript
tagged with: sendkeys
score: 0
tagged with: file-io
answer count: 1
type: UnansweredQuestion
has body: I am working on automating file upload for my site. I am using FF 31, selenium 2.39. The issue that i am seeing is that file upload with below java code works on Chrome 37 but does not work on FF 31. I tried getting it working with selenium 43 and selenium 39 for FF 28-31 versions yet so no results. Then I added inline style with opacity set to 1 from 0 as the style of the input element was not visible using javascript.After executing the javascript i printed out the characteristics. I see that element is enabled and displayed and has the opacity set to 1, that is all my changes applied. still my sendKeys() doesnt seem to work with it.Although i did think of AutoIT i didnt want to add another tool and buy more trouble for myself(compatibility issues between my site/selenium/browser/autoit).Can you guys suggest something that i can do to fix this issue? WebElement input = driver.findElement(By.xpath("//input[@id='img']")); input.sendKeys("C:/Pictures/img1.gif"); final JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("document.getElementById('img').style.opacity=\"1\";"); &lt;i class="coral-Icon"&gt; &lt;input id="img" class="FileUpload" type="file" onchange="preview();" data-upload-url="URL" name="file"&gt; &lt;/i&gt; System.out.println("enabled??== " + input.isEnabled()+ " === "+ input.isDisplayed()+" style "+ input.getAttribute("style")); console-output : enabled??== true === true style opacity: 1;
tagged with: selenium-webdriver
has title: sendkeys does not work for File input selenium 2.39 Firefox 31

http://stackoverflow.com/q/26317491
score: 0
type: UnansweredQuestion
type: Question
tagged with: fabricjs
tagged with: canvas
has answer: http://stackoverflow.com/a/26352280
answer count: 1
tagged with: javascript
has body: I am trying to identify each drawing. For example after I draw an object I want that object to have the propriety name = "My Drawing 1" so I can easily refer to it later by canvas.getObjectByName('My Drawing Name'); getObjectByName function fabric.Canvas.prototype.getItemByName = function(name) { var object = null, objects = this.getObjects(); for (var i = 0, len = this.size(); i &lt; len; i++) { if (objects[i].name &amp;&amp; objects[i].name === name) { object = objects[i]; break; } } return object; }; The code that activates drawing function: canvas.isDrawingMode = true; var img = $("#patternImg")[0]; var texturePatternBrush = new fabric.PatternBrush(canvas); texturePatternBrush.source = img; texturePatternBrush.selectable = true; texturePatternBrush.name = img.getAttribute("data-name"); canvas.freeDrawingBrush = texturePatternBrush; canvas.freeDrawingBrush.width = img.getAttribute("data-height"); Using the code above I can check if can verify if a drawing exists by: fabric.Canvas.prototype.getDrawByName = function(name) { var object = null, objects = this.getObjects(); for (var i = 0, len = this.size(); i &lt; len; i++) { if (objects[i].canvas.freeDrawingBrush.name &amp;&amp; objects[i].canvas.freeDrawingBrush.name === name) { object = objects[i]; break; } } return object; }; The problem is each time I am drawing an object that has another name canvas.FreeDrawingBrush.name will be the same for each object on my canvas. I am not so familiar with FabricJS and I don't even know if what I am trying to do is even possible. At least I made myself clear what I am trying to do ?
has title: Identify each drawn path in Fabric JS

http://stackoverflow.com/q/26335389
has answer: http://stackoverflow.com/a/31399969
has body: How to make a b2EdgeShape? Making a simple b2EdgeShape. Simple boilerplate b2EdgeShape to build on top of. My code: var bodyDef = new Box2D.Dynamics.b2BodyDef; bodyDef.type = Box2D.Dynamics.b2Body.b2_staticBody; bodyDef.position.SetV(new Box2D.Common.Math.b2Vec2(250/30, 250/30)); var fixtureDef = new Box2D.Dynamics.b2FixtureDef; fixtureDef.shape = new Box2D.Collision.Shapes.b2EdgeShape( new Box2D.Common.Math.b2Vec2(2.5,0), new Box2D.Common.Math.b2Vec2(2.5,2.5)); fixtureDef.density = 0; fixtureDef.restitution = 0.0; fixtureDef.friction = 0.0; var body = world.CreateBody(bodyDef); var fixture = body.CreateFixture(fixtureDef);
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has title: Box2DWeb b2EdgeShape
score: 1
accepted answer: http://stackoverflow.com/a/31399969
tagged with: box2dweb
tagged with: box2d
type: Question
downvote count: 0
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/26218934
has body: So basically i'm calling this function using async js async.parallel([processQuery],function(r){}); But for some reason when i have query which is a few characters long, i'm getting an error - Error: error on line 1 at column 72: xmlParseEntityRef: no name at downloadPlugin.processQuery (chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/search-engine/downloads.js:4:20) at chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:570:21 at chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:249:17 at replenish (chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:194:21) at chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:206:33 at chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:251:21 at chrome-extension://eciaeefgndhpejknefmbegjdlkkihbkb/scripts/external/async.js:575:34 - var processQuery = function(cb){ chrome.downloads.search({query:[currentQuery], limit:5, state:'complete',orderBy:['-startTime']}, function(results){ var formattedResults = []; for(var i in results){ if(results[i].url == undefined) continue; new function(downloadId, downloadTitle){ formattedResults.push({ launch: function(){ chrome.downloads.show(downloadId); }, description: 'kaka' }); }(results[i].id, results[i].filename); } console.log(formattedResults); cb(null, {name:'Downlaods',results:formattedResults}); }); }
tagged with: javascript
score: 0
tagged with: google-chrome-extension
tagged with: asynchronous
has title: Weird xmlParseEntityRef error on chrome.downloads.search async call
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/41121173
has comment: http://stackoverflow.com/comment/41149997

http://stackoverflow.com/q/26272872
downvote count: 0
has answer: http://stackoverflow.com/a/26275332
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: google-chrome-extension
has title: How to test Chrome extension for auto-update feature?
accepted answer: http://stackoverflow.com/a/26276485
tagged with: chrome-web-store
answer count: 2
upvote count: 1
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26276485
possible better answer: http://stackoverflow.com/a/26275332
type: AnsweredQuestion
has body: I am about to finish my Google Chrome extension. If I'm not mistaking all Chrome apps come with a capability of auto-updating. If so, is there a way for me to test it before I submit my app to the Chrome Web Store? PS. Also do I need to account for any special conditions in my extension?

http://stackoverflow.com/a/26291944
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26266469
answers question: http://stackoverflow.com/q/26266469
upvote count: 8
has body: Intern runs its tests in an AMD environment, so require is the AMD loader's require, not Node's, hence your error. To load Node modules, use the intern/dojo/node! AMD plugin and include them in your module's dependencies, e.g.: define([ ..., 'intern/dojo/node!http' ], function (..., http) { // Now http contains the exports of Node's http module }); This is documented in Intern's User Guide under Testing CommonJS Modules.
has comment: http://stackoverflow.com/comment/59677232
type: AcceptedAnswer
type: Answer
score: 8

http://stackoverflow.com/comment/70264167
type: Comment
has text: See @NealeU's answer below for the correct way to handle the race condition that ChristopherCamps mentions. That seems like a more robust way to handle lists in general.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26254086

http://stackoverflow.com/comment/41144861
type: Comment
score: 1
type: AnswerComment
has text: In your img tag, you have given Id as "toChange4 ; reload-slider" and "toChange5 ; reload-slider" which are invalid . Also, ID doesn't work the way classes work. Elements should have single unique ID
comment on: http://stackoverflow.com/a/26232385

http://stackoverflow.com/q/26344244
upvote count: 1
tagged with: javascript
favorite count: 0
has body: Short explanation: I have a webpage in chrome browser which have no url and have some sources which are acessible only by chrome devtools. Devtools are started with remote debugging flag, which allows me type localhost:9222 in browser and see devtools there with all sources to debug. Details: I'm starting a node-webkit app, which is, in a short words, is a node.js script along with my app scripts embedded into a webpage, which is displayed by standalone webkit engine. So it's basically normal webpage in chrome but without url. And then I want to debug scripts with remote debugger in IDEA (or Eclipse). This page have no url, but it have chrome developer tools which can be enabled for remote debug. Question: I want to use standart IDE like eclipse/IDEA instead of devtools to debug code. How do i connect devtools remote debug to IDE?
downvote count: 0
answer count: 0
type: UnansweredQuestion
tagged with: node-webkit
tagged with: google-chrome
type: Question
tagged with: debugging
score: 1
tagged with: google-chrome-devtools
has title: How do you connect webkit devtools from IDE?

http://stackoverflow.com/a/26221689
has body: You can't use two identical id . Id must be unique. If you want use two identical name you have to use class instead of id.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26221418

http://stackoverflow.com/q/26269175
score: 0
has title: how to increase spawn rate over time in javascript game
has body: I'm coding a game in javascript and I have this line of code: setInterval(function () {spawnEnemy()}, 3000); currently this spawns an enemy every 3000 milliseconds, but I want it to lower that rate by twenty percent every ten seconds, so that eventually it's spawning enemies really fast. I tried doing this by nesting setInterval's but all I succeeded in doing was crashing my browser. Can anyone provide the correct code for what I'm trying to accomplish?
upvote count: 1
has comment: http://stackoverflow.com/comment/41212806
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26269227
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: nested
tagged with: setinterval
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26269227

twitter-bootstrap
tags question: http://stackoverflow.com/q/26261257
tags question: http://stackoverflow.com/q/26309040
tags question: http://stackoverflow.com/q/26327323
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/26335623
tags question: http://stackoverflow.com/q/26352181
tags question: http://stackoverflow.com/q/26205248
tags question: http://stackoverflow.com/q/26211104
tags question: http://stackoverflow.com/q/26202597
tags question: http://stackoverflow.com/q/26266140
tags question: http://stackoverflow.com/q/26206344
tags question: http://stackoverflow.com/q/26217172
tags question: http://stackoverflow.com/q/26219936
tags question: http://stackoverflow.com/q/26327069
tags question: http://stackoverflow.com/q/26201676
tags question: http://stackoverflow.com/q/26326606
tags question: http://stackoverflow.com/q/26210132
tags question: http://stackoverflow.com/q/26304057
tags question: http://stackoverflow.com/q/26242986
tags question: http://stackoverflow.com/q/26268044
tags question: http://stackoverflow.com/q/26213400
tags question: http://stackoverflow.com/q/26298624
tags question: http://stackoverflow.com/q/26288026
tags question: http://stackoverflow.com/q/26250435
tags question: http://stackoverflow.com/q/26269823
tags question: http://stackoverflow.com/q/26319234
tags question: http://stackoverflow.com/q/26253455
tags question: http://stackoverflow.com/q/26254318
tags question: http://stackoverflow.com/q/26312456
tags question: http://stackoverflow.com/q/26296290
tags question: http://stackoverflow.com/q/26320985
tags question: http://stackoverflow.com/q/26349884
tags question: http://stackoverflow.com/q/26288255
tags question: http://stackoverflow.com/q/26329644
tags question: http://stackoverflow.com/q/26349326
tags question: http://stackoverflow.com/q/26276566
tags question: http://stackoverflow.com/q/26323027
tags question: http://stackoverflow.com/q/26236898
tags question: http://stackoverflow.com/q/26273249
tags question: http://stackoverflow.com/q/26296980
type: Tag
tags question: http://stackoverflow.com/q/26294518
tags question: http://stackoverflow.com/q/26239798
tags question: http://stackoverflow.com/q/26231116
tags question: http://stackoverflow.com/q/26340633
tags question: http://stackoverflow.com/q/26305713
tags question: http://stackoverflow.com/q/26329061
tags question: http://stackoverflow.com/q/26333522
tags question: http://stackoverflow.com/q/26281155
tags question: http://stackoverflow.com/q/26201617
tags question: http://stackoverflow.com/q/26335677
tags question: http://stackoverflow.com/q/26203729
tags question: http://stackoverflow.com/q/26225972
tags question: http://stackoverflow.com/q/26323558
tags question: http://stackoverflow.com/q/26323529
tags question: http://stackoverflow.com/q/26307203
tags question: http://stackoverflow.com/q/26307437
tags question: http://stackoverflow.com/q/26245876
tags question: http://stackoverflow.com/q/26295394
tags question: http://stackoverflow.com/q/26253589
tags question: http://stackoverflow.com/q/26336719
tags question: http://stackoverflow.com/q/26307836
tags question: http://stackoverflow.com/q/26222210
tags question: http://stackoverflow.com/q/26255084
tags question: http://stackoverflow.com/q/26212235
tags question: http://stackoverflow.com/q/26265982
tags question: http://stackoverflow.com/q/26313096
tags question: http://stackoverflow.com/q/26333124
tags question: http://stackoverflow.com/q/26230285
tags question: http://stackoverflow.com/q/26327010
tags question: http://stackoverflow.com/q/26351994
tags question: http://stackoverflow.com/q/26237914
tags question: http://stackoverflow.com/q/26240446
tags question: http://stackoverflow.com/q/26232112
tags question: http://stackoverflow.com/q/26297481
tags question: http://stackoverflow.com/q/26199642
tags question: http://stackoverflow.com/q/26219485
tags question: http://stackoverflow.com/q/26253687
tags question: http://stackoverflow.com/q/26284187
tags question: http://stackoverflow.com/q/26219689

http://stackoverflow.com/a/26311010
downvote count: 0
has body: Yes, you can. There is a useful library for that. You might want to take a look: http://phantomjs.org/screen-capture.html Since PhantomJS is using WebKit, a real layout and rendering engine, it can capture a web page as a screenshot. Because PhantomJS can render anything on the web page, it can be used to convert contents not only in HTML and CSS, but also SVG and Canvas. Hope it helps.
score: 1
answers question: http://stackoverflow.com/q/26310247
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41133562
type: QuestionComment
score: 0
has text: Okay, I posted some code. See if that works.
comment on: http://stackoverflow.com/q/26225903
type: Comment

http://stackoverflow.com/a/26353349
score: 1
type: Answer
answers question: http://stackoverflow.com/q/26353086
upvote count: 1
has body: It should be the cross-domain issue. Open your web console(F12) and see whether you have got the "Access-Control-Allow-Origin: * " related error. or else follow the below test steps. if you are using chrome browser, close or kill all the chrome instances. open a command line (cmd) and go to your "chrome" installation folder. issue this command to open the chrome in security disable mode: chrome.exe --allow-file-access-from-files --disable-web-security run your application on that chrome window and check whether you got the www.google.com inside your div. if that is working, that confirms you have the cross-domain issue. to sort that one, you have couple of techniques out there. 1. using cross-domain.xml inside your app server. 2. use jsonp callback function with your $.ajax() 3. configure cors.jar in your path search how to use above techniques to sort out your cross-domain issue. This is just a guidance for you..hope it will help.
downvote count: 0

http://stackoverflow.com/comment/41425072
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26347821
has text: Yeah thanks! That solved the Controller code running twice. I think I need to remake this question. The problem is that when the template code gets loaded in, it seems like something needs to reinitialize. No problems if I leave the datatables script tag inside the template html, only a problem if I try to move it into the controller where it belongs

http://stackoverflow.com/a/26273323
upvote count: 1
answers question: http://stackoverflow.com/q/26256854
downvote count: 0
has comment: http://stackoverflow.com/comment/41227282
type: AcceptedAnswer
has body: I would do something like this: For each movable element, create a selected stream (from clicks I'm guessing) and map each click to the id of the element. Merge all those streams to create a property of the currently selected element. Map the keyDown stream to deltas, with up being {x: 0, y: -1}, let's call it e.g. keyDelta Combine the selectedElement and keyDelta streams to create a stream of move events, e.g. {id: 37, delta: {x: 0, y: -1}, let's call it keyDeltas Refactor you dragging code to produce a stream with same kind of values (id &amp; delta) Merge the keyDeltas and dragging streams, now you have a single stream with all moves of all objects Scan that stream, now you a stream with the position of all objects onValue of the position stream, do the rendering.
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26256854

http://stackoverflow.com/q/26271996
answer count: 3
has answer: http://stackoverflow.com/a/26272049
tagged with: javascript
tagged with: jquery
has title: Find parent sibling td hidden value
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41217800
has answer: http://stackoverflow.com/a/26272059
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26272063
accepted answer: http://stackoverflow.com/a/26272063
has body: I want to find parent sibling td hidden value when clicking correctAttempt class in div. Already tried script with no success.
type: Question
possible better answer: http://stackoverflow.com/a/26272049

http://stackoverflow.com/comment/41266022
type: QuestionComment
has text: @Sirko How to look into localStorage?
comment on: http://stackoverflow.com/q/26298474
score: 0
type: Comment

http://stackoverflow.com/a/26261204
has body: The answer I would like to give is to make the class names uniform, and use removeClass toward all the buttons before setting one of them active. Here's an idea: .btn{ background-image:(....); background-position: ....; } #button1&.active{ //Active button styles background-image:(....); background-position: ....; } $("#button1").click(function(){ $(".btn").removeClass("active"); $(this).addClass("active"); })
score: 0
answers question: http://stackoverflow.com/q/26261022
type: Answer

http://stackoverflow.com/a/26246812
has body: Some great jQuery answers here, I'll cover the comparisons part. You don't need five comparisons, just three (or two if you're lucky). Compare a and b, and swap them if a &gt; b. Then compare c and b. If c &gt; b, you're done, otherwise compare c and a: if (a &gt; b) x = a, a = b, b = x; if (c &lt; b) if (c &lt; a) result = [c, a, b]; else result = [a, c, b]; else result = [a, b, c]; If all numbers are 32-bit positive ints, you can sort them without any comparisons at all: min = function(a,b) { return b + ((a-b) &amp; ((a-b)&gt;&gt;31)) } max = function(a,b) { return a - ((a-b) &amp; ((a-b)&gt;&gt;31)) } x = min(a, min(b, c)); z = max(a, max(b, c)); y = (a + b + c) - (x + z); result = [x, y, z];
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26245482
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/41340424
type: Comment
score: 1
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.
comment on: http://stackoverflow.com/a/26338713
type: AnswerComment

http://stackoverflow.com/comment/41126727
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26218948
has text: I thought GitHub doesn't allow using the code served by them on websites (they don't set the mime headers)
score: 0

http://stackoverflow.com/comment/41166083
comment on: http://stackoverflow.com/q/26243576
score: 1
type: QuestionComment
type: Comment
has text: That is an array of objects, not a two-dimensional array. I am not quite sure what you are asking though. When you say you want to "submit" this data, do you mean like in a POST?

http://stackoverflow.com/a/26223724
score: 0
has comment: http://stackoverflow.com/comment/41129426
type: Answer
has comment: http://stackoverflow.com/comment/41129064
has comment: http://stackoverflow.com/comment/41130343
has comment: http://stackoverflow.com/comment/41129265
has comment: http://stackoverflow.com/comment/41129344
has body: In JavaScript, functions are first-class citizens. That means they can be treated as variables, just like strings, numbers, etc. When you do: forEach(numbers, function(number) { sum += number; }); You are passing forEach an anonymous function. Instead of the function being in a variable, it's created on-the-fly. Inside your forEach function, action will contain your anonymous function. In for for loop, the action function is called for each element.
answers question: http://stackoverflow.com/q/26223650
has comment: http://stackoverflow.com/comment/41129092

http://stackoverflow.com/a/26332665
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41359451
has comment: http://stackoverflow.com/comment/41359709
has body: This should do the trick for you. function myFunction() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var cell = ss.getActiveCell(); var row = cell.getA1Notation()[1]; var column = cell.getA1Notation()[0]; if (row != 2) { ss.toast("not valid selection, must be in row 2"); return; } var sourceVal = ss.getRange(column+(row - 1)).getValue(); cell.setValue(sourceVal); return; }
type: Answer
has comment: http://stackoverflow.com/comment/41333829
answers question: http://stackoverflow.com/q/26332257
has comment: http://stackoverflow.com/comment/41330432
score: 0
accepted answer of: http://stackoverflow.com/q/26332257

http://stackoverflow.com/comment/41313136
score: 0
type: Comment
type: QuestionComment
has text: @Tambo Can you give an example? Like fiddle?
comment on: http://stackoverflow.com/q/26324252

http://stackoverflow.com/q/26315600
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41298258
has comment: http://stackoverflow.com/comment/41297220
has comment: http://stackoverflow.com/comment/41297604
tagged with: conditional-statements
has title: Javascript: " != " Operator doesn't work properly
downvote count: 1
has body: Good evening ! I am facing a strange behavior with my js/jquery, for a simple function where I am retrieving the last ID of a row, in order to check wether or not it's different from the previous one: oldMsgId = 0; // Ajax... currentId = $( ".message_container tr:last" ).attr('id'); checkNewMsg(currentId); // ... End Ajax. function checkNewMsg(MsgId) { if (MsgId != oldMsgId) { var snd_msg = new Audio('sound/msg.wav'); snd_msg.volume = 0.3; snd_msg.play(); } oldMsgId = MsgId ; } The system works, however, when no new messages are retrieved, which means the latest ID is EQUAL to the old ID, it still execute the condition ! Of course, it will execute once the page is loaded because the oldMsgId is set to 0, but after that by testing with alerts, it has shown that the condition is running as it should not ! It drives me crazy, if someone has a solution I would be glad to hear it :) EDIT : RESOLVED Well, while using alerts inside the function this time, it appears I have made a huge mistake placing my oldMsgId var inside a loop function (which calls to ajax), so, the variable was reset to 0 everytime and thus made the difference, I'm very sorry xD! Problem resolved, thanks everyone !
type: Question
has comment: http://stackoverflow.com/comment/41297588
has comment: http://stackoverflow.com/comment/41297162
has comment: http://stackoverflow.com/comment/41297235
upvote count: 0
has comment: http://stackoverflow.com/comment/41302226
tagged with: javascript
score: -1
tagged with: behavior
tagged with: operator-keyword
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26316191

http://stackoverflow.com/a/26212576
answers question: http://stackoverflow.com/q/26212554
has body: ^Error(?!.*?circle).*$ Try this.Do not forget to set i ,m, g flags.See demo. http://regex101.com/r/hQ1rP0/17
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26212554
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26284936
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26284905
type: Answer
answers question: http://stackoverflow.com/q/26284905
downvote count: 1
has comment: http://stackoverflow.com/comment/41242164
has body: window.parseFloat(num, 10) should work.
upvote count: 5
score: 4

http://stackoverflow.com/comment/41343606
has text: @Scimonster well the question itself is clear evidence that that's how it actually works (because it does).
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26340619
score: 0

http://stackoverflow.com/comment/41332864
has text: In your code you `$watch` the `resetNumber` function, so you want to know about changes of the **function** itself. If you want to be notified about the changes of the number, you must `$watch` the `number` variable instead of function.
comment on: http://stackoverflow.com/q/26334610
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/26301035
has comment: http://stackoverflow.com/comment/41271809
type: Answer
accepted answer of: http://stackoverflow.com/q/26300966
has comment: http://stackoverflow.com/comment/41270747
answers question: http://stackoverflow.com/q/26300966
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/41271991
has comment: http://stackoverflow.com/comment/41271017
upvote count: 4
has comment: http://stackoverflow.com/comment/41271410
type: AcceptedAnswer
has body: Instead of: $('.closeMe').click( Which will bind the click event for all .closeMe elements present in the DOM at that moment use: $(document).on('click', .closeMe, Which will bind the click event to body and then delegate it to .closeMe, meaning that it will fire for .closeMe elements added dynamically even after the initial binding. i.e $(document).on('click', '.closeMe', function() { $('.projectDisplay').fadeOut(500); } ); Try it at http://jsfiddle.net/L4Lmf6zy/1/

http://stackoverflow.com/a/26210040
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41102974
type: AcceptedAnswer
has body: Found a simple/capital issue in your IDs, did a small fiddle, check this out. function computeCost() { var orange = document.getElementById("orange").value; // Compute the cost var a = orange * 1.99; var watermelon = document.getElementById("watermelon").value; var b = watermelon * 4.99; var pineapple = document.getElementById("pineapple").value; var c = pineapple * 4.69; var total = eval(a + b + c); document.getElementById("cost").value = total; } //* end of computeCost
accepted answer of: http://stackoverflow.com/q/26209969
type: Answer
answers question: http://stackoverflow.com/q/26209969
score: 2

http://stackoverflow.com/q/26242868
tagged with: angularjs
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26248479
tagged with: angularjs-directive
has title: Multiple Parent Directive Instances
tagged with: javascript
has body: I am trying to create a pair of directives with a parent child relationship. I found that '^require' works well for this but the issue is I would like to have multiple instances of the directives on the page at the same time and can't figure out how to tell the child directives which parent directive is their parent. An example would be using directive A as the parent and B as the child. If I add require A to directive B it knows that A is it's parent. However if I have A1, A2, B1 and B2 the B directives are still the child of the A directives but I can't specify that the instance of A with id A1 is the parent of B with id B1 like wise A2 is the parent of B2. Maybe I'm making this too complicated or just going in the wrong direction. As always any idea's or tips are appreciated.
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41168241

http://stackoverflow.com/comment/41186640
score: 0
has text: Thank you! I had a feeling I was missing something simple.
comment on: http://stackoverflow.com/a/26254810
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26319873
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/26328537
has comment: http://stackoverflow.com/comment/41305252
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
possible better answer: http://stackoverflow.com/a/26328537
tagged with: jasmine
has comment: http://stackoverflow.com/comment/41310557
answer count: 3
has answer: http://stackoverflow.com/a/26328984
has comment: http://stackoverflow.com/comment/41314718
favorite count: 0
score: 4
tagged with: promise
has comment: http://stackoverflow.com/comment/42055344
has title: How to Test Value Returned in Promise from AngularJS Controller with Jasmine?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41305515
has body: I have a controller that expose a function that returns some text after a rest call. It works fine, but I'm having trouble testing it with Jasmine. The code inside the promise handler in the test never executes. The controller: /* global Q */ 'use strict'; angular.module('myModule', ['some.service']) .controller('MyCtrl', ['$scope', 'SomeSvc', function ($scope, SomeSvc) { $scope.getTheData = function (id) { var deferred = Q.defer(); var processedResult = ''; SomeSvc.getData(id) .then(function (result) { //process data processedResult = 'some stuff'; deferred.resolve(processedResult); }) .fail(function (err) { deferred.reject(err); }); return deferred.promise; } }]); The test: describe('some tests', function() { var $scope; var $controller; var $httpBackend; beforeEach(function() { module('myModule'); inject(function(_$rootScope_, _$controller_, _$httpBackend_) { $scope = _$rootScope_.$new(); $controller = _$controller_; $httpBackend = _$httpBackend_; //mock the call that the SomeSvc call from the controller will make $httpBackend.expect('GET', 'the/url/to/my/data'); $httpBackend.whenGET('the/url/to/my/data') .respond({data:'lots of data'}); $controller ('MyCtrl', { $scope: $scope }); }); }); describe('test the returned value from the promise', function() { var prom = $scope.getTheData(someId); prom.then(function(result) { expect(result).toBe('something expected'); //this code never runs }) }); });
has comment: http://stackoverflow.com/comment/41317137
has comment: http://stackoverflow.com/comment/75957445
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26328984
has answer: http://stackoverflow.com/a/44515768

http://stackoverflow.com/q/26228309
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26230185
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am attempting to make a navigation menu become fixed on scroll. This effect is perhaps best illustrated in in a fiddle as the fiddle describes it a lot more concisely than in prose: $(function() { var secondaryNav = $(".secondary-navigation"); var secondaryNavScrollTop = secondaryNav.offset().top; $(window).on("scroll", function() { if ($(window).scrollTop() > secondaryNavScrollTop) { $("body").css("padding-top", "100px"); secondaryNav.addClass("stuck"); } else { $("body").css("padding-top", "0px"); secondaryNav.removeClass("stuck"); } }); }); * { margin: 0; padding: 0; } .section-jumbo { background-color: red; padding: 150px; } .secondary-navigation { text-align: center; background-color: tomato; } li { display: inline-block; height: 100px; } a { position: relative; display: inherit; padding: 60px 40px 0 40px; } main section { margin: 20px 0; } .stuck { position: fixed; top: 0; width: 100%; z-index: 1; opacity: .9; } Intro Features Pictures Buy Title Portland artisan letterpress drinking vinegar salvia pork belly. Next level art party bitters 90's. High Life Pitchfork mixtape, hoodie photo booth hashtag viral retro asymmetrical bitters scenester Cosby sweater iPhone normcore slow-carb. Umami post-ironic Godard fap you probably haven't heard of them, seitan next level four loko. Locavore jean shorts church-key beard small batch. Drinking vinegar dreamcatcher pop-up banjo plaid narwhal, hoodie McSweeney's. Chambray blog Truffaut Blue Bottle tilde, squid asymmetrical High Life church-key keytar readymade. Title Portland artisan letterpress drinking vinegar salvia pork belly. Next level art party bitters 90's. High Life Pitchfork mixtape, hoodie photo booth hashtag viral retro asymmetrical bitters scenester Cosby sweater iPhone normcore slow-carb. Umami post-ironic Godard fap you probably haven't heard of them, seitan next level four loko. Locavore jean shorts church-key beard small batch. Drinking vinegar dreamcatcher pop-up banjo plaid narwhal, hoodie McSweeney's. …
score: 0
has title: How to prevent Chrome flickering when making navigation fixed on scroll?

http://stackoverflow.com/comment/41287483
comment on: http://stackoverflow.com/a/26300793
has text: I used "maybe". The algorithms to crypto that will be his secret. :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26250741
has comment: http://stackoverflow.com/comment/41180483
has comment: http://stackoverflow.com/comment/41178729
duplicate of: http://stackoverflow.com/q/55611
has comment: http://stackoverflow.com/comment/41178920
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41178812
tagged with: oop
answer count: 0
upvote count: 5
has body: Helo there, just a quick question, I'm using a pseudo-classical pattern to create objects in JS and I was wondering how do I actually create a private method that is accessible only inside the object. let's say I want to add a private method XY() to object Animal. Does this kind of pattern allow me to create a private method? function Animal(name) { this.name = name } Animal.prototype = { canWalk: true, sit: function() { this.canWalk = false alert(this.name + ' sits down.') } } Thanks in advance, Alex
type: Question
score: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41178765
has title: Javascript OOP - private/public methods
linked to: http://stackoverflow.com/q/55611

http://stackoverflow.com/comment/41230435
has text: This is an overkill, better attach the listeners directly. Also he does not use any jquery in his example.
comment on: http://stackoverflow.com/a/26279200
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41240559
has text: No JSFiddle is just a live demo, but can you tell me , why you need to do that in `setInterval` ? Because, this is just one time task, i guess!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26284033

http://stackoverflow.com/a/49189164
has comment: http://stackoverflow.com/comment/90306562
score: 17
answers question: http://stackoverflow.com/q/26257268
downvote count: 1
has body: I was facing the same issues since several days, Today i have found the solution. I have shown the complete file which is ready to execute.
upvote count: 18
type: Answer

http://stackoverflow.com/a/26285225
answers question: http://stackoverflow.com/q/26285029
has body: Just for grins, another thing you can do (when you've got .bind()) is for (i = 0; i &lt; 10; i++) { setTimeout(function () { var i = +this; console.log(i) }.bind(i), 100); } A little bit less of a mess than an IIFE.
has comment: http://stackoverflow.com/comment/41251587
score: 0
has comment: http://stackoverflow.com/comment/41253478
type: Answer

http://stackoverflow.com/q/26321738
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26321752
favorite count: 0
has body: I have two values one having two decimal places. I would like the result of the subtracted values to always display two decimal places only. As you can see form the jsfiddle the two numbers in the example display an answer of more than two decimal places. How to I get the answer only two decimal places? jsfiddle: http://jsfiddle.net/e23wfpj7/ HTML 34.56 10 click jQuery $('.click').on('click', function(){ var numbOne = $('.numb-one').text(); var numbTwo = $('.numb-two').text(); var subtract = numbOne - numbTwo; $('.total').html('Total: '+subtract); });
accepted answer: http://stackoverflow.com/a/26321752
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26321757
has answer: http://stackoverflow.com/a/26321757
upvote count: 1
type: Question
has title: How to round subtracted values to two decimal places?
score: 1
tagged with: javascript
answer count: 2

http://stackoverflow.com/q/26271933
has comment: http://stackoverflow.com/comment/41217726
has answer: http://stackoverflow.com/a/26271945
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41217724
has comment: http://stackoverflow.com/comment/41217602
downvote count: 3
has answer: http://stackoverflow.com/a/26271995
upvote count: 18
type: Question
possible better answer: http://stackoverflow.com/a/26272962
has answer: http://stackoverflow.com/a/26272962
tagged with: javascript
tagged with: jquery
score: 15
has answer: http://stackoverflow.com/a/26272023
has body: I have several divs that looks like this: divcontent 1 divcontent 2 divcontent 3 divcontent 4 I'm a bit stumped as to how to loop through all popupDiv divs, and then loop through each layergroup separately. I want to end with a single array for each layergroup. I'd need something like: var mainArray = []; $('.popupDiv').each(function(){ var tempArray = []; $([unique layer value]).each(function(){ // Put div values from layergroup in tempArray }); mainArray.push(tempArray); }); return mainArray; But I don't know the syntax I'm looking for. What do I do?
accepted answer: http://stackoverflow.com/a/26271995
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has title: jQuery: how to loop through elements with data attribute
linked to: http://stackoverflow.com/q/26195212

http://stackoverflow.com/comment/41182913
score: 0
type: Comment
has text: Dear Sven Pagination using [link](http://angular-ui.github.io/bootstrap/) is working perfectly. What is not working is to get `$currentPage` value inside app.factory, it is possible in the controller using $watch and I test it with an alert `$scope.$watch('currentPage', function(newPage){ $scope.watchPage = newPage; alert(newPage);` but I can't be able to get the same value even if using `$watch`
comment on: http://stackoverflow.com/a/26239720
type: AnswerComment

http://stackoverflow.com/comment/41334624
comment on: http://stackoverflow.com/a/26319049
type: Comment
has text: Hmm, I cannot get it to work: In Firefox, a "#" (without further name) is appended to the URL and it jumps to a different position (where no anchor exists). In Chrome, no # is appended, but it also jumps to the wrong location. In both browsers the correct location is not on top but in the middle of the page (maybe that is intentional?) Is your answer supposed to work with named anchors or div-ids or both?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26313968
answer count: 1
tagged with: javascript
has title: why this property doesn't want to be deleated
has body: Wrote this code only for experimental purpose. here i used Object.defineProperty to create a property called 'fullName' and using set i defined another property to person called middleName . I have to pass value to middleName through fullName.Both of them has enumerable property TRUE,so that for..in loop can access it.But then i wanted to delete the middleName property from the object.But it is still there.Why it is still there?? (function(){ person = { firstName: 'will', lastName: 'Smith' }; Object.defineProperty(person,'fullName',{ set:function(mid){ Object.defineProperty(person,'middleName',{ value : mid, enumerable: true, writeable : false }); }, get:function(){ document.write(this.middleName); }, enumerable:true }); person.fullName='lol'; person.fullName; document.write(Object.getOwnPropertyNames(person)+'&lt;/br&gt;'); for(key in person){ document.write(key+'&lt;/br&gt;'); } document.write('\n'); delete (person.middleName); document.write(person.middleName+'&lt;/br&gt;'); for(key in person){ document.write(key+'&lt;/br&gt;'); } })()
has answer: http://stackoverflow.com/a/26314387
has comment: http://stackoverflow.com/comment/41294084
accepted answer: http://stackoverflow.com/a/26314387
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41294107
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41294243

http://stackoverflow.com/comment/41244992
score: 0
comment on: http://stackoverflow.com/q/26285831
type: Comment
type: QuestionComment
has text: Ok then how are you calling the "click" function?

http://stackoverflow.com/comment/41286508
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26309455
has text: I didn't downvote you... I was just trying to make things a little more complete. OP could have really easily googled this anyway...
score: 0

http://stackoverflow.com/q/26240802
has comment: http://stackoverflow.com/comment/41160340
has comment: http://stackoverflow.com/comment/41160352
has title: How to run JavaScript from local files in Google Chrome?
tagged with: google-chrome
type: Question
tagged with: local
upvote count: 0
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26240866
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: client
favorite count: 0
type: UnansweredQuestion
has body: I have encountered this problem of JavaScript not running from local files when testing a website. I am in great despair and need your help. I have linked the JS correctly and everything, but it's just not working. All settings are correctly enabled in Chrome. Thanks!
downvote count: 1

http://stackoverflow.com/a/26308503
has body: What is the purpose of the .events in var events = journal[entry].events; The purpose of this declaration conforms with 2 concepts of scripting convenience and economy. Every level of an object depth adds to the overall recall time when called. Certainly modern browsers have done much to flatten an objects variable stack, but if you think about it logically, any call to say object1.object2["Memeber3"].object4 has to go through 4 steps to get to the value itself. Flattening the value to a local object is more economic. Second, the readability (and therefore maintainability) of the code is enhanced in that you don't have the extra "journal[entry]." clogging up your expressions. As a general rule of thumb, if you are going to use a member of an object more than once in a block, then you should create a local variable of that member. What is the purpose of (!(event in phis)). The purpose of this evaluation is to determine if a particular member(event) is NOT in the object(phis). In this example, the next line creates that member if it is indeed missing.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26307902

http://stackoverflow.com/comment/41157795
type: Comment
comment on: http://stackoverflow.com/q/26239166
type: QuestionComment
has text: Except your custom code introduce some syntax errors where even `try catch` cannot help any more…
score: 0

http://stackoverflow.com/comment/41309063
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26270858
has text: vks, thank you for your answer. Since Arun's answer is more specific and works only for the specific class/span. I am voting for that one.

http://stackoverflow.com/comment/41151267
comment on: http://stackoverflow.com/a/26236113
score: 1
type: AnswerComment
has text: Your definition of "last dot" is a bit odd.
type: Comment

http://stackoverflow.com/comment/41302250
has text: I have not declared an "in" operator anywhere it is coming from Jquery i.e. source "jquery-1.10.2.js:985" line 985
comment on: http://stackoverflow.com/a/26317916
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/45764528
type: Comment
comment on: http://stackoverflow.com/a/26213167
score: 2
type: AnswerComment
has text: how is this different from code in your question?? So the parameter must be called exactly "text" / "Text"?? What about to mention that?

http://stackoverflow.com/q/26261955
has comment: http://stackoverflow.com/comment/41205385
has comment: http://stackoverflow.com/comment/41199321
type: Question
has comment: http://stackoverflow.com/comment/41205349
has comment: http://stackoverflow.com/comment/41199361
tagged with: firefox
has title: when trying to .click() on element i get Error: Permission denied to access property 'length'
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41205413
score: 0
tagged with: firefox-addon
has comment: http://stackoverflow.com/comment/41204065
tagged with: firefox-addon-sdk
has body: in my FF extension i use the addon sdk. The content script i have written works just fine. I can find the proper div element and get the .html() output with jQuery out of it The problem is when i try to run .click() on it i get this error: Error: Permission denied to access property 'length' i am running FF 32.0.3 and sdk 1.16 this the line of code that breaks:$("#sampleid").click(); and this is the error that i get:System JS : ERROR resource://gre/modules/addons/XPIProvider.jsm -&gt; jar:file:///c:/users/andriy/appdata/local/temp/tmpthua0e.mozrunner/extensions/jid1-LetHopSfdqAf7A@jetpack.xpi!/bootstrap.js -&gt; resource://gre/modules/commonjs/toolkit/loader.js -&gt; resource://gre/modules/commonjs/sdk/loader/sandbox.js -&gt; resource://jid1-lethopsfdqaf7a-at-jetpack/my_addon/data/scripts/jquery.js:3 - Error: Permission denied to access property 'length' Edit: this is my page mod:pageMod.PageMod({ include: "*", contentStyleFile: [self.data.url("css/style.css"), self.data.url("css/dropdown.css")], contentScriptFile: [self.data.url("scripts/jquery.js"), self.data.url("scripts/dropdown.js"), self.data.url("scripts/pageParser.js")], contentScriptWhen: "end", onAttach: function(worker){} }); and pageParser.js contains the .click() code that was all i wrote because this was just a test extension to understand why it wont work Edit2: this is literally all i have in pageParser.js function click1(){ console.log("123456789"); //alert($('#sampleid').html()); $('#sampleid').click(); } click1(); Edit 3: Im not sure but i think this might have something to do with this. Unfortunately i cant seem to modify the examples to help me https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/ Edit 4: It seems this gentleman had the same issue as me: https://groups.google.com/forum/#!topic/greasemonkey-users/SXfpyvcQofQ i also stopped using jQuery and now it works Edit 5: $("div:contains('my sample text')").click();
favorite count: 0
has comment: http://stackoverflow.com/comment/41198978
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41206689
downvote count: 1
has comment: http://stackoverflow.com/comment/41199362
has comment: http://stackoverflow.com/comment/41209941
has comment: http://stackoverflow.com/comment/41199614
has comment: http://stackoverflow.com/comment/41202964
has comment: http://stackoverflow.com/comment/41209546
has comment: http://stackoverflow.com/comment/41202147

http://stackoverflow.com/q/26205148
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26205795
tagged with: background-position
has body: In the game that I have, when the player walks up to the number and presses the "m" key one frame of the sprite is skipped. To clarify, the following is my code that I use to keep track of when the frames should change by storing the position of the frames in a variable: function animateStar() { var pos = 0; $(document).keyup(function(e) { if (e.keyCode == 77) { pos -= 32; $('#n1').css('background-position', pos+'px -0px'); } }); } So as you can see, everytime the key code 77 (representing "m") is pressed, the frames will change, since each of my frames has a height and width of 32px. However, the problem that I am having is that when my player walks away from the object and comes back to it, instead of continuing from where he left off, the frames sort of skip. Here is my code: http://jsfiddle.net/j40s8gjt/ Since my sprite sheet is composed of numbers, you should be able to see what's up with the code. Try setting the frame at a number between 3-5, walking away from the object then coming back to it and pressing m again, you should see that it sort of re loops everything. A possible solution of this might be to store the current position of the object when the player leaves it, but I am not sure how to go about doing so. I hope I've been clear enough, thank you!
type: AnsweredQuestion
score: 1
upvote count: 1
has title: Go through a sprite and save background-position
tagged with: sprite
accepted answer: http://stackoverflow.com/a/26205795

http://stackoverflow.com/a/26219692
answers question: http://stackoverflow.com/q/26219393
has body: You can declare the templates outside the div that you're binding to as a work around. As @JeffMercado states: The actual problem was that since the user_sets uses a template binding, the body is discarded (and the templates along with it) function SetsViewModel() { var self = this; self.usersets = ko.observableArray([{SetId: 1, SetName: 'Name 1'}]); self.getTemplate = function () { return self.usersets().length > 0 ? "showSets" : "noSets"; } } $(document).ready(function () { ko.applyBindings(new SetsViewModel(), document.getElementById('user_sets')); });
accepted answer of: http://stackoverflow.com/q/26219393
has comment: http://stackoverflow.com/comment/41121497
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41121079
score: 1
upvote count: 1

http://stackoverflow.com/comment/41290474
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26268875
has text: Arun, Have you been able to get it to work once the padding is added in?
score: 0

http://stackoverflow.com/comment/41094535
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26201450
has text: You are awesome. I am going to mark it accepted. Just wanted to know one more think, where should i write code to close popup modal? I want to write something like this ` $.coolBox.closeCoolBox = function () { console.log("closeCoolBox closes"); $("#clBoxOverlay,#clBoxOuterWrapper").remove(); };` See my edits also.

http://stackoverflow.com/comment/41175214
has text: @ArunPJohny https://github.com/peachananr/onepage-scroll . I wanted to use scrollTop to detect the height of this and let animation start only when scrolled to. But when I come to think of it, the height will always be changing on different screens.
type: QuestionComment
comment on: http://stackoverflow.com/q/26248390
type: Comment
score: 0

http://stackoverflow.com/comment/41316188
type: AnswerComment
score: 0
type: Comment
has text: Thanks a million. After defining the variable, everything works as it should - finally. Thanks also to everyone else. You guys are just simply awesome!
comment on: http://stackoverflow.com/a/26325769

http://stackoverflow.com/comment/41158410
type: QuestionComment
has text: @Vinc199789 And why do you have the meta tag inside your #page div?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26239568

http://stackoverflow.com/a/26245570
has body: One Station Always Up The easiest solution will to use your existing ID (id:84) in a custom attribute of the desk_box and the id of the station_info: id:84 id:84 Then, a little jQuery similar to the other answers should prove no trouble at all: $(".desk_box").click( function() { $(".station_info").hide(); // to hide all the others. $("#station_info"+ $(this).attr('data-station') ).show(); }); Second Click on Same desk_box will hide the station $(".desk_box").click( function() { $(".station_info").hide(); // to hide all the others. $("#station_info"+ $(this).attr('data-station') ).toggle(); }); Make it a little pretty using "slow" $("#station_info"+ $(this).attr('data-station') ).show("slow"); OR $("#station_info"+ $(this).attr('data-station') ).toggle("slow");
has comment: http://stackoverflow.com/comment/41191761
has comment: http://stackoverflow.com/comment/41170049
has comment: http://stackoverflow.com/comment/41206345
has comment: http://stackoverflow.com/comment/41275996
answers question: http://stackoverflow.com/q/26244876
has comment: http://stackoverflow.com/comment/41191399
has comment: http://stackoverflow.com/comment/41170200
score: 0
has comment: http://stackoverflow.com/comment/41275935
type: Answer
has comment: http://stackoverflow.com/comment/41889646
has comment: http://stackoverflow.com/comment/41206412

http://stackoverflow.com/comment/41355854
comment on: http://stackoverflow.com/q/26347370
score: 0
has text: Try `$(document).on('click','#btn1',function() {....})` -- or better yet, use [`ngIf`](https://docs.angularjs.org/api/ng/directive/ngIf) to toggle it.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26352134
has body: That's a tall order. You may want to use a library for this, such as TableSorter: http://tablesorter.com/docs/#Demo
type: Answer
answers question: http://stackoverflow.com/q/26352096
score: 0

http://stackoverflow.com/a/28279452
answers question: http://stackoverflow.com/q/26326027
downvote count: 0
score: 6
type: Answer
upvote count: 6
has body: You need to create a route on the server that you can post form values to from Angular using $http.post. The following lets you enter details in an Angular form. The form is then posted to Node where the req.body values are extracted and added email object. The email is then send by SendGrid. SERVER.JS var express = require('express'); var http = require('http'); var bodyParser = require('body-parser'); var dotenv = require('dotenv'); dotenv.load(); //load environment variables from .env into ENV (process.env). var sendgrid_username = process.env.SENDGRID_USERNAME; var sendgrid_password = process.env.SENDGRID_PASSWORD; var sendgrid = require('sendgrid')(sendgrid_username, sendgrid_password); var email = new sendgrid.Email(); var app = express(); app.use(bodyParser.json()); //needed for req.body app.set('port', process.env.PORT || 3000); app.use(express.static(__dirname + '/public')); app.post('/email', function(req, res) { email.addTo(req.body.to); email.setFrom(req.body.from); email.setSubject(req.body.subject); email.setText(req.body.text); email.addHeader('X-Sent-Using', 'SendGrid-API'); email.addHeader('X-Transport', 'web'); sendgrid.send(email, function(err, json) { if (err) { return res.send("Problem Sending Email!!!!"); } console.log(json); res.send("Email Sent OK!!!!"); }); }); var server = http.createServer(app); server.listen(app.get('port'), function() { console.log('Express server listening on port ' + app.get('port') ) ; }); INDEX.HTML To From Subject Submit CLIENT SIDE APP.JS angular.module('myApp', []) .controller('MainCtrl', function($scope, $http) { $scope.submitEmail = function() { console.log("TEST"); //Request $http.post('/email', $scope.email) .success(function(data, status) { console.log("Sent ok"); }) .error(function(data, status) { console.log("Error"); }) }; });

http://stackoverflow.com/q/26266279
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41213181
answer count: 2
has answer: http://stackoverflow.com/a/26266650
tagged with: jquery
has comment: http://stackoverflow.com/comment/41207613
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41207546
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41207689
has body: I'm working to use custom checkbox styles with a checkbox which is dynamically generated by javascript for the Google Identity Toolkit. For example, we add this div: &lt;div id="gitkitWidgetDiv"&gt;&lt;/div&gt; And the Google Identity Toolkit script generates new html for that div. I need to add a class to the HTML which is added by the javascript without any action by the user and I'm struggling to make it work. For example, here is my code: $("#gitkitWidgetDiv").on('ready', ".gitkit-sign-in-options label", function() { $(this).addClass('checkbox'); }); I've tried switching 'ready' for a few other options and also using the livequery plugin, but nothing is working for me. It works if I use an active event like 'click,' but I can't figure out how to do this when the page loads. Could someone please help? Thanks!
has comment: http://stackoverflow.com/comment/41207476
has answer: http://stackoverflow.com/a/26266515
has comment: http://stackoverflow.com/comment/41207981
has comment: http://stackoverflow.com/comment/41210553
has comment: http://stackoverflow.com/comment/41207325
type: Question
has title: Add class to dynamically generated HTML
has comment: http://stackoverflow.com/comment/41207474
has comment: http://stackoverflow.com/comment/41207494

http://stackoverflow.com/comment/78107067
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26258671
has text: @MattSaunders You are right, a check like `if (activePoints[0])` is missing to ensure there is some element. Thanks for pointing this out. I've updated the example.
score: 0

dropzone.js
tags question: http://stackoverflow.com/q/26253461
tags question: http://stackoverflow.com/q/26222009
tags question: http://stackoverflow.com/q/26332642
tags question: http://stackoverflow.com/q/26300131
tags question: http://stackoverflow.com/q/26300773
tags question: http://stackoverflow.com/q/26322947
tags question: http://stackoverflow.com/q/26323417
tag name: dropzone.js
type: Tag

http://stackoverflow.com/comment/41244324
type: AnswerComment
comment on: http://stackoverflow.com/a/26286345
type: Comment
has text: Was going to the same conclusion ^^ And to avoid this, scope `google` object and delay to onload event.
score: 0

http://stackoverflow.com/q/26292116
type: UnansweredQuestion
has title: how to specify protractor pageobject in seperate js file?
type: Question
has answer: http://stackoverflow.com/a/26292220
tagged with: protractor
tagged with: javascript
has body: I am using this sample to get my head around pageobjects: https://github.com/angular/protractor/blob/master/docs/page-objects.md Trying to do some refactoring by using a seperate js file for the angularHomepage(pageobject) code: var AngularHomepage = function() { this.nameInput = element(by.model('yourName')); this.greeting = element(by.binding('yourName')); this.get = function() { browser.get('http://www.angularjs.org'); }; this.setName = function(name) { this.nameInput.sendKeys(name); }; }; the specfile looks like this now: var angularHomepage = require('/angularjs_homepage.js'); describe('angularjs homepage', function() { it('should greet the named user', function() { angularHomepage.get(); angularHomepage.setName('Julie'); expect(angularHomepage.greeting.getText()).toEqual('Hello Julie!'); }); }); When I run the spec I am getting an error? : Message: Error: Cannot find module '/angularjs_homepage.js' Stacktrace: Error: Cannot find module '/angularjs_homepage.js' at require (module.js:380:17) at Object.&lt;anonymous&gt; (c:\ptor_testing\example_spec.js:1:85)
score: 0
answer count: 1
tagged with: angularjs-e2e
tagged with: angularjs

http://stackoverflow.com/comment/41127378
type: QuestionComment
comment on: http://stackoverflow.com/q/26222970
score: 2
has text: you aren't calling your `calYear` function from anywhere.
type: Comment

http://stackoverflow.com/q/26276499
has answer: http://stackoverflow.com/a/26278005
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/26276912
tagged with: javascript
linked to: http://stackoverflow.com/q/1465573
has comment: http://stackoverflow.com/comment/41225548
linked to: http://stackoverflow.com/q/18799808
has comment: http://stackoverflow.com/comment/41225758
has comment: http://stackoverflow.com/comment/41225682
favorite count: 0
has body: I have a download script. It downloads from database after insert the email and click GO button, because i want to save the email of users who want to download from my website. it works properly. But every time of downloading it demands email from same user. It should be like this, if any user insert his email and download file once at that time, then for new download at same time period not necessary to again submit his email. My code is: <?php require"connection.php"; extract($_REQUEST); $result=mysql_query("select * from archives1 where volume='$volume'") or die (mysql_error()); while($row=mysql_fetch_array($result)) { extract($row); echo" Section: $section Title: $title Author: $author Country: $country Page Number: $pgno "; echo" "; echo" Full Text(PDF) ";} ?> It fetches all fields related from volume. pdfdownload.php is: <?php if(isset($_POST["valid_submit"])) { require"connection.php"; extract($_POST); mysql_query("insert into archive_email values('','$valid_email','$valid_date')") or die(mysql_error()); function output_file($file, $name, $mime_type='') { if(!is_readable($file)) die('File not found or inaccessible!'); $size = filesize($file); $name = rawurldecode($name); $known_mime_types=array( "htm" => "text/html", "exe" => "application/octet-stream", "zip" => "application/zip", "doc" => "application/msword", "jpg" => "image/jpg", "php" => "text/plain", "xls" => "application/vnd.ms-excel", "ppt" => "application/vnd.ms-powerpoint", "gif" => "image/gif", "pdf" => "application/pdf", "txt" => "text/plain", "html"=> "text/html", "png" => "image/png", "jpeg"=> "image/jpg" ); if($mime_type==''){ $file_extension = strtolower(substr(strrchr($file,"."),1)); if(array_key_exists($file_extension, $known_mime_types)){ $mime_type=$known_mime_types[$file_extension]; } else { $mime_type="application/force-download"; }; }; //turn off output buffering to decrease cpu usage @ob_end_clean(); // required for IE, otherwise Content-Disposition may be ignored if(ini_get('zlib.outpu…
type: UnansweredQuestion
has title: file download after insert email
tagged with: php
score: -5
tagged with: mysql
downvote count: 5
type: Question

http://stackoverflow.com/q/26249685
has answer: http://stackoverflow.com/a/26249720
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to prevent toggle effect when an inside anchor is clicked?
answer count: 3
tagged with: http://stackoverflow.com/tag/html
score: -1
has answer: http://stackoverflow.com/a/26249989
favorite count: 0
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26249732
has body: I have an accordion effect using the code bellow and it works. The problem is that when I click on the link inside the article it closes the content and doesn't open the link. How do I prevent this from happening? Thanks ahead. http://jsfiddle.net/vinicius5581/Lrpwojyg/ HTML Article Name 1 <content more content This link shouldn't close article Article Name 2 <content more content This link shouldn't close article Article Name 3 <content more content This link shouldn't close article JAVASCRIPT $("li").click(function(){ $(this).find("article").slideToggle().end().siblings("li").find("article").slideUp(); }); CSS .booklist>li>article{ display:none }
downvote count: 1

http://stackoverflow.com/comment/41081188
type: QuestionComment
has text: the users enter it from the list which comes up when he enters 2-3 characters. But the value he enters should be something from those values and not any modified value. Incase the user tampers with any selected value, he shouldnt be allowed.
comment on: http://stackoverflow.com/q/26198156
score: 0
type: Comment

http://stackoverflow.com/a/71034973
answers question: http://stackoverflow.com/q/26227487
score: 0
type: Answer
has body: function add(type) { //Create an input type dynamically. var element = document.createElement("input"); var text = document.getElementById("textId"); //Append the element in page (in span). text.appendChild(element); } h1 { color: #0000ff; } &lt;h1&gt;KIAAT&lt;/h1&gt; &lt;b&gt;Adding textbox on button click with javascript&lt;/b&gt; &lt;br&gt;&lt;br&gt; &lt;form&gt; &lt;input placeholder="text" name="element" hidden&gt; &lt;/input&gt; &lt;input type="button" value="Click Me" onclick="add(document.forms[0].element.value)"/&gt; &lt;span id="textId"&gt;&amp;nbsp;&lt;/span&gt; &lt;/form&gt;

http://stackoverflow.com/q/26343159
has body: I have found this tidbit of code - which works fine. But I also need an associated Identification ID pass along with the name. So example has state say "California" - but I also have a unique ID associated to Califonrnia say "yye4" etc... I can create my list easily with coldfusion as below. var getStates = function(){ return [ "#username#", ]; } But I also need to pass a unique number in the form as well that is also associated to each username. Thoughts? <cfajaximport tags="cfinput-autosuggest"> Attaching an event handler to the autosuggest object State: <cfinput type="text" name="state" autosuggest="javascript:getStates({cfautosuggestvalue})" autosuggestMinLength=1 autosuggestBindDelay=1> <cfset ajaxOnLoad("init")>
has comment: http://stackoverflow.com/comment/41352801
has comment: http://stackoverflow.com/comment/41350154
tagged with: forms
has comment: http://stackoverflow.com/comment/41349424
has comment: http://stackoverflow.com/comment/41352639
type: Question
has title: Javascript Autocomplete - ColdFusion - with unique identifier
has comment: http://stackoverflow.com/comment/41353217
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26344134
tagged with: coldfusion
score: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26290797
type: Answer
has body: There are two possible string delimiters: ' and ". You can use either, but you cannot mix them. The one that you use for a string will need to be escaped inside, the other can be used freely. In your case, ' Off ' is one big string - as can be seen from the syntax highlighting. It needs to be ' Off ' or so to work (still not producing correct HTML, as some attribute delimiters are now missing in the string). Same applies to newtd. Also, you should never use inline event handler attributes - especially not dynamically created ones. The values of module_url and br_id will become code strings, for example if the values are strings then in the resulting HTML they would mean variables with thoses names. If you wanted them to become string literals, you would need to escape them properly (e.g. with JSON.stringify), but after that you also would need to HTML-escape the whole thing which is non-trivial. In summary: don't do it. Instead, create the element (if necessary, even from an HTML string), and after that dynamically attach an event handler: el.onclick = function(e) { change_promotion_status(module_url, promotion_status, br_id, '0'); return false; }; var newdiv = ' Off '; var newtd = ' '; var $div = $(newdiv); // use jQuery to parse the HTML $div.click(function(e) { // use jQuery for event listeners change_promotion_status(module_url, promotion_status, br_id, '0'); return false; }); $div.appendTo(…) // use jQuery for appending the new element (div, a, td, img?) to the DOM
has comment: http://stackoverflow.com/comment/41252367
score: 1
has comment: http://stackoverflow.com/comment/41252464
upvote count: 1
has comment: http://stackoverflow.com/comment/41252915
has comment: http://stackoverflow.com/comment/41252437
downvote count: 0
answers question: http://stackoverflow.com/q/26290750

http://stackoverflow.com/comment/41150289
score: 0
type: Comment
has text: modal is triggered by leaving the page
type: QuestionComment
comment on: http://stackoverflow.com/q/26235444

http://stackoverflow.com/comment/41358352
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26348638
score: 1
has text: @MarcoDinatsoli it doesn't matter how many lines of code there are, if it is already in a function then all you have to do from your startup script is call your function.

http://stackoverflow.com/q/26284528
tagged with: stampit.js
has answer: http://stackoverflow.com/a/26285376
type: Question
tagged with: object
has body: I started to read the source code for stampit js yesterday, and found an interesting way of enclose function variables in an object by calling apply() instance = fn.apply(instance, arguments) || instance; How does this really work? And why does the following code line not work? instance = fn.apply(instance, arguments); A longer example: var createFoo = function() { var foo = {}, fn = function() { var i = 0; this.increment = function() { i++; }; this.get = function() { return i; }; }; foo = fn.apply(foo, arguments) || foo; return foo; }, foo = createFoo(); test('foo test', function () { foo.increment(); equal(foo.get(), 1, 'pass'); }); var createBar = function() { var bar = {}, fn = function() { var i = 0; this.increment = function() { i++; }; this.get = function() { return i; }; }; bar = fn.apply(bar, arguments); return bar; }, bar = createBar(); test('bar tests', function () { bar.increment(); /* undefined */ }); http://jsfiddle.net/RMh78/59/
has title: Enclosed functions variable
tagged with: javascript
has comment: http://stackoverflow.com/comment/41241821
has comment: http://stackoverflow.com/comment/41241230
score: 0
answer count: 2
upvote count: 1
tagged with: function
downvote count: 1
favorite count: 0
tagged with: private
has comment: http://stackoverflow.com/comment/41245938
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26287177
has comment: http://stackoverflow.com/comment/41241856

http://stackoverflow.com/q/26239966
has title: Angular orderBy not re-running after ng-click changes order string
tagged with: angularjs
type: UnansweredQuestion
has body: I have a a collection of panels each with a simple list of items that needs to either be sorted by 'computedLoad' or 'Name'. I have the following objects and methods to accomplish this generically over all of the panels (only showing one panel among many). scope.orderBy = { name: { displayName: "Name", sort: "Name", reverse: false }, load: { displayName: "Load", sort: "-computedLoad", reverse:false } }; scope.selectOrder = function (panel, order) { timeout(function () { panel.activeOrder = order; }); }; scope.panels = { methods: { activeOrder: scope.orderBy.name } }; I have the following html: Order By: {{order.displayName}} {{item.Name}} The selectOrder method doesn't seem to work. Any ideas? Am I missing something? Here is an example: http://jsbin.com/puxoxi/1/
score: 0
has answer: http://stackoverflow.com/a/26242346
type: Question
tagged with: javascript
answer count: 1

http://stackoverflow.com/comment/41099631
type: Comment
comment on: http://stackoverflow.com/q/26200258
has text: Thanks! Wow conversejs in the digital flesh! I ended up switching from Openfire to prosody and all my problems were solved.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26312971
score: 1
upvote count: 1
type: Question
has body: I am trying to create a HTML 5 Web Worker that will calculate the number of prime numbers (staring from 1) for a given value: My JavaScript code is: var found = 0; var n = 1; var total = 0; var THRESHOLD = 10; while (total &lt; THRESHOLD) { n += 1; for (var i = 2; i &lt;= Math.sqrt(n); i++) { if (!(n % i == 0)) { total++; postMessage(found); } else { found++; } } } This code is based on: http://www.codeproject.com/Articles/250102/An-HTML-progressbar-using-web-workers However, the Web Worker script returns the value 8, which obviously is incorrect for the input number 10. Where I am going wrong here?
tagged with: javascript
tagged with: web-worker
answer count: 2
has answer: http://stackoverflow.com/a/26313134
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26313042
linked to: http://stackoverflow.com/q/17389350
has title: Web Worker Prime number calculation

http://stackoverflow.com/a/26285759
has body: After testing custom bindings and the jQuery based solution posted by Thanasis Grammatopoulos, I decided to go the CSS route and first created a new class: .upper-case { text-transform: uppercase; } I then applied it to the input elements I wanted to be displayed as upper case: &lt;input type="text" maxlength="16" class="upper-case" data-bind="value: fhaNum, valueUpdate: 'afterkeydown', disable: isReadOnly" /&gt; Since this doesn't save the text as upper case in the observable, I upper cased the value before sending it to the server: var data = { "fhaNum": self.fhaNum().toUpperCase() };
downvote count: 0
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/81985771
answers question: http://stackoverflow.com/q/26263169
upvote count: 3
has comment: http://stackoverflow.com/comment/50900653

http://stackoverflow.com/q/26298347
has comment: http://stackoverflow.com/comment/41271577
has comment: http://stackoverflow.com/comment/41318019
has comment: http://stackoverflow.com/comment/41279001
has title: Using iframe body as Region in Backbone Marionette
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41270961
has answer: http://stackoverflow.com/a/27058215
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
tagged with: marionette
tagged with: backbone.js
has body: I'm trying to use an iframe's body as a Region in Backbone Marionette. Marionette uses standart jquery selectors to define which element is the region, like this: App.addRegions( { main: "#main-region" } ); I want my region to be the body of an iframe, which normally I would find like so: $('iframe').contents().find('body'); When trying to put above as the region, like this: App.addRegions( { main: $('iframe').contents().find('body') } ); The following error is thrown: Uncaught Error: Syntax error, unrecognized expression: iframe.contents() body Sizzle.error jquery.js?body=1:4681 tokenize jquery.js?body=1:4742 select jquery.js?body=1:5114 I tried to put the selector in directly: App.addRegions( { main: "iframe.contents() body" } ); But it's giving me the exact same error. EDIT: Also tried to create a psuedo-selector for it: $.expr[":"].contents = $.expr.createPseudo(function(selector) { return function(el) { var $el; $el = $(el); console.log($el.contents().find(selector)); return $($el.contents().find(selector)); }; }); // Usage: $('iframe:contents body'); Which does log the iframe's body in the function itself: [body, prevObject: jQuery.fn.jQuery.init[1], context: iframe, selector: ".contents() body", constructor: function, init: function…] But eventually returns the iframe element somehow: [iframe, prevObject: jQuery.fn.jQuery.init[1], context: document, selector: "iframe:contents(body)", constructor: function, init: function…] So, what I need, is a selector that is able to get the iframe's body or something else that could work with Marionette. Is there a way to get this done?
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/q/26315815
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27506078
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27506078
favorite count: 0
upvote count: 3
has body: I am trying to do very simple one page test of peerjs as i learn it. However, the code below doesn't seem to work. I have gone over documents three times. But can't find any error in my code and there are no error in output either. For my inspiration i used this: http://cdn.peerjs.com/demo/helloworld.html My code var p1 = new Peer('a351TxFJLKnljhl22',{key: 'key'}); var p2 = new Peer('a351TxFJLKnljhl22',{key: 'key'}); p1.on('open', function(id) { console.log('connected to server'); var c = p1.connect('a351TxFJLKnljhl22'); c.on('open', function(data) { console.log('connected to peer'); c.send('connection working'); }); }); p2.on('connection', function(connection) { connection.on('data', function(data) { console.log('p2 speaking..got from p1: '+data); }); }); I expect to get connection working in console.
tagged with: peerjs
downvote count: 0
has title: Peerjs not working.. no errors

http://stackoverflow.com/comment/41358255
type: QuestionComment
has text: The alerts are just for testing purproses. They will do a getElementByID and display winning pictures of the helmet that wins.
score: 0
comment on: http://stackoverflow.com/q/26330267
type: Comment

http://stackoverflow.com/comment/113402006
has text: While not the list the op is requesting, be aware that `Element.closest()` polyfill exists and may help in other situations .. https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26195244

http://stackoverflow.com/q/26203186
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26203405
accepted answer: http://stackoverflow.com/a/26203405
favorite count: 0
has comment: http://stackoverflow.com/comment/41089829
has answer: http://stackoverflow.com/a/26203317
has comment: http://stackoverflow.com/comment/41089950
tagged with: regex
has title: Check for numeric value or range
possible better answer: http://stackoverflow.com/a/26203317
type: AnsweredQuestion
has body: A input-field could have values like: 23 23-45 No I want to correct the value: string.replace(/[^\d-]/g,''); But that doesn't correct these values: -45 23- 45-23 10-110 All these values are incorrect (The valid values are from 0-100 (as they are percentage values), so 110 is unvalid). So for that cases I want the user to have a second look at the input field... I guess I have to create a second RegEx for these unvalid cases, right?
type: Question
tagged with: javascript

http://stackoverflow.com/q/26282221
type: Question
has answer: http://stackoverflow.com/a/26282795
tagged with: javascript
has answer: http://stackoverflow.com/a/26282391
tagged with: replace
answer count: 3
possible better answer: http://stackoverflow.com/a/26282533
has answer: http://stackoverflow.com/a/26282533
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has title: Replace with
accepted answer: http://stackoverflow.com/a/26282391
type: AnsweredQuestion
has body: Here is a little challenge: I'm trying to replace all three tags in the code below completely by another tag named . I Tried with jQuery .replaceWith() but didn't get it. $( document ).ready(function() { $("div.gallery_content > div > ul > li:firstchild > img").replaceWith( " ... " ); }); I can't change any of the classes or add any ID or class names. And I can't change the code in any way. I can just add some Javascript / jQuery in an .js file that is already attached. What makes things even more difficult is the fact, that I have to add the Javascript to every page on the website, but the replacement should only take place on a subpage called «spots» (e.g. .com/cms/anything/spots). This is the code: Some Text Some Text Some Text Has anyone got a clue?
tagged with: replacewith
upvote count: 1

http://stackoverflow.com/comment/41113269
has text: Glad I could be of some help ! Also not you are doing initCarList twice (once in your ng-click, once in formattedTable() ).
type: Comment
comment on: http://stackoverflow.com/a/26215642
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41154869
score: 0
has text: @Chrillewoodz well yes, you could do it with jQuery, but it won't directly help with the logic you desire for your dropdowns. (Well, it might make it a little easier to check that all the dropdowns have been set to one of the non-default selections I guess.)
type: AnswerComment
comment on: http://stackoverflow.com/a/26237399
type: Comment

http://stackoverflow.com/comment/41148752
has text: No. HTML elements can have only one unique id. Better use classes
type: AnswerComment
comment on: http://stackoverflow.com/a/26232385
type: Comment
score: 1

http://stackoverflow.com/comment/41172432
type: AnswerComment
type: Comment
has text: Yes, but notice how if the match is found, *but it has no transaction fee*, the code will continue to loop through the other cards.
comment on: http://stackoverflow.com/a/26247015
score: 0

http://stackoverflow.com/comment/41354258
score: 0
comment on: http://stackoverflow.com/a/26326476
has text: If the string has an error that is not two parantheses, like a(b i don't want it to fix it to a(b)
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26325187
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26325155
has body: Reset your $target_path inside the for loop. Right now you're just continually appending to it. for ($i = 0; $i &lt; count($_FILES['file']['name']); $i++) {//loop to get individual element from the array $target_path = "uploads/"; //Declaring Path for uploaded images
answers question: http://stackoverflow.com/q/26325155
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26257722
has comment: http://stackoverflow.com/comment/80842847
upvote count: 17
score: 17
has comment: http://stackoverflow.com/comment/41204162
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26257568
has body: Little bit of more search and then you can end up here: var url = "www.foo.com/test?name=kevin&amp;gender=Male&amp;id=1234"; function removeURLParameter(url, parameter) { //prefer to use l.search if you have a location/link object var urlparts= url.split('?'); if (urlparts.length&gt;=2) { var prefix= encodeURIComponent(parameter)+'='; var pars= urlparts[1].split(/[&amp;;]/g); //reverse iteration as may be destructive for (var i= pars.length; i-- &gt; 0;) { //idiom for string.startsWith if (pars[i].lastIndexOf(prefix, 0) !== -1) { pars.splice(i, 1); } } url= urlparts[0]+'?'+pars.join('&amp;'); return url; } else { return url; } } console.log(removeURLParameter(url, 'name')); console.log(removeURLParameter(url, 'gender')); Jsfiddle example
answers question: http://stackoverflow.com/q/26257568
type: Answer
has comment: http://stackoverflow.com/comment/78283823

http://stackoverflow.com/q/26284277
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26287209
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: Hover to reveal overlay - almost there, just needs some tweaks
accepted answer: http://stackoverflow.com/a/26287209
possible better answer: http://stackoverflow.com/a/26284521
has body: I've managed to cobble together a pretty good jQuery 'hover over image to reveal overlay' but there are a few niggles I was hoping someone much better at jQuery might be able to help with. There's a link at the bottom to a JSFiddle User hovers over image and an overlay slides up from the bottom. I'd like this to work on mobile as well. From testing this on mobile, hover works but the overlay remains visible, so that's why I've added a close button. Two problems: The close button uses slideDown to hide the overlay, this messes up the slideToggle. Is there another way to hide the overlay? I'm using .hide to hide the overlay on page load. I've used stop() to stop animation build up on the hover, which works well but does create a rather harsh effect if the mouse is pulled away before the animation is complete. Is there a way to allow the animation to finish and pause before sliding back down? I've been scratching my head all afternoon trying to figure this out - any hep would be much appreciated. HTML Title Here Duis ornare interdum ornare integer id vulputate sapien suspendisse quis mauris enim proin eleifend pharetra orci, quis feugiat massa molestie non. Read more Close Title Here Duis ornare interdum ornare integer id vulputate sapien suspendisse quis mauris enim proin eleifend pharetra orci, quis feugiat massa molestie non. Read more Close jQuery $(document).ready( function() { $(".info-block").hide(); $('.box').hover( function() { $(this).find('.info-block').stop(true,true).slideToggle().show(); } ); $( ".close" ).click(function() { $(this).parent('.info-block').slideUp(); }); }); CSS .box { position: relative; overflow: hidden; width:350px; } .info-block { background: cyan; position: absolute; bottom: 0; padding:10px; height: 100%; } http://jsfiddle.net/StephenMeehan80/6mxLvbgq/2/
has answer: http://stackoverflow.com/a/26284521
has answer: http://stackoverflow.com/a/26284682

phantomjs
tags question: http://stackoverflow.com/q/26280834
type: Tag
tags question: http://stackoverflow.com/q/26287408
tags question: http://stackoverflow.com/q/26259789
tags question: http://stackoverflow.com/q/26346746
tags question: http://stackoverflow.com/q/26353431
tag name: phantomjs
tags question: http://stackoverflow.com/q/26291773
tags question: http://stackoverflow.com/q/26350153
tags question: http://stackoverflow.com/q/26303494
tags question: http://stackoverflow.com/q/26347129
tags question: http://stackoverflow.com/q/26265184

http://stackoverflow.com/q/26297076
has comment: http://stackoverflow.com/comment/41263988
has answer: http://stackoverflow.com/a/26297207
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26297308
has title: Is it possible to run a function that is '2-deep' within another function?
has answer: http://stackoverflow.com/a/26297851
has comment: http://stackoverflow.com/comment/41263365
type: UnansweredQuestion
has body: I need to execute a function from an window.onload event. However the function I want to run lies within another function's function. I know I can run a function from another function by function1(){ function2(); } function2(){ ...a process... } But since I cannot run the window.onload event within this 'overall' function as it needs to be at the 'top layer'. I tried doing this but it didn't work but essentially I think this is what I want to do. &lt;script&gt; function(){ function1(){ ..some stuff.. } function2(){ function1(); } } window.onload = function2; &lt;/script&gt; I cannot simply run function1 from the window.onload event as it is bound by a object onclick event. Any suggestions to how I can solve this??

salesforce
tags question: http://stackoverflow.com/q/26293859
type: Tag
tag name: salesforce

http://stackoverflow.com/q/26239090
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26283469
accepted answer: http://stackoverflow.com/a/26283469
upvote count: 6
tagged with: ace-editor
has body: TL;DR I need intelligent autocompletion/intellisense for JavaScript in ACE Editor. Explanation I am creating an online IDE for JavaScript using ACE Editor. Is there any library or open-source project that allows intelligent autocompletion for JavaScript. JavaScript is a dynamic language, intellisense integration is trivial for such languages (TypeScript does support this). ACE editor only supports basic autocompletition (like Sublime Text) using enableBasicAutocompletion. I need intelligent autocompletion, an engine that parses the javascript in backend in realtime and provides suggestions. Any help regarding this issue would be appreciated. Thanks.
score: 6
type: AnsweredQuestion
has title: Javascript intellisense in ACE editor
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/70358051
tagged with: intellisense

http://stackoverflow.com/comment/47493891
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26271721
type: Comment
has text: My own experience with attempting to nest ` ` tags with nested repeaters resulted in the repeater just kind of giving up. No console errors, just the repeater refusing to work. I'm assuming angular has some kind of syntax checking or some such in repeaters, not sure. The solution was to use nested ` ` tags, which is valid and totally fine to do and the repeater doesn't have a problem with those.

http://stackoverflow.com/comment/41189383
type: Comment
has text: He has `call("a");`, you put `call(a);`. Anyway, i didn't downvote you.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26256811

http://stackoverflow.com/a/26263855
has comment: http://stackoverflow.com/comment/41202668
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41202597
has comment: http://stackoverflow.com/comment/41202874
type: Answer
has body: I think I get what your going for here, just try adding a class that contains the animations when the event occurs. I'm not 100% sure the below will work as I'm not very familiar with keyframes, but the concept should hold true and allow you to get to the answer. $(document).keydown(function (e) { if (e.keyCode === k[n++]) { if (n === k.length) { alert('Konami working'); $('#div1').addClass('spinIt'); // &lt;- Add this return !1 } } else k = 0 }); CSS: &lt;style&gt; #div1 { position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; } // Add this class with the animation css and remove it from the above div1. .spinIt{ -webkit-animation:spin 4s linear infinite; -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite; } &lt;/style&gt;
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26263667
answers question: http://stackoverflow.com/q/26263667

variables
tag name: variables
tags question: http://stackoverflow.com/q/26331532
tags question: http://stackoverflow.com/q/26229189
tags question: http://stackoverflow.com/q/26282054
tags question: http://stackoverflow.com/q/26344442
tags question: http://stackoverflow.com/q/26219899
tags question: http://stackoverflow.com/q/26198813
type: Tag
tags question: http://stackoverflow.com/q/26243083
tags question: http://stackoverflow.com/q/26229912
tags question: http://stackoverflow.com/q/26290763
tags question: http://stackoverflow.com/q/26291183
tags question: http://stackoverflow.com/q/26277213
tags question: http://stackoverflow.com/q/26204952
tags question: http://stackoverflow.com/q/26351335
tags question: http://stackoverflow.com/q/26281759
tags question: http://stackoverflow.com/q/26327370
tags question: http://stackoverflow.com/q/26202625
tags question: http://stackoverflow.com/q/26242007
tags question: http://stackoverflow.com/q/26303822
tags question: http://stackoverflow.com/q/26302139
tags question: http://stackoverflow.com/q/26248172
tags question: http://stackoverflow.com/q/26325451
tags question: http://stackoverflow.com/q/26332366

http://stackoverflow.com/q/26301406
answer count: 1
linked to: http://stackoverflow.com/q/17418027
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26554897
accepted answer: http://stackoverflow.com/a/26554897
linked to: http://stackoverflow.com/q/26102962
type: Question
tagged with: brunch
tagged with: javascript
has body: There have been answers here and here, but they're about using NPM modules whilst my problem involves isomorphic internal code, where I want to share routes between brunch/backbone and node/express. But, if this is a dupe, then apologies in advance! The following code is highly simplified/pseudo, btw. Currently, this works: web/client/app/lib/router.coffee Routes = require 'lib/routesList' module.exports = class Router extends Backbone.Router routes: Routes.get() web/client/app/lib/routesList.coffee module.exports = do () -&gt; get: () -&gt; return {'': 'dashboard', 'settings': 'settings'} However, this doesn't: web/client/app/lib/router.coffee Routes = require '../../shared/routes/routesList' module.exports = class Router extends Backbone.Router routes: Routes.get() web/shared/routes/routesList.coffee module.exports = do () -&gt; get: () -&gt; return {'': 'dashboard', 'settings': 'settings'} I'm not trying to get node modules to work with Brunch- I know that's not supported- but is it at all possible to just concatenate these common js modules together into app.js when they don't all reside within the app directory? Many thanks! Update: I ended up creating a symbolic link between web/client/app/shared -> web/shared and it now works, but I don't know if there's a cleaner way...
has title: Brunch - Requiring modules outside of app directory
score: 0

http://stackoverflow.com/comment/41122318
comment on: http://stackoverflow.com/q/26219866
type: Comment
type: QuestionComment
score: 0
has text: @tymeJV, yes I can. I have couple of other solutions to make it work too. But my question is if it's possible to do what I ask.

http://stackoverflow.com/comment/41282778
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26307392
has text: @mlang You are welcome. If you upgrade to 1.3 rc you should not face this issue.

http://stackoverflow.com/comment/41126476
type: Comment
type: QuestionComment
has text: Try also my answer below
comment on: http://stackoverflow.com/q/26221445
score: 0

http://stackoverflow.com/comment/41229443
type: Comment
has text: It only submit the first one ? Sounds pretty normal to me
comment on: http://stackoverflow.com/q/26278247
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41361384
type: Comment
comment on: http://stackoverflow.com/q/26350299
has text: I think you can just send the key via the longhand post data:$http({ url: 'request-url', method: "POST", data: { 'message' : message } }) then just pick up on the json post data and submit to the database.
score: 0
type: QuestionComment

http://stackoverflow.com/a/26324312
has comment: http://stackoverflow.com/comment/41314551
has comment: http://stackoverflow.com/comment/41317346
upvote count: 1
has comment: http://stackoverflow.com/comment/41314036
has comment: http://stackoverflow.com/comment/41317334
has body: Wrap your code in an if statement that checks to see if your element exists: if ($('#task-edit-heading-row-labels').length &gt; 0) { // The element exists... put your code here. } Basically $(...) will always return, without an error, regardless of what it found; if it found nothing, then its .length property will equal zero. So writing if ($(...).length > 0) is a neat way to handle page-specific stuff, or even just any situation where you aren't sure if some content exists or not, without having to tag your pages with classes or parse the URL, etc.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26324265
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26324265
has comment: http://stackoverflow.com/comment/41313189
type: Answer

http://stackoverflow.com/a/26316447
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41299047
has comment: http://stackoverflow.com/comment/41299019
type: Answer
has body: Your scenario should work (not sure if this is good design). There is a working plunker But we have to move the switch catId from ng-init into state defintion. Into resolve If the states are defined like this: // home $stateProvider .state('home', { url: '/home', templateUrl: 'tpl.layout.html', controller : "rootController", }) the child state with multi-views .state('child', { parent: "home", url: '/child', templateUrl: 'tpl.example.html', views : { 'firstQuadrant@home': { templateUrl: "tpl.quadrant.html", controller: "QuadrantCtrl", resolve: { catId : function(){ return 1 } }, }, 'secondQuadrant@home': { templateUrl: "tpl.quadrant.html", controller: "QuadrantCtrl", resolve: { catId : function(){ return 2 } }, }, 'thirdQuadrant@home': { templateUrl: "tpl.quadrant.html", controller: "QuadrantCtrl", resolve: { catId : function(){ return 3 } }, }, 'fourthQuadrant@home': { templateUrl: "tpl.quadrant.html", controller: "QuadrantCtrl", resolve: { catId : function(){ return 4 } }, } } }) And simplified controller creates random number in the scope .controller('QuadrantCtrl', ['$scope', '$rootScope', 'catId' , function ($scope, $rootScope, catId) { $scope.catId = catId; console.log($scope.catId); $scope.random = Math.random() * 100; }]) Each view is then independent with its own instance of controller and $scope Check it here Then we can see results like this quadrant random number in the scope: 32.40865177940577 catId: 1 quadrant random number in the scope: 17.18798188958317 catId: 2 quadrant random number in the scope: 76.22438217513263 catId: 3 quadrant random number in the scope: 41.46456739399582 catId: 4 if the quadrant template is: quadrant random number in the scope: {{random}} catId: {{catId}} All that is strictly following the documentation: Multiple Named Views The working example with above stuff
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26316139
answers question: http://stackoverflow.com/q/26316139

http://stackoverflow.com/a/26243580
score: 1
accepted answer of: http://stackoverflow.com/q/26243466
has comment: http://stackoverflow.com/comment/41166081
type: Answer
answers question: http://stackoverflow.com/q/26243466
has body: The problem here is that you are declaring the function inside the scope of the anaonymous functions passed to the ready jQuery method. $().ready(function() { function foo(){ doSomething; } // foo can only be accessed on this scope. }); You can just expose the function to the window scope using the window variable. $().ready(function() { window.foo = function foo(){ doSomething; } // foo can be accessed on this scope and on the gloabl app scope. });
upvote count: 1
has comment: http://stackoverflow.com/comment/41166338
has comment: http://stackoverflow.com/comment/41166498
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41257870
type: Comment
has text: yes should work, but now you are adding another div to the body? This doesn't mess up your view?
comment on: http://stackoverflow.com/a/26294068
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42200973
comment on: http://stackoverflow.com/a/26284373
has text: @tenfour I am guessing that the asynchronous nature of having to fetch the template is not considered in the Angular execution order. Meaning that the execution order is not guaranteed. In that case, you need to synchronize explicitly :/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41337768
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26337494
has text: It's expected behavior when `g` flag is not specified. The first element is the whole regex, the 2nd element is the text captured by capturing group.
score: 0

http://stackoverflow.com/a/26352418
accepted answer of: http://stackoverflow.com/q/26352074
has body: You have to remember that JS is single threaded. What happens when you use setTimeout(fn, delay) is that JS queues up the function fn to run approximately delay milliseconds in the future, then continues running the lines following setTimeout(). This means that your updateGraphDisplay() function will run to completion, including creating the spinner and then milliseconds later, removing it. Hence why you don't see it update. Instead, what you need to do is move everything after your "long running local computations" into the function passed to setTimeout() so it will execute after that code has run in the future. Abbreviated code structure example: // initialisation code // create spinner and append to DOM setTimeout(function () { // do calculations // update graph // clear spinner }, 0); // even a delay of 0 will work
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/26352074
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26312393
answer count: 1
tagged with: licensing
has body: Is it possible to stop Cloudflare auto minify from removing copyright/license headers from specific javascript files? jQuery for example comes with the MIT license that states that all files should have the license statement in them.
has title: Cloudflare auto minify exluding javascript copyright/license headers
tagged with: cloudflare
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 2
favorite count: 0
has answer: http://stackoverflow.com/a/26346613
type: Question
upvote count: 2

http://stackoverflow.com/comment/41292745
has text: I'm using VS2013 Professional. I tried your advice but still got the same templates. This is a 2nd computer and I had an express edition installed before, maybe thats the source of evil?
type: AnswerComment
comment on: http://stackoverflow.com/a/26313132
score: 0
type: Comment

http://stackoverflow.com/comment/41582477
has text: Crafted a custom version of this to fit my use case. Thank you much John.
type: AnswerComment
comment on: http://stackoverflow.com/a/26470459
score: 0
type: Comment

http://stackoverflow.com/comment/41094442
type: QuestionComment
comment on: http://stackoverflow.com/q/26205691
score: 4
has text: `varA` is the `input` element, not its value, which would be `varA.value`. However, you're going to need to change that to a number before adding it together, or else you'll end up with string concatenation.
type: Comment

http://stackoverflow.com/a/26284682
score: 1
has body: I think you get better animations (when compared to stop()) using CSS. Though I am not sure how you would incorporate a close button with CSS alone. JQuery is very good at manipulating classes however. I would convert this to use a CSS class based approach. Also, you should be explicit with addClass/removeClass in the hover function, especially if the state can be toggled elsewhere. JS $('.box').hover( function() { $(this).find('.info-block').addClass("on"); }, function() { $(this).find('.info-block').removeClass("on"); }); $( ".close" ).click(function() { $(this).parent('.info-block').removeClass("on"); }); CSS .info-block { background: cyan; position: absolute; height: 0; bottom:0; transition:all .5s ease-in; } .info-block.on { height:100%; padding:10px; } http://jsfiddle.net/6mxLvbgq/5/ If you really want to stick with jQuery animations, you should look into using if ($el.is(':animated')) return; instead of stop(). This will let the animation finish without queuing up another one.
answers question: http://stackoverflow.com/q/26284277
has comment: http://stackoverflow.com/comment/41242574
upvote count: 1
has comment: http://stackoverflow.com/comment/41244974
has comment: http://stackoverflow.com/comment/41245183
downvote count: 0
type: Answer

http://stackoverflow.com/q/26261071
tagged with: grid
type: AnsweredQuestion
has title: kendo grid cancelChanges issue
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26263353
type: Question
tagged with: kendo-grid
answer count: 2
tagged with: javascript
has body: I am working on a web application using kendo grid(Angular JS). I should call grid.saveChanges() after every delete or insert operation. But in a special scenario such as Insert a record and call saveChanges Then delete the same record and call saveChanges Then call the call grid.cancelChanges() Normally it goes back to last saveChanges state but in my case it is showing the deleted row. Any help?
tagged with: kendo-ui
upvote count: 1
has answer: http://stackoverflow.com/a/26263353
tagged with: user-interface
favorite count: 0
has answer: http://stackoverflow.com/a/26295050
accepted answer: http://stackoverflow.com/a/26295050

http://stackoverflow.com/q/26201701
downvote count: 2
has comment: http://stackoverflow.com/comment/41087283
has comment: http://stackoverflow.com/comment/41087274
upvote count: 1
has answer: http://stackoverflow.com/a/26201721
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26201721
favorite count: 0
answer count: 3
has title: BEGINNER JavaScript creating elements
possible better answer: http://stackoverflow.com/a/49444971
has answer: http://stackoverflow.com/a/49444971
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26201733
score: -1
type: Question
has body: I am currently working on creating elements via Java Script. For practice I am trying to populate an already existing 'form' element with a button, however I am receiving the following error; Uncaught TypeError: Cannot read property 'appendChild' of null

http://stackoverflow.com/q/26203357
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: google-chrome-app
has comment: http://stackoverflow.com/comment/41091367
has title: Loading a script file in a Chrome App Sandbox
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
tagged with: google-chrome
score: 1
has answer: http://stackoverflow.com/a/26534810
has body: I'm working on a Chrome App, and I have a script file that's saved in the app's sandboxed filesystem. (It's available via a URL filesystem:chrome-extension_****/Persistent/script.js I'm able to use Chrome's FileSystemAPI to read the file in the main app window. However, I need it to be accessible and executable in a sandboxed page. I have the following in my manifest - "sandbox": { "pages": ["sandboxed_page.html"], "content_security_policy": "sandbox allow-scripts;" }, And I'm using the page like this: &lt;iframe id="sandbox_frame" seamless="seamless" src="sandboxed_page.html" sandbox="allow-scripts"&gt;&lt;/iframe&gt; I tried loading the file in the main app window, use window.URL.createObjectURL() to convert it to a blob: URL, and passed this URL via postMessage() to the sandbox. In the sandbox, I'm trying to load the URL into a &lt;script&gt; element. I get an error saying Not allowed to load local resource: blob:chrome-extension%3A//... The other option (which is working) is load the contents of script.js in the main app, and send the entire string through postMessage(). Not sure this is a good idea, as script.js could get pretty big. Am I doing something wrong, or is loading local scripts in sandboxes prohibited by Chrome's security policies? I went through https://developer.chrome.com/apps/app_external, but there's no mention of sending the external resources to the sandbox.
type: Question

http://stackoverflow.com/q/26330601
has comment: http://stackoverflow.com/comment/41325162
type: UnansweredQuestion
tagged with: draw
tagged with: arcgis-js-api
tagged with: javascript
tagged with: esri
type: Question
has body: I'm trying to create a button that on click will activate esri.toolbars.Draw.EXTENT and then when clicked again will deactivate the toolbar and return to normal map navigation. What I have works on the first click, but it doesn't seem to deactivate the tool bar on second click. Everything seems to work except toolbar.deactivate() doesn't seem to fire. function initToolbar(map) { var currentvalue = document.getElementById('searchByExtent').value; var toolbar = new esri.toolbars.Draw(map); if (currentvalue == "Off"){ document.getElementById("searchByExtent").value="On"; toolbar.activate(esri.toolbars.Draw.EXTENT); dojo.connect(toolbar, "onDrawEnd", selectStuff); //toolbar.deactivate(); } else { document.getElementById("searchByExtent").value="Off"; toolbar.deactivate(); } } &lt;input type = "button" id = "searchByExtent" value = "Off" onclick = "initToolbar(map);"&gt; Search by Extent &lt;/input&gt;
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26350794
has title: Having problems with toolbar.deactivate() in ESRI's API

http://stackoverflow.com/comment/41272843
score: 1
comment on: http://stackoverflow.com/q/26302001
type: QuestionComment
type: Comment
has text: Can you provide a [plunkr](http://plnkr.co/) or a [jsfiddle](http://jsfiddle.net/)?

http://stackoverflow.com/a/26276891
has body: You are targeting a div and not a thing like this id="div", so you just need to remove the # : $('div').find('a').each(function() { console.log($(this).attr('href')); });
score: 0
answers question: http://stackoverflow.com/q/26276840
type: Answer

http://stackoverflow.com/comment/41174396
score: 0
has text: I tried IE11, it did the same thing before. Thanks guys for your time, but i fixed it :)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26247981

http://stackoverflow.com/a/35140267
upvote count: 0
answers question: http://stackoverflow.com/q/26323417
score: -1
type: Answer
has body: A bit late to the party but they thought about it. As stated in the usage part of the documentation: Alternatively you can create dropzones programmaticaly (even on non form elements) by instantiating the Dropzone class // Dropzone class: var myDropzone = new Dropzone("div#myId", { url: "/file/post"}); You may have to create an element and set some properties manually. var form = document.createElement('form'); form.classList.add('dropzone'); form.method = 'post'; form.action = '/file/post'; document.getElementById('parent').appendChild(form); new Dropzone(form); Don’t forget to specify an url option if you’re not using a form element, since Dropzone doesn’t know where to post to without an action attribute.
downvote count: 1

http://stackoverflow.com/comment/41181537
type: AnswerComment
has text: `'change.states'` what's this.? I haven't used like this before.? what's the primary purpose of doing so.? Any related article's link would be helpful..
comment on: http://stackoverflow.com/a/26252330
type: Comment
score: 0

http://stackoverflow.com/comment/41121688
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26220006
has text: Use a web developer tool to inspect your console's error log and see where that leads you. Also, make sure you understand what `this` really is in the `data` attribute of your `$.ajax` call.
score: 0

http://stackoverflow.com/a/26329218
answers question: http://stackoverflow.com/q/26328841
has body: I found a solution thanks to zsong and Blackhole. Resulting HTML: I used a recursive template which included itself. It borrows heavily on the answer of Unknown number of sublists with AngularJS. In addition, I had to add the following code to the controller: $scope.isString = function (item) { return typeof item === "string"; };
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/26328841
type: Answer

http://stackoverflow.com/q/26258227
tagged with: datatables
has body: After the initial load of data into the table using angular-datatables (Homepage), I intend to change the time span for which to reload and display data. The span is selected using two datetime input fields. However, all subsequent requests do not modify the time window parameter in the dtOptions obeject. The strange thing is that, when I console.log the modified dtOptions object, the changes seem to take effect, that is - data property of dtOptions reflects the newly selected time range. The inspection of the request in the "Network" tab of "Developer Tools" in Chrome, shows that the old time range values are still used, which causes no updates to the table entries. Example: This is the {from, to} value I get in the "Network" tab of the "Developers Tools" whenever I POST for new data: Origin:http://localhost:9000 Referer:http://localhost:9000/ User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 Form Dataview sourceview URL encoded -&gt;from:1412172055200 -&gt;to:1412690455222 While it's equivalent in the "Console" tab, when issuing console.log($scope.dtOptions); actually reflects the time range I pre-selected. Object {ajax: Object, reload: true, integrateBootstrap: false, hasColVis: false, hasColReorder: false…} ajax: Object data: Object -&gt;from: 1412518000453 -&gt;to: 1412690800493 __proto__: Object datatype: "json" type: "POST" I tried a number of ways to update/rewrite the from and to values in the payload prior to calling $scope.dtOptions.reloadData(): wrote to $scope.dtOptions.ajax.from directly, tried passing an updated payload object, and the latest attempt (code below to give an idea) - used newOptions() to create the dtOptions object anew. var payload = { from: tFrom, to: tTo }; $scope.dtOptions = DTOptionsBuilder.newOptions() .withOption('ajax', { url: constantCfg.apiEndpoint+constantCfg.uri.usersStats, type: 'POST', data: payload }); $scope.dtOptions.reloadData(); console.log($scope.dtOpt…
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26258470
has answer: http://stackoverflow.com/a/26287650
type: Question
answer count: 2
has title: angular-datatables payload format does not change upon subsequent calls to reloadData()
possible better answer: http://stackoverflow.com/a/26258470
accepted answer: http://stackoverflow.com/a/26287650
tagged with: javascript
score: 0

http://stackoverflow.com/comment/111738403
has text: @Marius98 The MVC 5/6 Newtonsoft example above. The XSS risk is increased if the model that is eventually serialized has came from the client or an external source too.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26344334

http://stackoverflow.com/comment/41198268
comment on: http://stackoverflow.com/q/26243141
type: Comment
has text: @Bergi getting `SCRIPT5: Invalid procedure call or argument` https://i.imgur.com/vCASEAA.png
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41333738
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26335264
type: Comment
has text: Make a template file and use it by including it every were.

http://stackoverflow.com/comment/41157201
score: 0
comment on: http://stackoverflow.com/q/26239048
type: Comment
has text: Form is not submitting in that case.
type: QuestionComment

http://stackoverflow.com/a/46037239
has body: Vanilla Javascript var el = document.querySelector(".right-side"); el.dispatchEvent(new Event('scroll'));
has comment: http://stackoverflow.com/comment/89685811
score: 19
type: Answer
answers question: http://stackoverflow.com/q/26252164
upvote count: 19
has comment: http://stackoverflow.com/comment/89686372
downvote count: 0

http://stackoverflow.com/q/26296635
has body: I am using JQuery dialog to render partial view. Scenario : Step 1: Click on 'Add' anchor link, dialog with text box will open. Step 2: User fills text box values and click on save button. Step 3: Details will be saved and dialog will be closed. Step 4: Now User will click on 'View' anchor link , again dialog with read-only text box values will open. Step 5: User will click on cancel button. Step 6: Again user click on 'Add' anchor link, and dialog with text box open. Step 7: User fills text box values and click on save button. Step 8: The problem starts from here. it should save details which user has entered just now, but it is saving old values (which we have viewed in step 4). I have tried below code to render partial view on click and open dialog var div = $("#DivTaskDetail"); var Title = ""; if (Mode == 1) { Title = "Edit Task Detail"; } else if (Mode == 2) { Title = "View Task Detail"; } else { Title = "Add Task Detail"; } div.load("/Task/TaskDetailEditView?taskID=" + TaskID + "&amp;mode=" + Mode, function () { div.dialog({ modal: true, width: 500, height: 450, title: Title, resizable: false, close: function () { $(this).dialog("close"); } }); }); and on click of cancel button, i have written below code function onClickCancelTask() { $('#DivTaskDetail').dialog("close"); } I have tried below different codes to close dialog, but none of are working fine for me. 1. $('#DivTaskDetail').empty(); 2. $('#DivTaskDetail').remove(); 3. $('#DivTaskDetail').dialog('destroy').remove(); 4. $('.ui-icon-closethick').click(); 5. $('#DivTaskDetail').dialog("close"); 6. $('#DivTaskDetail').dialog("destroy"); 7. $("#DivTaskDetail").dialog("destroy"); $('#DivTaskDetail').dialog('close').dialog('remove'); 8. $('#DivTaskDetail').dialog("destroy"); $('#DivTaskDetail').remove(); can anyone please guide me on this.?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26421103
score: 0
answer count: 1
tagged with: jquery
has title: JQuery UI Dialog not closing properly
type: AnsweredQuestion
tagged with: dialog
type: Question
has answer: http://stackoverflow.com/a/26421103

http://stackoverflow.com/comment/41378389
has text: Ah. I was using 1.3.0-rc.1. Thank you
type: AnswerComment
comment on: http://stackoverflow.com/a/26337412
score: 0
type: Comment

http://stackoverflow.com/q/26257873
upvote count: 18
has body: I want to create a robot with Node.js and Tessel.io, i bought the audio module and i'm wondering if it exist any speech to text or audio to text package for node js or something else. Can someone help me with this? Thank you
type: Question
downvote count: 0
score: 18
tagged with: javascript
has answer: http://stackoverflow.com/a/71711118
has comment: http://stackoverflow.com/comment/41242344
has title: Node js offline speech to text
has answer: http://stackoverflow.com/a/73587897
tagged with: speech-recognition
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26261447
answer count: 4
tagged with: node.js
has comment: http://stackoverflow.com/comment/59881205
has answer: http://stackoverflow.com/a/41454518
tagged with: audio
has comment: http://stackoverflow.com/comment/59882193

http://stackoverflow.com/comment/41348670
type: Comment
has text: thanks, i read that.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26343288

http://stackoverflow.com/q/26300640
upvote count: 0
type: Question
score: -1
tagged with: chat
answer count: 2
downvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26301458
favorite count: 0
has body: I have a chat application where a user can submit a message and the message appears in a chat bubble with an orange background. I've created 5 coloured div boxes which I want to link to the background colour of the chat bubble. My hope is that the user can click on one of the coloured div's and their following messages would appear in a chat bubble with that background. How could I do this? See link for illustration: https://i.sstatic.net/LnRfE.jpg CODE: HTML: JAVA JAVASCRIPT: $('#typetextbox').keypress(function (e){ if(e.keyCode == 13 ) $('#submit').click(); }); $('#submit').click(function(){ var message = $('#typetextbox').val(); if (message.replace(/ /g, '')){ var positions = makeNewPosition(); var el = $(' '+message+' '); $('#messagebox').append(el); CSS: li { height:auto; width:auto; background: #E99D41; position: absolute; background-opacity: 50%; font-family: Helvetica, sans-serif; color: #FFF; #Blue{ position: absolute; top: 88%; left: 25%; } #Brown, #Red, #Green, and #Orange all same as #Blue. I hope this all makes sense, and I'm sure its a pretty simple thing, but I would really appreciate the help! Thanks
has title: Clickable colour boxes to change chat bubble colour
has answer: http://stackoverflow.com/a/26301125
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41327794
has text: This is incorrect. You're losing the first argument because it tries to be bound as the `this` value of the `log` method via `.call()`, but you've already bound `this`, so it gets ignored.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26332055
type: AnswerComment

http://stackoverflow.com/comment/41267515
type: QuestionComment
comment on: http://stackoverflow.com/q/26289344
score: 0
has text: new Date() is called when the article is created. Read and understand the code before commenting.
type: Comment

http://stackoverflow.com/comment/41089422
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26202348
has text: @torazaburo - yes, I agree with you that it's better NOT to omit semi-colons... but in this particular case, you might see a contradiction of two rules: I would doubtlessly write ';' in something like **var a = b;**, but I would not put any semicolons right after the function like **function a(){};** In this case one can overlook function expression and treat it like a function

http://stackoverflow.com/q/26197734
tagged with: javascript
has comment: http://stackoverflow.com/comment/41080977
has comment: http://stackoverflow.com/comment/41080986
has comment: http://stackoverflow.com/comment/41083890
answer count: 1
downvote count: 0
favorite count: 0
tagged with: joomla
accepted answer: http://stackoverflow.com/a/26199803
tagged with: encryption
tagged with: http://stackoverflow.com/tag/html
has body: I have a web app that displays productivity figures for the vessels currently working in our container terminal. The data is somewhat sensitive, but is not really top secret, since is just moves pending, total, productivity in moves per hour and the times of the first move and an estimate when the vessel will finish operations. Although, if made public, the shipping lines could be able to see how their competition's vessels are being attended, and might cause issues with our marketing department. Now, I created the webapp for our smartphone users, so they can have the real-time productivity board at hand. That help them assess the operation the moment is happening, and make corrective actions to speed up the lifting equipment or fix any issues on the fly. The app runs in an internal web server, and the users must log into the VPN to view the app data. Is not accessible from the outside. We have been recently requested by some of our customers to have the data available to them, but segregated in order to see their vessels only. That is no problem. I can do that easily, but the issue is that I don't want to give access to our VPN to each and every customer that want to use the app. The app works this way: a) A Pentaho ETL runs querying our databases, and produces an XML file which is saved in the apache webroot. b) The XML file es read by the webapp written in HTML5, JS, JQuery, and also using bootstrap.js, datatables.js, realgauge.js and some other frameworks. My idea is to copy the app resource files to the public webserver, and have a cron job ftp all XML files being updated by the minute, since is accessible from the LAN. That way our smartphone users will no longer have to log into the VPN to access the app. But, there are security concerns, since HTML, JS and XML files will be exposed to the public. The app will not be publicized, but I'm afraid that an attacker, just browsing the web root directory, might pinpoint the files and extract the data. So, my questio…
has comment: http://stackoverflow.com/comment/41080644
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
score: 1
upvote count: 1
has title: Access control or encryption for public webapp
type: Question
has answer: http://stackoverflow.com/a/26199803

http://stackoverflow.com/a/26331409
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26331355
has body: You should not echo arbitrary data into a script. You have opened yourself up to cross-site scripting attacks. You can get around the problem by JSON-encoding your data, which is compatible with JavaScript. var ville = &lt;?php echo json_encode($_GET['ville']); ?&gt;;
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41327712
has comment: http://stackoverflow.com/comment/41326728

http://stackoverflow.com/q/26291058
tagged with: javascript
has answer: http://stackoverflow.com/a/26603933
tagged with: gruntjs
answer count: 3
has comment: http://stackoverflow.com/comment/41726866
downvote count: 0
has answer: http://stackoverflow.com/a/26291290
favorite count: 0
has title: Angular-Fullstack - grunt build not including javascript files
has body: OK I post this question on Angular-Fullstack's issue list on gitHub so you can check it out there too to see if there are any additional posts that aren't on here. git hub question Basically I'm getting the following output in the console: GET http://localhost:8080/assets/images/loading.gif 404 (Not Found) (index):60 GET http://localhost:8080/app/assignment-meeting/prepare-senior/candidate/profile/_profile-ctrl.js (index):102 GET http://localhost:8080/app/assignment-meeting/prepare-senior/candidate-list/candidates-list-controller.js (index):100 GET http://localhost:8080/app/assignment-meeting/prepare-senior/candidate/_candidate-ctrl.js (index):101 GET http://localhost:8080/app/assignment-meeting/prepare-senior/candidate/summary/_summary-ctrl.js (index):103 GET http://localhost:8080/app/home/home-controller.js (index):104 GET http://localhost:8080/components/services/candidate-services.js (index):109 GET http://localhost:8080/components/auth/User.js (index):106 GET http://localhost:8080/app/routes.js (index):105 GET http://localhost:8080/components/directives/napi-ck-editor.js (index):108 GET http://localhost:8080/components/auth/user-service.js (index):107 GET http://localhost:8080/components/services/http-helper.js (index):110 GET http://localhost:8080/components/services/menu-services.js 404 (Not Found) It seems like grunt build can't find my script files located within the injector sections of my index.html page. If I recopy the originally created index.html file that the generator created and copy all of the code above the "Google Analytics" section over, then it will work fine. I don't understand why it doesn't work as it doesn't seem to show there being any actual difference in the code. The page doesn't show a single line being different. The only thing that I thought might be causing the problem is that the line endings might be getting changed when I commit it to git and then it has issues. Truthfully I'm in the dark on this one. I post this question on a c…
tagged with: angularjs
linked to: http://stackoverflow.com/q/11899843
type: UnansweredQuestion
score: 6
upvote count: 6
tagged with: bower
has comment: http://stackoverflow.com/comment/41734796
has comment: http://stackoverflow.com/comment/41708813
type: Question
has answer: http://stackoverflow.com/a/27138500

http://stackoverflow.com/comment/41162595
type: QuestionComment
type: Comment
has text: @b1j in that case he only select input elements, ":input" selector includes textareas, select and buttons.
comment on: http://stackoverflow.com/q/26241876
score: 0

http://stackoverflow.com/comment/41125842
score: 0
has text: yes, sure, i'm new here sorry. i have more one problem here to remove all the js in-line code. i had this $("#menu-posts").addClass("active-button"); to select a button, that is obviously different in each page, there is something in css to do this without replicate code? and there is not wrong with the in-line css (in this example) or it is bad programming? thank you
type: Comment
comment on: http://stackoverflow.com/a/26218723
type: AnswerComment

http://stackoverflow.com/comment/41257555
has text: yes if i add https url to my trusted site zone it works.But that is my limitation I cant add https url to trusted sites ..
comment on: http://stackoverflow.com/a/26293847
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41295928
type: Comment
has text: Anyone? This really is my second bad experience with Grunt.
comment on: http://stackoverflow.com/q/26314585
score: 0
type: QuestionComment

http://stackoverflow.com/q/26203420
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26204228
has comment: http://stackoverflow.com/comment/41090233
upvote count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/26255681
type: Question
has comment: http://stackoverflow.com/comment/41090282
has title: Preserving Text Formatting with an AJAX POST request in JS
has comment: http://stackoverflow.com/comment/41090268
tagged with: javascript
has comment: http://stackoverflow.com/comment/41090242
score: 0
answer count: 3
has body: What I am trying to do is pass some text (commentText in the code below) to a PHP page using an AJAX request using a POST method mixed up with some flags (what=add in the code below) that tells the PHP page what this text is. I used the post method, because it allows me to easily recover some information from the url in the PHP page: the JS Script: xmlhttp.open("POST", "/comment.php", true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("what=add&amp;comment=" + commentText); the PHP file: if ($_POST['what'] == "add") { print_r($_POST['comment']); exit(); ... } The problem I have with this approach is that because of the url-encoding, the formatting of the text (comment in the code above) is gone when I get to the PHP page. For instance if commentText is: this is some comment. And I have another line. In the PHP file I get: $_POST['comment'] -&gt; "this is some comment. And I have another line." The \n is gone. So by formatting to be clear, I mean essentially in this particular case, the return line (which is what I am after for now). What would be a solution to this problem? I guess I can pass the text as plain text, but then loose the ability to use the _POST[] functionality to easily retrieve the different fields. Does that mean I somehow have to pass the data, as a plain text, and encode the fields myself within that text? Is this is the only solution or is there a better one?
favorite count: 0
has answer: http://stackoverflow.com/a/26203468
tagged with: ajax
has answer: http://stackoverflow.com/a/26255681
tagged with: php
possible better answer: http://stackoverflow.com/a/26203468

http://stackoverflow.com/a/26224389
has comment: http://stackoverflow.com/comment/41131637
has comment: http://stackoverflow.com/comment/41130736
has comment: http://stackoverflow.com/comment/41130848
answers question: http://stackoverflow.com/q/26224129
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41131012
has body: Yeah so the thing is, PHP is a server-side language that only gets executed when the page loads. I'm not sure exactly how you would expect your JS to update the markers, as there are no get/post anywhere. If you want to get data from the server, you have to contact the server. This loop while ($achados_lista = mysql_fetch_array($query_lista)) { $lat = $achados_lista['MONITLATITUDE']; $lon = $achados_lista['MONITLONGITUDE']; $Data = $achados_lista['MONITDATA']; $hora = $achados_lista['MONITHORA']; $raio = $achados_lista['MONITRAIO']; $provedor = $achados_lista['MONITPROVEDOR']; $velocidade = $achados_lista['MONITVELOCIDADE']; echo 'locations.push ( {Data:"'.$Data.'", latlng: new google.maps.LatLng('.$lat.', '.$lon.'), hora:"'.$hora.'", raio:"'.$raio.'",provedor:"'.$provedor.'",velocidade:"'.$velocidade.'"} );'; } Only gets executed ONCE. The value of locations doesn't change. You should read up on jQuery ajax requests. Make an HTTP request to a PHP file that returns the locations as JSON (just echo the JS array) and use the result to update the markers.

http://stackoverflow.com/q/26284681
score: 0
upvote count: 1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41241000
has body: I have this javascript object, console.log(object.response); console.log(object.response.imageUID); gives me: {"id":138,"imageUID":"image-aa0dce87-0261-44ef-8377-d897a996f4b1"} undefined What went wrong?
favorite count: 0
has title: javascript object element bug
has comment: http://stackoverflow.com/comment/41241133
has comment: http://stackoverflow.com/comment/41241086
has comment: http://stackoverflow.com/comment/41241768
has answer: http://stackoverflow.com/a/26285158
accepted answer: http://stackoverflow.com/a/26285158
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41240976
has comment: http://stackoverflow.com/comment/41243999
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/41242477
has comment: http://stackoverflow.com/comment/41241129
has comment: http://stackoverflow.com/comment/41241424
has comment: http://stackoverflow.com/comment/41241005
tagged with: javascript

http://stackoverflow.com/q/26331896
has comment: http://stackoverflow.com/comment/41328367
tagged with: javascript
has comment: http://stackoverflow.com/comment/41341677
has comment: http://stackoverflow.com/comment/41329063
has answer: http://stackoverflow.com/a/26342895
answer count: 2
has comment: http://stackoverflow.com/comment/41328750
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41345128
tagged with: visual-studio
has body: When I use Visual Studio to edit an external Javascript file and use Javascript within the page, it unsurprisingly is unaware of JQuery, because the web page that owns it hasn't loaded the Javascript file. //test.js: $(document).ready(function () { alert("If you really need a code example"); }); As a result, I get this error: Error 1 Could not find symbol '$' Again, this is a design time error, not a runtime error. Is there a way to make the Visual Studio Editor a little smarter or at least suppress these errors? Update: I think it was the Typescript editor that I was in that just complained that there was an error, no error is shown when editing the rresulting javascript file. Modified Question: How can I make the TypeScript file editor happy? I think the "editor" may be Web Essentials add in and that there may be a directive to make it ignore the $, perhaps. Or am I thinking of JSLint? I''m new to all of this...
score: 2
has answer: http://stackoverflow.com/a/26332159
has comment: http://stackoverflow.com/comment/41328576
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41327994
type: Question
has title: Error 1 Could not find symbol '$'

http://stackoverflow.com/a/26215222
has body: I believe it is bodyCls what you are looking for.
answers question: http://stackoverflow.com/q/26214739
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26214739
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41113464

http://stackoverflow.com/comment/41203530
score: 1
comment on: http://stackoverflow.com/q/26264090
type: Comment
has text: Create a fiddle please
type: QuestionComment

http://stackoverflow.com/q/26261634
answer count: 1
downvote count: 0
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/26261671
has body: i am parsing a large list with a node.js application and have this code sizeCode = dbfr.CN_DESC.split('\s+-\s*|\s*-\s+') this does not seem to work as it returns [ 'WOMEN\'S CC CROPPED TOP T-SHIRT - MELANGE GREY - S' ] [ 'WOMEN\'S CC CROPPED TOP T-SHIRT - MELANGE GREY - M' ] [ 'WOMEN\'S CC CROPPED TOP T-SHIRT - MELANGE GREY - L' ] [ 'WOMEN\'S CC CROPPED TOP T-SHIRT - WHITE - S' ] [ 'WOMEN\'S CC CROPPED TOP T-SHIRT - WHITE - M' ] [ 'WOMEN\'S CC CROPPED TOP T-SHIRT -WHITE - L' ] [ 'WOMEN\'S CC LOW CUT RACER BACK TUNIC VEST -WHITE - M' ] [ 'WOMEN\'S CC LOW CUT RACER BACK TUNIC VEST - WHITE -L' ] where as if i just use sizeCode = dbfr.CN_DESC.split(' - ') works correctly, the issue i have though is that in some instances, i may have different position for the '-' dash character so for example: [ 'WOMEN\'S CC CROPPED TOP T-SHIRT -WHITE - L' ] [ 'WOMEN\'S CC LOW CUT RACER BACK TUNIC VEST -WHITE - M' ] [ 'WOMEN\'S CC LOW CUT RACER BACK TUNIC VEST - WHITE -L' ] but i don't want to split the T-SHIRT for example. any advice much appreciated
type: AnsweredQuestion
upvote count: 3
type: Question
score: 3
has title: regex '\s+-\s*|\s*-\s+' does not work correctly
has comment: http://stackoverflow.com/comment/41202845
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26261671

http://stackoverflow.com/a/26342376
has comment: http://stackoverflow.com/comment/41346750
score: 0
accepted answer of: http://stackoverflow.com/q/26342237
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26342237
type: Answer
has body: Your issue is that you mean to get a jQuery object using $('#post_origin'), as ('#post_origin')is not valid. You do this a couple more times, make sure you get jQuery objects by doing: $('selector'). Also, know that if you want to save a jQuery object to a variable, you can do that with var variableName = $('selector').
has comment: http://stackoverflow.com/comment/41346842

http://stackoverflow.com/q/26338811
upvote count: 1
has comment: http://stackoverflow.com/comment/41345435
tagged with: node.js
answer count: 0
score: 1
has title: Minification of JS file using RequireJS Optimizer
has comment: http://stackoverflow.com/comment/41367858
type: Question
tagged with: javascript
has body: I am working on minification of 3(one.js,two.js,three.js) JS files using require.js. The 3 js files have 3 alert messages. These 3 js files is being called using main.js file. One.js: define([], function one() { alert("one"); }); Two.js: define([], function two() { alert("two"); }); Three.js: define([], function three() { alert("three"); }); Main.js: require(["./scripts/one", "./scripts/two", "./scripts/three"], function (one, two, three) { }); Main_built.js: define("app/scripts/one",[],function(){alert("one")}),define("app/scripts/two",[],function(){alert("two")}),define("app/scripts/three",[],function(){alert("three")}),require([],function(e,t,n){}),define("app/main",function(){}); Later I created Main_built.js and trying to use it and expecting that no http calls should be made to one,two and three js files, but still I am seeing calls to them in the Fiddler tool. On running my application, although the Main_built.js is loaded with minified contents of all other js file. The thing that I am expecting is on executing the application, it should only load the Main_built.js, and should not call any other js files. But i can see it is calling one.js, two.js etc along with Main_built.js Below is the link I have taken reference from- http://requirejs.org/docs/optimization.html
tagged with: bundling-and-minification
downvote count: 0
tagged with: minify
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/26285395
has comment: http://stackoverflow.com/comment/41245755
upvote count: 1
has comment: http://stackoverflow.com/comment/41245689
score: 1
answers question: http://stackoverflow.com/q/26284798
has comment: http://stackoverflow.com/comment/41271586
has comment: http://stackoverflow.com/comment/41245785
has comment: http://stackoverflow.com/comment/41242854
type: AcceptedAnswer
downvote count: 0
has body: function getDatePrice() { // Don't pass any arguments ..* var theForm = document.forms.form; // Use rather dot notation var purchasedate = theForm.elements.purchasedate; // Use rather dot notation var date = new Date(purchasedate.value); // *.. cause you'll get here the value if (Object.prototype.toString.call(date) !== '[object Date]') { date = new Date(); } var today = new Date(); var diffMilli = today - date; // So today - date = Some time in milliseconds... // if you multiply that value you'll get an astronomic number so, to get days.. var diffDays = Math.floor(diffMilli / 1000 / 60 / 60 / 24); // ..Divide! var datePrice = 0; if (diffDays &gt; 30) { datePrice = 20; } return datePrice; } function calculateTotal(){ var divobj = document.getElementById('totalPrice'); divobj.style.display = 'block'; divobj.innerHTML = "Estimated Transfer Fees $"+ getDatePrice(); } Live demo and for the Input event use the oninput="calculateTotal();"
type: Answer
has comment: http://stackoverflow.com/comment/41267812
accepted answer of: http://stackoverflow.com/q/26284798
has comment: http://stackoverflow.com/comment/41245805
has comment: http://stackoverflow.com/comment/41243859
has comment: http://stackoverflow.com/comment/41245383
has comment: http://stackoverflow.com/comment/41243883

http://stackoverflow.com/q/26225502
accepted answer: http://stackoverflow.com/a/26225721
type: AnsweredQuestion
has body: I have a big list of items and i need to set a modal box to each of these items. The problem is: i'm creating a lots of modal boxes in the DOM and i only want 1 for every items. I'm creating the modal HTML everytime that the user click on one item and i put it in the body. But now i need to remove the modal from the DOM (body) when this is closed by the user. It's possible to trigger a function when the modal box is closed?
type: Question
has comment: http://stackoverflow.com/comment/41132718
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: zurb-foundation
answer count: 1
has title: Do something when a Zurb-reveal.js modal dialog is closed
has answer: http://stackoverflow.com/a/26225721

http://stackoverflow.com/a/26290058
has body: What you are doing in your example isn't actually inheritance, but simply creation and modification. To achieve inheritance in Javascript, it's not actually an OBJECT that you are extending, per se. It's a function. An object doesn't provide direct access to its prototype, a function does. So what you're after is likely something more like: function ObjA() { return this; } ObjA.prototype.doStuff = function() { // do objA stuff }; function ObjB() { return this; } ObjB.prototype = new ObjA(); ObjB.prototype.doStuff = function() { ObjA.prototype.doStuff.apply(this, arguments); // do objB stuff } var objA = new ObjA(), objB = new ObjB();
type: Answer
has comment: http://stackoverflow.com/comment/41251075
has comment: http://stackoverflow.com/comment/41251066
has comment: http://stackoverflow.com/comment/41251027
score: 0
answers question: http://stackoverflow.com/q/26289896

http://stackoverflow.com/a/26352006
downvote count: 0
score: 1
has body: 2 problems with your code - The Date object uses 0-11 instead of 1-12 for months Jan-Dec. So when you set the month of the date object, you need to subtract 1 to set the correct month. When you convert the month back to Jan-Dec 1-12, you'll need to add back the 1. Also, I updated your code a little so that the loop will continue working correctly. This loop goes 3 iterations, but should be expandable to 10. Lastly, if your answers come out different then expected, this thread might be the cause of the issue. How to add number of days to today&#39;s date? JS Fiddle: http://jsfiddle.net/biz79/bteL6138/ var initialDate = "01-01-2014"; var lastDate = initialDate; var x; for (x = 1; x &lt;= 3; x++) { var dateArray = lastDate.split("-"); // sub 1 from month var dateObj = new Date(dateArray[2], dateArray[1] - 1, dateArray[0]); dateObj.setMonth(dateObj.getMonth() + 1); dateObj.setDate(dateObj.getDate() + 14); // add 1 for month lastDate = dateObj.getDate() + "-" + (dateObj.getMonth() + 1) + "-" + dateObj.getFullYear(); $("#dateOf_installment_" + x).val(lastDate); }
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26351475
answers question: http://stackoverflow.com/q/26351475
has comment: http://stackoverflow.com/comment/41365292

http://stackoverflow.com/a/26276473
answers question: http://stackoverflow.com/q/26276042
downvote count: 1
has body: You can also use nth-child $('.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable:nth-child(3)')
score: -1
upvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41228710

http://stackoverflow.com/comment/41249423
type: QuestionComment
score: 1
has text: still very confusing descriptions.
comment on: http://stackoverflow.com/q/26285461
type: Comment

http://stackoverflow.com/a/26253778
score: 1
has comment: http://stackoverflow.com/comment/41184316
has body: Don't use .pageSelect as selector, because jQM will create an additional element with this style. When you do ´select = $.mobile.activePage.find('.pageSelect'); select.html(options.html); select.val(options.value);´ you are inserting html code in two elements, the select and the rendered object, and because of that, you lose styling. Try this: $.mobile.activePage.find('select[class=pageSelect]').html(options.html).select('refresh'); http://jsfiddle.net/cjindustries/0cmg8vvt/ Also, if you are starting with jQM, consider moving to v1.4.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26253069
accepted answer of: http://stackoverflow.com/q/26253069

http://stackoverflow.com/comment/41303626
has text: @Ido Also, the selector should select `a` elements that don't start with `Re: `. It looks like your solution is selecting only elements that *do* contain `Re: `
type: Comment
comment on: http://stackoverflow.com/a/26318969
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41184122
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26239720
has text: Try this for registration your watcher: `$scope.$watch('[currentPage,itemsPerPage]', function () { ... }, true);`
type: AnswerComment

http://stackoverflow.com/comment/41125662
has text: A few days ago I had a similar problem and inexplicably I fixed it just removing window name. In your case, something like this: `window.open(url, "", "width=800, height=300");`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26221438

http://stackoverflow.com/q/26212323
has comment: http://stackoverflow.com/comment/41107184
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41107545
tagged with: jquery
has comment: http://stackoverflow.com/comment/41109252
tagged with: ajax
has comment: http://stackoverflow.com/comment/41108774
has title: Can I access a url with dynamic port through ajax call?
has comment: http://stackoverflow.com/comment/41107324
has comment: http://stackoverflow.com/comment/41107378
favorite count: 0
has body: Consider the following code.. $.ajax({ url: "http://***.*.*.*:9001/jolokia/*", dataType:"json", async: false }).responseText; Can I access a url with dynamic port? Such as, if the port keeps on changing dynamically can the ajax call get the data from that url?
answer count: 0
has comment: http://stackoverflow.com/comment/41107520
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41108055
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/41107424
type: Question

http://stackoverflow.com/a/26352343
type: Answer
score: 2
downvote count: 0
has body: You have to use .html() instead of .text(). So change $("#par").text('I\n CANT&lt;br /&gt;INSERT&lt;br&gt;LINE BREAKS!'+'&lt;br /&gt;'+'FFFF;br/KKK'); to $("#par").html('I\n CANT&lt;br /&gt;INSERT&lt;br&gt;LINE BREAKS!'+'&lt;br /&gt;'+'FFFF;br/KKK');
upvote count: 2
answers question: http://stackoverflow.com/q/26352316

http://stackoverflow.com/q/26270836
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41215743
has title: jquery - focusout event is firing when input gains focus
has comment: http://stackoverflow.com/comment/41216793
favorite count: 0
has comment: http://stackoverflow.com/comment/41216081
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41216519
type: Question
has body: I have a textarea and an input. I am sending an ajax request when any control loses focus. I am using the following JS: //Large text event $('.custom-largetext').focusout(function () { getCustomCounts($(this)) }); //Autocomplete text event $('.custom-autocomplete').focusout(function () { getCustomCounts($(this)) }); The problem I am facing is when I enter any text in the textarea and press tab, first the focusout of the textarea is firing and as soon as the input gains focus, its focusout is also getting fired. I want to do something only when any control loses its focus. Any reason why focusout is firing on focusin? I have tried with .blur(), but I am facing the same issue. Any other alternative to do something when and input or textarea loses its focus? EDIT: The input and textarea fields are added dynamically using knockoutJS, which why I using a common class to refer them. EDIT2: I have searched a little and the problem is with AJAX request being made in the focusout event. When I enter a value in the input and press tab or click on some other input control, which in both cases the focus goes to the other input element immediately, the AJAX request is made twice. If I click outside of the input the AJAX request is made only once. Any reason why this is happening? How to solve this issue?

http://stackoverflow.com/a/26267636
downvote count: 0
has body: There is no latLng-property for a request. To limit results to a specific country use the componentRestrictions: { 'address': address, componentRestrictions:{country:'ie'} }
score: 1
accepted answer of: http://stackoverflow.com/q/26264759
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41210503
has comment: http://stackoverflow.com/comment/41210859
answers question: http://stackoverflow.com/q/26264759
has comment: http://stackoverflow.com/comment/41210364

http://stackoverflow.com/comment/41325317
has text: Thank you. I added that line to the very top of my head section. Now it works like a charm.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26326342

http://stackoverflow.com/q/26307836
upvote count: 2
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41283938
has comment: http://stackoverflow.com/comment/41287518
has comment: http://stackoverflow.com/comment/41283691
has answer: http://stackoverflow.com/a/26999768
has body: I am trying to add a search in page function with javascript. I was looking at this script. It is creating the input element dynamically inside an iframe to skip the text in the search input box. I have bootstrap running on my project and the dynamic content doesn't get the bootstrap styling. How can I style the input box and submit button with bootstrap?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41283835
type: Question
has comment: http://stackoverflow.com/comment/41283513
answer count: 1
downvote count: 0
has title: Styling dynamically created html elements
favorite count: 0
has comment: http://stackoverflow.com/comment/41284079
has comment: http://stackoverflow.com/comment/41305615
has comment: http://stackoverflow.com/comment/41303544
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41305711
has comment: http://stackoverflow.com/comment/41285221
score: 2

http://stackoverflow.com/q/26276042
has comment: http://stackoverflow.com/comment/41227324
has comment: http://stackoverflow.com/comment/41227315
tagged with: css
has comment: http://stackoverflow.com/comment/41226964
has body: I have three divs' all have same class. The difference is their styles. In my case a want to select only the third one using the JQuery. &lt;div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-divProfile" style="display: none; z-index: 1000; outline: 0px;"&gt;&lt;div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"&gt;&lt;span class="ui-dialog-title" id="ui-dialog-title-divProfile"&gt;Edit Profile&lt;/span&gt;&lt;a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"&gt;&lt;span class="ui-icon ui-icon-closethick"&gt;close&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id="divProfile" class="ui-dialog-content ui-widget-content"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-divChangePassword" style="display: none; z-index: 1000; outline: 0px;"&gt;&lt;div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"&gt;&lt;span class="ui-dialog-title" id="ui-dialog-title-divChangePassword"&gt;Change Password&lt;/span&gt;&lt;a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"&gt;&lt;span class="ui-icon ui-icon-closethick"&gt;close&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id="divChangePassword" class="ui-dialog-content ui-widget-content"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-4" style="display: block; z-index: 1052; outline: 0px; height: auto; width: 900px; top: 154.5px; left: 226.5px; opacity: 0.0784;"&gt;&lt;div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"&gt;&lt;span class="ui-dialog-title" id="ui-dialog-title-4"&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button"&gt;&lt;span cl…
favorite count: 0
has comment: http://stackoverflow.com/comment/41227513
has answer: http://stackoverflow.com/a/26276748
upvote count: 2
has answer: http://stackoverflow.com/a/26276073
has answer: http://stackoverflow.com/a/26276196
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41224749
has comment: http://stackoverflow.com/comment/41226469
has comment: http://stackoverflow.com/comment/41227306
has answer: http://stackoverflow.com/a/26276473
has title: Selecting an element in JQuery by its style attribute value
linked to: http://stackoverflow.com/q/10787865
has comment: http://stackoverflow.com/comment/41227461
has answer: http://stackoverflow.com/a/26276141
type: Question
has comment: http://stackoverflow.com/comment/41227199
has answer: http://stackoverflow.com/a/26276995
has comment: http://stackoverflow.com/comment/41227088
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/41225096
score: 0
has comment: http://stackoverflow.com/comment/41227700
has comment: http://stackoverflow.com/comment/41224767

http://stackoverflow.com/a/26348974
has comment: http://stackoverflow.com/comment/117489832
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/104604164
upvote count: 10
type: Answer
accepted answer of: http://stackoverflow.com/q/26347742
has comment: http://stackoverflow.com/comment/105636069
answers question: http://stackoverflow.com/q/26347742
has body: This appears to be a bug that effects the way that Safari reports element and scroll locations on its load event. If you run the exact same call with a 500ms timeout everything works as expected. I will update when I hear back on my bug report.
score: 10
has comment: http://stackoverflow.com/comment/117961012

http://stackoverflow.com/a/26230185
type: Answer
answers question: http://stackoverflow.com/q/26228309
score: 0
has body: I've tried it locally, and can't see the flicker in Chrome v.37. Instead of doing both a $("body").css change and a SecondaryNav.addClass / .removeClass, try doing it as a single indivisible operation. Simply do $("body").addClass("stuck") / .removeClass. Then change your css to replace .stuck { ... with body.stuck .secondary-navigation { ...

http://stackoverflow.com/q/26346076
has comment: http://stackoverflow.com/comment/41360037
possible better answer: http://stackoverflow.com/a/44377589
favorite count: 0
has body: As you can see on the following image, the div (top left) shows the current marker address/directions/ save.. This was done using the embedded iframe code from google maps. But how can you do the same with custom "coded" map? geocoder = new google.maps.Geocoder(); geocoder.geocode({ "address": nw.google_pointer }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var myOptions = { zoom: parseInt(nw.google_zoom), center: results[0].geometry.location, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location, title: nw.google_pointer }); } else { console.log('Geocode was not successful for the following reason: ' + status); } });
has comment: http://stackoverflow.com/comment/48050413
score: 14
linked to: http://stackoverflow.com/q/24768772
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/44377589
type: Question
linked to: http://stackoverflow.com/q/28763672
answer count: 2
tagged with: google-maps
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/30147149
accepted answer: http://stackoverflow.com/a/30147149
has title: Google maps; add place card to marker
upvote count: 14
tagged with: google-maps-api-3

http://stackoverflow.com/a/26320097
answers question: http://stackoverflow.com/q/26320058
score: 2
upvote count: 2
has body: If you want to call parseSearchResult anyway — use always (http://api.jquery.com/deferred.always/) instead of then. But if you use it, you must catch errors in parseSearchResult.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41324945
comment on: http://stackoverflow.com/a/26330467
type: AnswerComment
score: 0
type: Comment
has text: Appending would be the angular way because directives should be used as standalone units. Why don't you simply make a higher-level directive that would render both the tooltip and the button markup (and simply use `replace: true`?

http://stackoverflow.com/q/26349463
has title: Crossrider: Using facebook plugin
downvote count: 0
has body: I started testing the Facebook plugin on a Crossrider extension but soon found some drawbacks. I'm trying to listen for the write_comment event and it works fine the first time. Here's the code that I'm using on the extension.js file: appAPI.ready(function($) { // Load the Facebook plugin var facebookHook = appAPI.hooks.register('facebook'); facebookHook.addListener('write_comment', function(components) { alert('on write comment'); }); }); The problem is that some times the event is fired and sometimes it's not. I can name a few scenarios: the event is fired just the first time sometimes more than once, I mean when clicking different comment input boxes but then doesn't work again Should I use the plugin on this scope or on the background scope? Is there another way to use Facebook API alongside with Crossrider Framework?
tagged with: javascript
has comment: http://stackoverflow.com/comment/50547793
has comment: http://stackoverflow.com/comment/41686617
has comment: http://stackoverflow.com/comment/41387829
has comment: http://stackoverflow.com/comment/41616903
tagged with: cross-browser
has comment: http://stackoverflow.com/comment/41379866
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: facebook
tagged with: crossrider
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/50581444
type: Question

http://stackoverflow.com/q/26234930
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26235092
accepted answer: http://stackoverflow.com/a/26235092
type: AnsweredQuestion
has title: How to iterate an array of objects and print out one of its properties
tagged with: jslink
type: Question
has comment: http://stackoverflow.com/comment/41149057
has body: I have the following code in a display template in sharepoint, I have an array of objects and I need to have the following result. Name1 Name2 Name3 So I can replace the default rendering of sharepoint multiple people user field with a tooltip. However, I dont know how to iterate and then concatenate: Screenshot: Code: // List View - Substring Long String Sample // Muawiyah Shannak , @MuShannak (function () { // Create object that have the context information about the field that we want to change it's output render var projectTeamContext = {}; projectTeamContext.Templates = {}; projectTeamContext.Templates.Fields = { // Apply the new rendering for Body field on list view "Project_x0020_Team": { "View": ProjectTeamTemplate } }; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(projectTeamContext); })(); // This function provides the rendering logic function ProjectTeamTemplate(ctx) { var projectTeamValue = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; //newBodyvalue should have the list of all display names and it will be rendered as a tooltip automaticlaly return "&lt;span title='" + projectTeamValue + "'&gt;" + newBodyValue + "&lt;/span&gt;"; }
tagged with: javascript
tagged with: sharepoint

http://stackoverflow.com/q/26278000
has comment: http://stackoverflow.com/comment/41228412
has body: I have a page with header and footer div height set to 100px, and I made a simple jquery function that makes the central element change its height on browser resize, so that the page is always 100% of the viewport tall. //resize function resize_scroll_pane() { var dynamic_height = $(window).height() - ($(".navbar").outerHeight() + $(".footer").outerHeight()); $(".scroll-pane, .items, .items img").css("height",dynamic_height + "px"); } $(document).ready(function() { resize_scroll_pane(); $(window).bind('resize', resize_scroll_pane); }); It works like a charm in all browsers except in IE8. Can anyone help me figure out why? I'm using jquery 1.11.1 which should be IE8 compatible, and I also included html5shiv.min.js and respond.min.js to expand IE8's functionality.
has comment: http://stackoverflow.com/comment/41228997
tagged with: css
type: AnsweredQuestion
tagged with: internet-explorer-8
has title: jquery not properly executed in internet explorer 8
has comment: http://stackoverflow.com/comment/41228193
accepted answer: http://stackoverflow.com/a/26278155
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26278155
score: 0
has comment: http://stackoverflow.com/comment/41228393
has comment: http://stackoverflow.com/comment/41228247
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/26353683
downvote count: 1
type: Answer
has body: You can attach each color to a class name in your style rules and then add a particular class to your object to trigger the setting of the desired color. The class names would be defined in your CSS styles and then you just refer to them by string name in your javascript. CSS: .black {color: #000;} .greyDarker {color: #222;} Javascript: $('body').addClass('black'); You can also use the CSS color names built into the browser: $('body').css('color', 'black'); Here's a list of color names built in: http://www.crockford.com/wrrrld/color.html and http://www.cssportal.com/css3-color-names/, Other than something like this, if you want programmatic access to symbolic names for colors, then you will need to generate your own Javascript definitions for the names and include that in your javascript where you can use those symbols.
answers question: http://stackoverflow.com/q/26353372
has comment: http://stackoverflow.com/comment/41378998
has comment: http://stackoverflow.com/comment/41371890
has comment: http://stackoverflow.com/comment/41367027
has comment: http://stackoverflow.com/comment/41371816
has comment: http://stackoverflow.com/comment/41367006
upvote count: 1
score: 0

http://stackoverflow.com/comment/41158845
score: 0
comment on: http://stackoverflow.com/q/26239460
has text: @DavidThomas ..html render posted
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26274682
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26274512
score: 1
has body: You are probably looking for Element.getBoundingClientRect(). The returned value is a TextRectangle object, which contains read-only left, top, right and bottom properties describing the border-box in pixels. top and left are relative to the top-left of the viewport. For example, this is the result for question element on not scrolled page: document.querySelector("#question").getBoundingClientRect() { "height": 633, "width": 728, "left": 431.5, "bottom": 844, "right": 1159.5, "top": 211 } And a bit scrolled: { "height": 633, "width": 728, "left": 431.5, "bottom": 10, "right": 1159.5, "top": -623 }
upvote count: 1

http://stackoverflow.com/a/26286774
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26241377
type: Answer
has body: First of all, you should be able to bind popUp in similar way to Using GeoJSON with Leaflet tutorial. Something like this: var geoJsonLayer = L.geoJson(data, { onEachFeature: function(feature, layer) { layer.bindPopup(' Hello World! '); } }).addTo(map); How to further process your popUps depends on your usecase. Maybe this can be enough for you: geoJsonLayer.eachLayer(function(layer) { var popUp = layer._popup; // process popUp, maybe with popUp.setContent("something"); }); Hope this helps..
downvote count: 0

http://stackoverflow.com/a/55323900
upvote count: 3
answers question: http://stackoverflow.com/q/26264956
has comment: http://stackoverflow.com/comment/99127048
downvote count: 0
has comment: http://stackoverflow.com/comment/97714895
has body: A small improvement on the reduce usage: var arr = [ { key: 'foo', val: 'bar' }, { key: 'hello', val: 'world' } ]; var result = arr.reduce((map, obj) =&gt; ({ ...map, [obj.key] = obj.val }), {}); console.log(result); // { foo: 'bar', hello: 'world' }
type: Answer
score: 3

http://stackoverflow.com/comment/41199715
score: 1
comment on: http://stackoverflow.com/q/26262318
type: Comment
type: QuestionComment
has text: Workaround: `var B = A.slice().sort(randOrd)`

http://stackoverflow.com/a/26291349
downvote count: 1
type: Answer
has body: Your code block is looking for an item in the database with the _id of "query". That doesnt sound right to me based on common sense. loadItems: function(paginate) { return restAngular.all('query').**getList(paginate)**; }
answers question: http://stackoverflow.com/q/26291214
score: 0
upvote count: 1

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/26300832
tags question: http://stackoverflow.com/q/26323933
tags question: http://stackoverflow.com/q/26306745
tags question: http://stackoverflow.com/q/26309951
tags question: http://stackoverflow.com/q/26266459
tags question: http://stackoverflow.com/q/26332860
tags question: http://stackoverflow.com/q/26234820
tags question: http://stackoverflow.com/q/26287228
tags question: http://stackoverflow.com/q/26250556
tags question: http://stackoverflow.com/q/26351853
tags question: http://stackoverflow.com/q/26327532
tags question: http://stackoverflow.com/q/26339184

http://stackoverflow.com/q/26332019
has comment: http://stackoverflow.com/comment/41327973
tagged with: jquery
score: 1
tagged with: scroller
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26371872
has comment: http://stackoverflow.com/comment/41327879
has comment: http://stackoverflow.com/comment/41327769
has comment: http://stackoverflow.com/comment/41327737
has comment: http://stackoverflow.com/comment/41327745
tagged with: onclick
upvote count: 1
answer count: 1
has body: I want to change the effect (class) of my scroller to the effect on the button a user clicks. Here's my code: var scroller=$('#main ul.stroll'); --&gt; I know this is right.. just a var reference function effectSelect(e){ var target = $(e.currentTarget); $(target).click(function(){ var effectName=target.nodeValue; var effect='stroll ' + effectName; scroller.removeClass(); scroller.addClass(effect); }) } It worked at a certain point then suddenly stopped working. There are no errors in the console when I run it. What am I doing wrong? Let me know if you need more info
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41327709
has title: How to change a class to the nodeValue of the element? What am I doing wrong?
has comment: http://stackoverflow.com/comment/41327808
tagged with: button
downvote count: 0

http://stackoverflow.com/a/26266148
answers question: http://stackoverflow.com/q/26265808
score: 0
type: Answer
has body: As you step through the code you should be able to open the call stack panel to the right of the sources window and double click on the breakpoint you wish to jump to.

http://stackoverflow.com/comment/41348123
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26343071
has text: What browser(s) are you testing in?
score: 0

http://stackoverflow.com/comment/63538850
type: AnswerComment
type: Comment
has text: This work, but at a price. You lose the smooth scrolling.
score: 2
comment on: http://stackoverflow.com/a/33311860

http://stackoverflow.com/q/26267035
tagged with: vega
type: Question
tagged with: javascript
tagged with: vincent
tagged with: python-2.7
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has title: Vega javascript does not execute properly in django template
tagged with: django
has body: I am developing a website in django for which I need to display a map of the US states. I have a URL to return the JSON spec for the map (generated using vincent - http://wrobstory.github.io/2013/04/python-maps-choropleth.html) and a URL to return the us_states.topo.json to be used by the vega runtime (https://github.com/trifacta/vega/wiki/Runtime) to render the map. Both URLs are from the same DJango server and seem to work properly. Following are the URLs (for ease of understanding): JSON spec for map : http://localhost:8000/lydia2/Obama/20140211-20140410/heatmap.json us_states.topo.json : http://localhost:8000/lydia2/us_states.topo.json Following is the template: TextMap2: The Multilingual Entity Search Engine {% csrf_token %} Entity: Start Date: End Date: {% if entity %} {{entity}} {% endif %} {% if search_result %} {{ search_result }} {% endif %} {% if entity and start_date and end_date %} <image src="{% url 'lydia2:frequency' entity start_date end_date %}" /> {% endif %} As per the server logs, the function, "parse" does get invoked (there are GET calls to both the URLs), however the image of the map does not get rendered. Am I missing something here? PS: I tried this javascript separately on a different SimpleHttpServer and it works!
answer count: 0
downvote count: 0
score: 1

http://stackoverflow.com/a/26356301
has comment: http://stackoverflow.com/comment/41374337
type: AcceptedAnswer
upvote count: 34
has body: *[EDIT] This answer is the accepted one, however the response from João Angelo is way more detailed and should be considered. One remark though and because the security pratices evolved since Nov. 2016, the Option 2 should be implemented in favour of the Option 1. If you want to store them, you should use the localStorage or sessionStorage if available or cookies. You should also use the Authorization header, but instead of Basic scheme, use the Bearer one: curl -v -X POST -H "Authorization: Bearer YOUR_JWT_HERE" With JS, you could use the following code:
downvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/41374620
has comment: http://stackoverflow.com/comment/41392466
has comment: http://stackoverflow.com/comment/53288743
accepted answer of: http://stackoverflow.com/q/26340275
answers question: http://stackoverflow.com/q/26340275
has comment: http://stackoverflow.com/comment/57726538
has comment: http://stackoverflow.com/comment/41374499
score: 31
has comment: http://stackoverflow.com/comment/41374037
has comment: http://stackoverflow.com/comment/41372825
has comment: http://stackoverflow.com/comment/41385404

http://stackoverflow.com/comment/41195985
has text: oh well, glad you found the problem :)
type: Comment
comment on: http://stackoverflow.com/a/26257929
score: 0
type: AnswerComment

http://stackoverflow.com/a/26221516
has body: The trick to do routing in components is to not do routing in components. Instead, with something like can.route(":page/:id", {page: "content", id: "index"}); You pass can.route as a state object. With a main view like: rendered like can.view('main', { state: can.route }) your component then just checks those attributes: can.Component.extend({ tag: 'app-page', template: 'page', scope: { isBlog: function() { return this.attr('page') === 'blog'; }, isStatic: function() { return this.attr('page') === 'content'; } } }); With a view that initializes its child components:
score: 0
answers question: http://stackoverflow.com/q/26198403
type: Answer

http://stackoverflow.com/comment/41102533
type: Comment
has text: Looks good thanks, is it possible to add it in as a variable for reuse? eg I tried to replace name with a var called myName = "name"; see fiddle, but it doesn't return the results like you example does? http://jsfiddle.net/08qxxm50/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26209647

http://stackoverflow.com/q/26228568
has comment: http://stackoverflow.com/comment/41138223
has answer: http://stackoverflow.com/a/26228630
has body: I have a javascript that I want to load when the user has clicked two times on my website. I have no clue how to this. Any suggestions? Thanks!
favorite count: 0
accepted answer: http://stackoverflow.com/a/26228630
score: -3
has title: Load javascript after 2 clicks on website
type: AnsweredQuestion
downvote count: 3
type: Question
upvote count: 0
linked to: http://stackoverflow.com/q/8586446
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41251902
type: Comment
comment on: http://stackoverflow.com/q/26290566
score: 2
has text: Why oh why are you so greedy?
type: QuestionComment

http://stackoverflow.com/comment/41412888
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26316861
has text: Commenting trustkr's answer below: You do not need jQuery to check element heights. You can get the width & height of an element with Famo.us via `mySurface.getSize(true)` - The true-argument means to get the real size of the element, instead of the value set in properties.
type: AnswerComment

http://stackoverflow.com/comment/41362058
type: QuestionComment
comment on: http://stackoverflow.com/q/26347107
score: 0
has text: did you figure this out? was my example helpful? your further input is appreciated.
type: Comment

http://stackoverflow.com/q/26303597
downvote count: 0
tagged with: websocket
linked to: http://stackoverflow.com/q/14748440
has comment: http://stackoverflow.com/comment/41326803
favorite count: 0
has comment: http://stackoverflow.com/comment/41303756
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/26319208
type: AnsweredQuestion
has title: ngRepeat:dupes even with track by $index (special case)
type: Question
possible better answer: http://stackoverflow.com/a/26303689
has comment: http://stackoverflow.com/comment/41276051
has body: Brief background:- Am building a social networking site and am storing the statuses and users with MongoDB. So u have a status like this for example { "status" : "Hello world.", "profileURL" : "ac271a307", "comments" : [ ], "time" : "2013-10-28T22:25:24.278Z", "active" : true, "owner" : DBRef("users", "abc@efg.com"), // MongoDB Reference to the users Collection "_id" : ObjectId("526ee454da46f33bf8000002") } Now on angular am doing; &lt;li ng-repeat="status in statuses | isUserStatus track by status['_id']" ng-show="status.active" class="user-status-bland"&gt; // In here i display the users data and the status itself. &lt;/li&gt; Note: All this works perfect But here's is problem. Am using Websockets to automatically update and add the new statuses to $rootScope.statuses. socket.on('new status', function(status) { $timeout(function() { $rootScope.$apply(function() { // stack the new status at the top of all statuses. $rootScope.statuses.unshift(status); }); }, 0); }) Now if you do a console.log() of 'status' inside the websocket callback, i get the status and it appears twice. In a sense that the websocket was sent twice (of which i have no control over). So when this is put inside "$rootScope.statuses" thats when i get the error "Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys." It don't make sense because I am actually using $track by status['_id']
has answer: http://stackoverflow.com/a/26303689
tagged with: javascript
has answer: http://stackoverflow.com/a/26319208
answer count: 3
has answer: http://stackoverflow.com/a/31948310
score: 2

http://stackoverflow.com/comment/41203511
has text: Had not seen the edited answer. Thank you! I noticed you kept the first if statement, which did the same check that is done in the localStorage part of your solution now. Would it make sense to change that one to check wether the key exists? If the user comes from a site not defined in the array I want to avoid an "undefined" localStorage object.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26264012

http://stackoverflow.com/a/26250334
has body: If don't want/can't use a database, you can use a file to store the counter. Inside the file, you can simply store a number, and when the button is clicked, read the number from the file, increment the number by one and write the new number to the file.
score: 0
has comment: http://stackoverflow.com/comment/41178154
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26249933
accepted answer of: http://stackoverflow.com/q/26249933
has comment: http://stackoverflow.com/comment/41180160

http://stackoverflow.com/q/26273833
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41220881
has comment: http://stackoverflow.com/comment/41220961
has comment: http://stackoverflow.com/comment/99864806
tagged with: javascript
score: 13
has answer: http://stackoverflow.com/a/26273902
has answer: http://stackoverflow.com/a/60988018
tagged with: web
favorite count: 0
possible better answer: http://stackoverflow.com/a/26273930
tagged with: ajax
has answer: http://stackoverflow.com/a/26273930
accepted answer: http://stackoverflow.com/a/26273902
answer count: 4
has title: Console Error with Ajax: ReferenceError: $ is not defined
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2075337
has answer: http://stackoverflow.com/a/75946353
upvote count: 14
has comment: http://stackoverflow.com/comment/41220980
has body: i have a problem with a little script on my html page. It's just a function which should be called by an onclick method in an a tag. It dont works. Everytime i click on the link in the browser the console says "ReferenceError: $ is not defined" and points on the third line of the code below. &lt;script&gt; function del(urlToDelete) { $.ajax({ url: urlToDelete, type: 'DELETE', success: function(results) { location.reload(); } }); } &lt;/script&gt;

http://stackoverflow.com/a/26212902
downvote count: 1
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/41108317
type: Answer
has body: Use just ng-repeat not ng-repeat-start. {{car.name}} {{car.review}} {{car.rating}} {{car.fiveStarPercent}} {{car.recommended}} {{car.price}}
answers question: http://stackoverflow.com/q/26212639

http://stackoverflow.com/comment/41085679
has text: What exactly do you mean by _"users should not be able to see it or open it from outside"_? You can convert them to base64 and use Data URI scheme.
type: Comment
comment on: http://stackoverflow.com/q/26200787
score: 0
type: QuestionComment

http://stackoverflow.com/q/26308342
type: Question
accepted answer: http://stackoverflow.com/a/26312627
tagged with: treemodel
tagged with: tree
tagged with: performance
upvote count: 3
answer count: 1
tagged with: javascript
has title: merging two trees using treemodel.js
has answer: http://stackoverflow.com/a/26312627
type: AnsweredQuestion
score: 3
downvote count: 0
has body: example: http://jsfiddle.net/yeehawjared/bawv0790/ I'm building an app where a webpage opens, loading JSON of a large data tree structure. TreeModel.js parses this great and all is well. As time continues, the browser receives updates in the form of smaller data trees. I'm trying to wrap my head around combining the additionalData to the masterTree. I can't think of a way to simultaneously walk both and do a node-by-node comparison. If I could, it would be easy to aggregate node.model.x properties and add children if they don't exist. In the code below, I walk through the additional data - but I don't know how to efficiently combine new nodes to the masterTree. Can someone help my methodology with psuedo-code or point me in the right direction? What's the best way to continually update my masterTree? Many thanks. var tree = new TreeModel(); var masterTree = tree.parse(data1); var additionalData = tree.parse(data2); additionalData.walk(function (node) { // compare additionalData to the masterTree if (node.model.id == masterTree.model.id) { console.debug('match, combine the attributes') } else { // add the additional node to the materTree } });
favorite count: 0

http://stackoverflow.com/a/26318252
accepted answer of: http://stackoverflow.com/q/26318179
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26318179
has body: You can access the function with helpers[operation], just make sure that it's a valid function name first, otherwise you will get a TypeError exception. var result = helpers[operation](a, b);
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41181597
type: Comment
has text: I've put it inside the script tag, inside my tag. It's not working.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26252135

http://stackoverflow.com/comment/41323519
has text: yes i did. But its only transforming single slice. I want to transform all the slices of the pie.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26210672
type: AnswerComment

http://stackoverflow.com/comment/42449904
comment on: http://stackoverflow.com/a/26453611
has text: Hey, could you please take a look at this? http://stackoverflow.com/questions/26798580/fighting-touch-events-on-mobile-devices-highjacking-normal-scroll
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26208996
linked to: http://stackoverflow.com/q/21962641
type: Question
tagged with: this
answer count: 1
tagged with: javascript
has title: Why does calling a method with parenthesis, eg. (obj.func)(), still set `this`?
tagged with: scope
score: 0
duplicate of: http://stackoverflow.com/q/21962641
has answer: http://stackoverflow.com/a/26209015
accepted answer: http://stackoverflow.com/a/26209015
linked to: http://stackoverflow.com/q/25609927
has body: What exactly is the parsing rule in JS that results in the following: Let's say we have this function getThis = function(){ return this; } These all work as expected using the "previous dot" rule: getThis(); //=&gt; Window obj = {getThis: getThis}; obj.getThis(); //=&gt; obj getThisTwo = obj.getThis; getThisTwo(); //=&gt; Window However, this surprises me: (obj.getThis)() //=&gt; obj ...WAT My intuition would be that it would behave exactly like the 3rd example (getThisTwo). Ie, the part in parentheses is evaluated, which returns an anonymous function, which is then invoked. My expectation then is that this would be Window, not obj. Is this a special case, or is my understanding of how this is resolved faulty? (Edited to make the reason for my confusion clearer)
type: AnsweredQuestion

http://stackoverflow.com/a/26223202
has body: My friend if you code Javascript like this you will be writing it in Megabytes, please refer JSFiddle Fork: http://jsfiddle.net/sameersemna/p5yzLL18/ function hideAllPages(){ for(var i=1; i&lt;=5; i++){ document.getElementById("send"+i).style.visibility="hidden"; } } function switchPageForward() { if(current_page&lt;5){ current_page++; hideAllPages(); document.getElementById("send"+current_page).style.visibility="visible"; } } function switchPageBackward() { if(current_page&gt;1){ current_page--; hideAllPages(); document.getElementById("send"+current_page).style.visibility="visible"; } } hideAllPages(); var current_page = 0; switchPageForward();
upvote count: 2
has comment: http://stackoverflow.com/comment/41128021
answers question: http://stackoverflow.com/q/26222753
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41128098
accepted answer of: http://stackoverflow.com/q/26222753
type: Answer
score: 2

http://stackoverflow.com/comment/41471968
type: QuestionComment
has text: Those are just example of what I need. services and messages are at the same level than forums. history is related to archives because I want it to be.
comment on: http://stackoverflow.com/q/26306414
score: 0
type: Comment

http://stackoverflow.com/comment/41226597
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26270154
score: 0
has text: No, I'm wrong, but I have an answer, give me 5.

http://stackoverflow.com/comment/41242610
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26285461
has text: @charlietfl:I want to replace 's old content with new content that I've mention in another . Same is the case with . I don't want to replace 's content by or vice-versa.
score: 0

http://stackoverflow.com/q/26301585
type: AnsweredQuestion
downvote count: 9
has title: jQuery converted codes wont work
has comment: http://stackoverflow.com/comment/41271861
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26301668
tagged with: jquery
has body: Hi there I am trying to convert JavaScripts code to jQUery for better performance. Here's my JS codes: (function() { var body_container = document.body, content = document.querySelector( '.content-wrap' ), open_menu = document.getElementById( 'open-button' ), close_menu = document.getElementById( 'close-button' ), checkifOpen = false; function init() { initialize_process(); } function initialize_process() { open_menu.addEventListener( 'click', toggleMenu ); if( close_menu ) { close_menu.addEventListener( 'click', toggleMenu ); } // close the menu element if the target it´s not the menu element or one of its descendants.. content.addEventListener( 'click', function(ev) { var target = ev.target; if( checkifOpen &amp;&amp; target !== open_menu ) { toggleMenu(); } } ); } Now here's my converted jQuery version of this javascript: (function() { var body_container = $('body'), content = $( '.content-wrap' ), open_menu = $( '.open-button' ), close_menu = $( '.close-button' ), checkifOpen = false; function init() { initialize_process(); } function initialize_process() { open_menu.bind( 'click', toggleMenu ); if( close_menu ) { close_menu.bind( 'click', toggleMenu ); } // close the menu element if the target it´s not the menu element or one of its descendants.. content.bind( 'click', function(ev) { var target = ev.target; if( checkifOpen &amp;&amp; target !== open_menu ) { toggleMenu(); } } ); } For some reason this codes won't work. Just wondering where did I went wrong. Especially the part where I bind elements in replace with addEventListener function of JavaScript. Any help would be appreciated.
favorite count: 0
score: -8
upvote count: 1
has comment: http://stackoverflow.com/comment/41271793
has answer: http://stackoverflow.com/a/26301668
type: Question

http://stackoverflow.com/q/26344856
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26344941
has body: I need to get to dom element that created in ng repeat i have this code and i dont understand why i cant get the element. &lt;div&gt;&lt;/div&gt; &lt;ul&gt; &lt;li ng-repeat="data in data""&gt; {{data}} &lt;/li&gt; &lt;/ul&gt; &lt;script&gt; var thirdListItem = $('ul').find('li').first().text(); $('div').html(thirdListItem); &lt;/script&gt; here is plunker http://plnkr.co/edit/91S2esBo0uHzQHyEBuvj?p=preview
favorite count: 0
has comment: http://stackoverflow.com/comment/41351261
tagged with: angularjs
has title: get html element in ng-repeat angular js
has comment: http://stackoverflow.com/comment/41351260
has comment: http://stackoverflow.com/comment/41351434
type: AnsweredQuestion
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26344941
type: Question
has answer: http://stackoverflow.com/a/26344911
accepted answer: http://stackoverflow.com/a/26344911

http://stackoverflow.com/a/26305748
score: 1
accepted answer of: http://stackoverflow.com/q/26305556
answers question: http://stackoverflow.com/q/26305556
upvote count: 1
type: AcceptedAnswer
has body: What about using the Angular built-in validation, like this: Number Value: {{ numberError }}
type: Answer
downvote count: 0

http://stackoverflow.com/q/26339252
has comment: http://stackoverflow.com/comment/41340814
has comment: http://stackoverflow.com/comment/41340989
accepted answer: http://stackoverflow.com/a/26339282
type: AnsweredQuestion
has title: use of ternary operator in javascript
has comment: http://stackoverflow.com/comment/41340914
downvote count: 1
type: Question
has body: I know basic use of '?' ternary operator. window.URL should be expression, which should return true or false. But in this case, it is returning a string. how this expression is evaluated. var createSrc = window.URL ? window.URL.createObjectURL : function(stream) {return stream;};
upvote count: 0
answer count: 1
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26339282
tagged with: operators
favorite count: 0

http://stackoverflow.com/a/26203270
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41090035
has body: You're instantiating a new controller that has a new scope (and thus a new variable n). You need to keep the iteration data in something more persistant, like a parent scope, service, localStorage, etc (depends what you need the data for). Here's a working example using $rootScope, just so you can see (you should probably use something other than the $rootScope in your final code): http://plnkr.co/edit/HETROBPwa6VyjX83Eev0?p=preview I added a simple console.log('scope', $scope); in the controller, so you can see that each time you change the url, a new scope is created.
accepted answer of: http://stackoverflow.com/q/26203146
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26203146
score: 1
has comment: http://stackoverflow.com/comment/41090014

http://stackoverflow.com/comment/41082217
type: QuestionComment
comment on: http://stackoverflow.com/q/26198813
score: 0
has text: Just a tip: don't but simple or help in the title. It bloats the title with unnecessary words and doesn't help people searching afterwards.
type: Comment

http://stackoverflow.com/a/26212084
has body: A better solution would be to have only one regex, so that you don't have to iterate. And using the i flag lets you avoid the toLowerCase : if (!/chrome|opera/i.test(navigator.userAgent)) return;
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41107102
answers question: http://stackoverflow.com/q/26212065
has comment: http://stackoverflow.com/comment/41107172
score: 2
upvote count: 2

http://stackoverflow.com/comment/41289455
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26301595
has text: Well, in that case, check your `Content-Disposition` header value. If it has a `filename` parameter in it, then you need to extract that. FWIW [this function](https://github.com/mscdex/busboy/blob/3a24ac52aa02433f0f44b2a5954fd4e3e3ee3079/lib/utils.js#L7-L91) is what the `busboy` module uses to parse those kinds of header values.

http://stackoverflow.com/a/26328029
type: Answer
answers question: http://stackoverflow.com/q/26327951
score: 0
has body: Watch out, your name selector question doesn't needed quote (string interpretation). var x = document.getElementsByName(question); instead of var x = document.getElementsByName('question');

http://stackoverflow.com/comment/85807852
comment on: http://stackoverflow.com/a/49402943
type: Comment
has text: This question states that all `console` calls are removed by the asker's build process, so none of the above would help them.
score: 3
type: AnswerComment

http://stackoverflow.com/comment/41255597
has text: Hi! Sorry, but this question is much too unspecific to be answerable. Which one exactly is the "latest" version of your FF? What do you do to "download the PDF"? What error messages do you get? Do you have any code to show us how you are using jspdf?
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26249646

http://stackoverflow.com/q/26212764
favorite count: 0
has body: I have an xml file in my local system(not on a server). I want to access it with javascript to parse it,how can i do it? I tried giving the local file location. if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } xmlhttp.open("GET","C:\Users\amit.m2\Desktop\metrics.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML;
answer count: 1
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41109302
downvote count: 2
linked to: http://stackoverflow.com/q/10780948
duplicate of: http://stackoverflow.com/q/10780948
has title: Accessing xml file in local system
has comment: http://stackoverflow.com/comment/41109774
has comment: http://stackoverflow.com/comment/41109490
type: Question
tagged with: xml-parsing
has comment: http://stackoverflow.com/comment/41109793
upvote count: 0
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26212940

http://stackoverflow.com/comment/41202634
type: Comment
score: 0
has text: Hmmm, from the looks of it the server configs look like something which would be put into an `httpd.conf` Have you ever configured a SPA to work with `$location`
comment on: http://stackoverflow.com/a/26259312
type: AnswerComment

http://stackoverflow.com/comment/41241622
type: QuestionComment
comment on: http://stackoverflow.com/q/26284815
has text: Are you getting any errors in the F12 console? Have you added polyfills for methods you may be using in your controllers such as `[].forEach`? have you removed all of the `console.*` calls from your code?
score: 0
type: Comment

content-length
type: Tag
tags question: http://stackoverflow.com/q/26345522
tag name: content-length

http://stackoverflow.com/comment/41348662
type: QuestionComment
comment on: http://stackoverflow.com/q/26343363
has text: what are you trying to achive? To fadeout when hit backspace?
score: 0
type: Comment

http://stackoverflow.com/comment/43392424
type: Comment
has text: @Sampath multi items means you need to use ng-repeat to generate multiple block inside each slide. your show case can be supported by this directive
comment on: http://stackoverflow.com/a/26386158
score: 1
type: AnswerComment

http://stackoverflow.com/a/26323698
answers question: http://stackoverflow.com/q/26323667
upvote count: 1
type: AcceptedAnswer
has body: Assuming your starting point is id="view" you are more than 2 levels deep to find .fff: $('#view &gt; div:first &gt; div &gt; div:not(.fff)').remove() if you don't want the first top level div remove first or use eq(n) to target specific children. JSFiddle: http://jsfiddle.net/TrueBlueAussie/cn5xxjne/
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26323667

http://stackoverflow.com/comment/41161128
comment on: http://stackoverflow.com/q/26241088
has text: In your html code does not appear any a tag or tab-links class!
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26230485
has answer: http://stackoverflow.com/a/26230781
tagged with: javascript
has body: I am writing a small C# application to manage our Safety data Sheets (of chemicals) from our suppliers. At the moment I manually search for the chemical and save the pdf and add a link to the pdf in my program. The problem is I still have many chemical to go so it would be better to automate the process. For example: A chemical has the following part number: 271004 The link containing the pdf is here: Link I have been reading the page source but cannot find a link to the pdf But my knowledge of html/javascript is to limited at the moment..... Is there any way to extract the pdf from the website? Thanks in advance for any advice :)
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26232668
favorite count: 0
has answer: http://stackoverflow.com/a/58648765
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41141817
tagged with: http://stackoverflow.com/tag/html
tagged with: webclient
tagged with: c#-4.0
type: Question
tagged with: c#
has title: Save embedded pdf from website
score: 5
upvote count: 5

http://stackoverflow.com/q/26233547
tagged with: php
score: 1
has comment: http://stackoverflow.com/comment/41146570
type: Question
downvote count: 0
tagged with: bootstrap-modal
tagged with: javascript
has body: this is my bootstrap modal code x Add Question <input type="button" onClick="aj_add_question(<?=$id?>);" class="btn btn-primary" id="add_button" name="Add" value="Add Question"> cancel cancel now onclick Add Question i have to close current popup then i have written code it will hide but get screen black
has title: How to close the modal popup?
has answer: http://stackoverflow.com/a/26233884
has comment: http://stackoverflow.com/comment/41146544
has comment: http://stackoverflow.com/comment/138574285
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41146782
upvote count: 1

http://stackoverflow.com/comment/41161496
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26241365
score: 0
has text: The answer to this question clarifies it for you. http://stackoverflow.com/questions/10896854/simple-html-post-without-any-server-scripting-can-be-done-using-js If you are not using a server side language you'll need to use GET and javascript. I don't believe you can read header data without a server side scripting language.

http://stackoverflow.com/a/26302416
upvote count: 1
answers question: http://stackoverflow.com/q/26284685
has comment: http://stackoverflow.com/comment/41278520
has comment: http://stackoverflow.com/comment/41276114
has comment: http://stackoverflow.com/comment/41276879
has comment: http://stackoverflow.com/comment/41276977
type: Answer
has comment: http://stackoverflow.com/comment/41397067
has comment: http://stackoverflow.com/comment/41278101
has body: Here is the working code for GridX. GridX testing
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41278416
has comment: http://stackoverflow.com/comment/41275431
has comment: http://stackoverflow.com/comment/41275395

http://stackoverflow.com/q/26293913
score: 1
has body: I am working on a system that uses the Leaflet API for creating a map that shows data. I can put a control bar on the map, that allows me to interact with the map. The content of this control bar is HTML. Now, my question: Should I build the HTML of this control bar in the JavaScript I send to the client, or should I call the control bar with an AJAX call from my ASP.NET controller? Some pros and cons of each approach: If I build the control bar in JavaScript, my JS file will become messier, with lots of HTML. Putting the control bar in an ASP.NET page would decouple the HTML and JavaScript, which seems like a positive thing to me. It would save the server one request, as the code to create the control bar is already sent along with the JS files. Putting it in an ASP.NET page means the JS file is smaller, but the application needs to make an extra call to the server to obtain the control bar. There are no situations where there's no control bar on the map, so the call to the server would always have to be made if I store the HTML in an ASP.NET page. Has anybody had to deal with this issue in the past, and how did you handle it?
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26295887
upvote count: 2
has comment: http://stackoverflow.com/comment/41262925
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41257673
has answer: http://stackoverflow.com/a/26295887
tagged with: asp.net
favorite count: 0
linked to: http://stackoverflow.com/q/6192268
tagged with: design-patterns
type: AnsweredQuestion
has title: Should you put HTML code in your JavaScript or call it from the server?

http://stackoverflow.com/q/26207205
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26207357
score: 1
type: Question
has answer: http://stackoverflow.com/a/26207357
tagged with: javascript
has comment: http://stackoverflow.com/comment/41097666
upvote count: 2
answer count: 1
downvote count: 1
has title: Reverse Engineering AngularJS dependency Injection
favorite count: 0
tagged with: angularjs
has body: I have learned in past about AngularJS dependency injection and it does it by calling the toString on the controller and then parsing the arguments and then calling the function with dependent arguments i.e $scope, $http, $location and so on.. I've searched for the implementation of this and didnot find any understandable or actual smaller implementation to this. So if someone can explain this using a very simple implementation(pure JS) that would be helpful for all app.controller("MainCtrl", function($scope) { //Here the $scope is dependency injected and would'nt work if some another variable name was used. });
has comment: http://stackoverflow.com/comment/41804852

http://stackoverflow.com/comment/41245768
type: Comment
type: QuestionComment
has text: yes, correct. The original budget is the revised contract x .85
score: 0
comment on: http://stackoverflow.com/q/26286416

http://stackoverflow.com/comment/41135201
type: QuestionComment
type: Comment
has text: Do `console.log(data);` in your `$http.get()` and provide your output
comment on: http://stackoverflow.com/q/26226897
score: 0

http://stackoverflow.com/comment/41286433
has text: You can't really judge anything from one execution. Make a JSPerf test with thousands of cycles. http://jsperf.com/
type: AnswerComment
score: 2
type: Comment
comment on: http://stackoverflow.com/a/26309229

http://stackoverflow.com/a/26334913
score: 0
has comment: http://stackoverflow.com/comment/41537977
type: AcceptedAnswer
type: Answer
has body: You can use javascript for this $("html, body").animate({ scrollTop: 0 }, "slow");
accepted answer of: http://stackoverflow.com/q/26334869
answers question: http://stackoverflow.com/q/26334869

http://stackoverflow.com/q/26222511
score: 1
has answer: http://stackoverflow.com/a/26223085
accepted answer: http://stackoverflow.com/a/26223085
type: Question
tagged with: javascript
has title: Getting scope value in child directive
upvote count: 1
has body: I am using the Typeahead directive from the UI Bootstrap framework. I am using this directive inside of another directive. My outer directive is defined like this: .directive('myDirective', function () { return { restrict:'E', transclude: true, scope: { showLinks: '=?', query: '=' }, templateUrl: '/directives/my-directive.html', controller: function ($scope) { if (angular.isUndefined($scope.showLinks)) { $scope.showLinks = true; console.log('show links? ' + $scope.showLinks); } } }; }); my-directive.html looks like this: &lt;div style="width:100%;"&gt; &lt;span&gt;{{showLinks}}&lt;/span&gt; &lt;!-- renders just fine --&gt; &lt;input type="text" autofocus autocomplete="off" class="form-control" ng-model="query" typeahead="option as option.Name for option in getLocation($viewValue)" typeahead-min-length="3" typeahead-template-url="location.html" /&gt; &lt;script type="text/ng-template" id="location.html"&gt; {{showLinks}} &lt;!-- Never renders --&gt; &lt;span bind-html-unsafe="match.label | typeaheadHighlight:query"&gt;&lt;/span&gt; &lt;/script&gt; &lt;/div&gt; I'm calling my directive like this: &lt;my-directive show-links="true" /&gt; I need to use the value of showLinks inside of the template I'm using for the typeahead. For some reason though, it is not beings passed into the template. I believe it has something to do with scoping. I've come to this conclusion by binding the value into the UI as shown above. The value for showLinks appears just fine in my template. However, it does not appear in the template of the typeahead instance in my directive. What am I doing wrong? I feel like I am so close. Yet, I've been working on this all day. Thank you for any help you can provide!
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41126596
type: AnsweredQuestion

http://stackoverflow.com/comment/41150664
has text: In addition to #3 you can also add a timeout function that will only start searching after X ms without a key press.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26235657
type: Comment

http://stackoverflow.com/comment/41542421
type: Comment
has text: @gman You're still not understanding my question. The idea was to get an understanding on the conventions on loading arbitrary 1D data to the GPU. From what I have read (what what your post confirms), is that the standard way is to load the data into a texture and set it's type to LUMINANCE (for 1D data). Frankly, if you do not come from a background of GPU computing, that sounds utterly absurd as the data may not actually be a texture, nor be anything to do with the luminance. I was hoping there was a more generic method, maybe with more generic naming conventions, but this will do.
comment on: http://stackoverflow.com/a/26322754
type: AnswerComment
score: 0

http://stackoverflow.com/q/26302991
has comment: http://stackoverflow.com/comment/41275205
has comment: http://stackoverflow.com/comment/41274571
tagged with: razor
has body: I have an ASP.NET MVC app that uses Razor in the views. I'm building a JavaScript array in my controller. Sometimes though, it will not exist. For that reason, I want to initialize it on the client-side. In an attempt to do that, I have the following: var list = '@(ViewBag.List == null ? [] : ViewBag.List)'; Unfortunately, that generates an error. The error is: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1525: Invalid expression term '[' Is there a way for me to use the ternary operator with arrays in razor? If so, how?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41274558
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/26303060
accepted answer: http://stackoverflow.com/a/26303060
score: 0
answer count: 1
has title: Initializing a JavaScript array in Razor
has comment: http://stackoverflow.com/comment/41275039

http://stackoverflow.com/a/26295711
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26295665
has body: To loop you can use .each() $(".className").each(function(){}); And to get the total number you just have to use the property length. var numOfDiv = $(".className").length;

http://stackoverflow.com/comment/41241441
comment on: http://stackoverflow.com/a/26284036
has text: I was able to set the idProperty like this: gridStore = new Memory({ data: GridData, idProperty:"ID" });
score: 0
type: AnswerComment
type: Comment

service
tags question: http://stackoverflow.com/q/26338000
tag name: service
tags question: http://stackoverflow.com/q/26265021
type: Tag

performance
tags question: http://stackoverflow.com/q/26343724
tags question: http://stackoverflow.com/q/26266578
tags question: http://stackoverflow.com/q/26293798
tags question: http://stackoverflow.com/q/26214560
tags question: http://stackoverflow.com/q/26348613
tags question: http://stackoverflow.com/q/26325608
tags question: http://stackoverflow.com/q/26258783
tags question: http://stackoverflow.com/q/26281464
tags question: http://stackoverflow.com/q/26264159
tags question: http://stackoverflow.com/q/26258950
tags question: http://stackoverflow.com/q/26287928
tags question: http://stackoverflow.com/q/26253085
tags question: http://stackoverflow.com/q/26307820
tag name: performance
tags question: http://stackoverflow.com/q/26239166
tags question: http://stackoverflow.com/q/26339184
tags question: http://stackoverflow.com/q/26237814
type: Tag
tags question: http://stackoverflow.com/q/26308342
tags question: http://stackoverflow.com/q/26225678

http://stackoverflow.com/comment/41213024
score: 0
type: QuestionComment
has text: @Andbdrew good point. Thanks for the tip.
type: Comment
comment on: http://stackoverflow.com/q/26269211

http://stackoverflow.com/comment/41146729
type: AnswerComment
score: 0
has text: Are you serving them with the correct mime type? image/svg+xml if so posting the files is the only way forward
type: Comment
comment on: http://stackoverflow.com/a/26233313

http://stackoverflow.com/comment/41310166
score: 0
has text: What you're talking about doing is exactly what I was explaining LinkedIn does - they're using the same JSON and same Dust templates client and server. Browsers render client-side for users. Servers render server-side for bots.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26319434

http://stackoverflow.com/comment/44896553
type: Comment
comment on: http://stackoverflow.com/a/28234998
score: 0
type: AnswerComment
has text: thanks for you reply. This is a bit old post, I did use 'as' syntax now. But i still not clear about the directive inheritance. Will update the code later.

http://stackoverflow.com/comment/41309058
comment on: http://stackoverflow.com/q/26321914
score: 0
type: Comment
has text: Encode it as JSON. [Pass a PHP string to a JavaScript variable (and escape newlines)](http://stackoverflow.com/questions/168214/pass-a-php-string-to-a-javascript-variable-and-escape-newlines)
type: QuestionComment

http://stackoverflow.com/comment/41298249
type: QuestionComment
comment on: http://stackoverflow.com/q/26316042
score: 0
has text: Sometimes it works, sometimes it won't on mobile. Just deployed a version to heroku to test -> http://stepcounting.herokuapp.com
type: Comment

http://stackoverflow.com/a/28789580
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26332267
upvote count: 1
has body: I have experienced the same issue and also suspected the body-parser module on the nodejs server side. In my case, the problem was on the JSON generation side. I used to send my arguments (straight javascript objects) as data without specifying the content type. I changed the initial: registerHandlers($.ajax({ 'url': "/api/" + name, 'type': 'POST', 'data': args }), name, onSuccess, onFailure, onError); by the following: registerHandlers($.ajax({ 'url': "/api/" + name, 'type': 'POST', 'data': JSON.stringify(args), 'contentType': 'application/json' }), name, onSuccess, onFailure, onError); and then the JSON was retrieved just fine on the other end.
type: Answer

http://stackoverflow.com/comment/41117818
type: QuestionComment
score: 0
has text: thanks @MohitArora but i found an ember solution to this
comment on: http://stackoverflow.com/q/26215958
type: Comment

http://stackoverflow.com/comment/41253597
comment on: http://stackoverflow.com/q/26291197
score: 0
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62791/discussion-between-phplover-and-arun-p-johny).
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26326672
has comment: http://stackoverflow.com/comment/41317462
has title: Check input for format and values
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26326890
tagged with: javascript
has comment: http://stackoverflow.com/comment/41318779
type: Question
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26326890
has body: I need to check, if the content of an input field match to a given format like 'd (d-d)' and the values are correct Valid inputs would be: 13 (11-14) 13 (13-13) The values in the bracket gives a range, so the first value in the range should be lower or equal the second value the value before the bracket is equal to the first and second value or it is IN the range My attempt: $subject = "3 (1-4)"; $pattern = '/^([0-9])\(([0-9]\-[0-9]?)\)$/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE); $first = $matches[1][0]; $second = $matches[2][0]; // check if first &lt;= second... But there are a lot of mistakes.
tagged with: regex
has comment: http://stackoverflow.com/comment/41317417
has comment: http://stackoverflow.com/comment/41317399

http://stackoverflow.com/a/26305983
answers question: http://stackoverflow.com/q/26303655
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26303655
has body: It's documented here by w3c. In detail here for the object tag that you can't do cross domain access to the data of a &lt;object&gt; tag except via CORS. There's a more readable distillation on MDN and to get round it you need to enable CORS on the remote site (if you can).

http://stackoverflow.com/q/26203613
has body: I found some questions and examples, but they all use $scope, so far I am not using $scope in my application. I am trying to execute a controller function when a checkbox in a directive gets selected (ng-change). JSFiddle HTML &lt;div ng-app="myApp" ng-controller="Controller as ctrl"&gt; &lt;dir-select doIt="ctrl.doIt()" object="ctrl.object"&gt; &lt;/div&gt; Controller and Directive var app = angular.module('myApp', []); app.controller("Controller",[ function() { var ctrl = this; ctrl.object = { name: "test", selected: false }; ctrl.doIt = function() { alert("Doing It!"); }; }]); app.directive('dirSelect', function() { return { restrict: 'E', template: '&lt;input type="checkbox" ng-model="object.selected" ng-change="doIt()"&gt;select', scope: { object: '=', doIt: '&amp;' } } }); What am I missing?
has answer: http://stackoverflow.com/a/26203661
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26204032
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/26204032
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26203665
type: AnsweredQuestion
score: 2
has title: Controller function after ngChange event in directive
downvote count: 0
accepted answer: http://stackoverflow.com/a/26203661
type: Question

http://stackoverflow.com/comment/41164008
comment on: http://stackoverflow.com/a/26242643
type: AnswerComment
type: Comment
score: 2
has text: To clarify: what documentation meant was "content scripts from different extensions are isolated".

http://stackoverflow.com/a/26302550
has body: The {{ and }} braces allow you to inject an Angular expression inside HTML. outside {{ my_expression }} outside ^^^^^^^^ In the above the text inside the {{...}} will be converted to an Angular expression. outside {{ my_expression }} outside ^^^^^ ^^^^^ In the above the text outside the {{...}} will remain unchanged. You can also use the ngBind directive to assign the result of an expression to the body of a DOM element. https://docs.angularjs.org/api/ng/directive/ngBind To show the value of varB.status just write varA.count > 1 ? varB.status : '' like this. {{varA.count > 1 ? varB.status : ''}} Alternatively, the above can be shorten to just this. {{varA.count > 1 && varB.status}} 1 && varB.status"> Or you could make the optional. 1">{{varB.status}}
score: 0
has comment: http://stackoverflow.com/comment/41273840
type: Answer
has comment: http://stackoverflow.com/comment/41273684
has comment: http://stackoverflow.com/comment/41273671
has comment: http://stackoverflow.com/comment/41273857
has comment: http://stackoverflow.com/comment/41273701
answers question: http://stackoverflow.com/q/26302403
has comment: http://stackoverflow.com/comment/41273761

http://stackoverflow.com/q/26310813
favorite count: 0
has comment: http://stackoverflow.com/comment/41289344
has title: Securing API Token, is making it a var in my index.js possible?
has body: So I have built a html form to interact with Slack. Currently my js code looks like this. $("#submitemail").click(function(){ $.post( "https://openpgh.slack.com/services/hooks/incoming-webhook?token=MY_SECRET_TOKEN", JSON.stringify({'text':'invite request from: '+$("#email").val(),'username':'Slack Inviter','icon_emoji':':raising_hand:'}) ).success(function(){ $("#email").val(""); }); }); if anyone were to just copy this right out of my html file they could just run a console command and change the JSON and bombard my slack group with massive amounts of nonsense until they hit the API call limit. What I am wondering is if I could store this in my index.js (I am using a node.js template) as a var and then call it in the html. Any options or advice is greatly appreciated I am very new to this. My structure is: Slack App |_node_modules | |_express |_public | |_index.html | |_node.svg (idk what this does) |_.gitignore |_app.json |_index.js |_package.json |_procfile |_README.md the code for my index.js is just var express = require('express'); var app = express(); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')) }); I can throw in my full html if you want its just a basic modal w/ a button to click to execute the form and pull the email.
accepted answer: http://stackoverflow.com/a/26311404
has comment: http://stackoverflow.com/comment/41289521
upvote count: 1
has comment: http://stackoverflow.com/comment/41289611
tagged with: node.js
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41288871
has comment: http://stackoverflow.com/comment/41288915
type: Question
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41289518
tagged with: javascript
has answer: http://stackoverflow.com/a/26311404
has comment: http://stackoverflow.com/comment/41289413
has comment: http://stackoverflow.com/comment/41289497
has comment: http://stackoverflow.com/comment/41289592

http://stackoverflow.com/q/26233127
has title: Long polling PHP returns 2 results instead of one
favorite count: 0
has answer: http://stackoverflow.com/a/26359273
tagged with: ajax
has answer: http://stackoverflow.com/a/26709173
accepted answer: http://stackoverflow.com/a/26686256
has answer: http://stackoverflow.com/a/26387331
has answer: http://stackoverflow.com/a/26403903
has answer: http://stackoverflow.com/a/26707679
possible better answer: http://stackoverflow.com/a/26359339
has comment: http://stackoverflow.com/comment/41299274
has comment: http://stackoverflow.com/comment/41415751
has answer: http://stackoverflow.com/a/26359339
answer count: 12
has comment: http://stackoverflow.com/comment/41285354
score: 13
has comment: http://stackoverflow.com/comment/41146170
tagged with: php
tagged with: long-polling
has answer: http://stackoverflow.com/a/26770895
has comment: http://stackoverflow.com/comment/42662309
upvote count: 13
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41146084
has answer: http://stackoverflow.com/a/26395274
has comment: http://stackoverflow.com/comment/41146597
has body: I'm trying to create a Posting System just like Facebook. So I did a little bit research about how Facebook does it, Facebook uses long polling، So I searched around on how to implement it, I implement it. And I finally finished it, I opened both Firefox and Chrome to test it out. After 2 or 3 posts it worked, but then it will duplicate the results. As you can see below: It's the first post by the way. And here is my network tab, During that process: It makes 3 requests instead of one. And finally here is my code: init.js that contains all of my JavaScript code function getNewPosts(timestamp) { var t; $.ajax({ url: 'stream.php', data: 'timestamp=' + timestamp, dataType: 'JSON', }) .done(function(data) { clearInterval( t ); // If there was results or no results // In both cases we start another AJAX request for long polling after 1 second if (data.message_content == 'results' || data.message_content == 'no-results') { t = setTimeout( function() { getNewPosts(data.timestamp); }, 1000); // If there was results we will append it to the post div if (data.message_content == 'results') { // Loop through each post and output it to the screen $.each(data.posts, function(index, val) { $("&lt;div class='post'&gt;" + val.post_content + "&lt;div class='post_datePosted'&gt;"+ val.posted_date +"&lt;/div&gt; &lt;br&gt;" + "&lt;/div&gt;").prependTo('.posts'); }); } } }) } $(document).ready(function(){ // Start the autosize function $('textarea').autosize(); // Create an AJAX request to the server for the first time to get the posts $.ajax({ async: false, url: 'stream.php?full_page_reload=1', type: 'GET', dataType: 'JSON', }) .done(function(data) { // Assign the this variable to the server timestamp // that was given by the PHP script serverTimestamp = data.timestamp; $.each(data.posts, function(index, val) { $("&lt;div class='post'&gt;" + val.post_content + "&lt;div class='post_datePosted'&gt;"+ val.posted_date +"&lt;/div&gt;" + "&lt;/div&gt;").prependTo('.posts'); }); }) .fail(func…
has answer: http://stackoverflow.com/a/26686256
has answer: http://stackoverflow.com/a/27075402
has comment: http://stackoverflow.com/comment/41146218
has comment: http://stackoverflow.com/comment/41167152
type: Question
has comment: http://stackoverflow.com/comment/41145952
has comment: http://stackoverflow.com/comment/41155371
has comment: http://stackoverflow.com/comment/41146400
downvote count: 0
has answer: http://stackoverflow.com/a/26389720
has answer: http://stackoverflow.com/a/26286080
has comment: http://stackoverflow.com/comment/41358399
tagged with: javascript
has comment: http://stackoverflow.com/comment/41146741

http://stackoverflow.com/comment/41274997
type: QuestionComment
has text: It looks like you're doing things in the reversed order.
comment on: http://stackoverflow.com/q/26302879
score: 0
type: Comment

http://stackoverflow.com/q/26321056
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26321214
has comment: http://stackoverflow.com/comment/41307337
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41414767
has comment: http://stackoverflow.com/comment/41307412
tagged with: javascript
has comment: http://stackoverflow.com/comment/41307365
score: 0
has comment: http://stackoverflow.com/comment/41420314
answer count: 3
has answer: http://stackoverflow.com/a/26321237
has body: I want to access to the caller element within a function, with something like: // Script &lt;script type="text/javascript"&gt; window.onload = function() { var field = document.getElementById("myfield"); field.onkeyup = change(field); function change(x) { if (x.value == "") { x.value = "No value"; } } } &lt;/script&gt; // Body &lt;input id="myfield" type="text"&gt; This doesn't work. And I don't want to give onkeyup methods to every single element, I want to register them programmatically. Any solutions ?
favorite count: 0
has title: Reference to the caller element in JavaScript
has answer: http://stackoverflow.com/a/26383046

http://stackoverflow.com/q/26275899
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26276117
score: 0
has body: I have a dropdown from which i can select two values and the corresponding values are displayed but instead of the data i want to display a data which is inside a div tag. Here is Fiddle Demo HTML: $scope.list_category: {{list_category}} JS: var app = angular.module('app', []); function Ctrl($scope) { $scope.list_categories = { data: [{ id: 'id1', name: 'name1' }, { id: 'id2', name: 'name2' }] }; $scope.list_category = 'id1'; }
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Changing the data based on the value selected through dropdown box in angularJS
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/26233101
tagged with: wireless
type: Question
possible better answer: http://stackoverflow.com/a/55276422
score: 3
has answer: http://stackoverflow.com/a/55276422
has body: I working on creating a Linux Digital signage Box, which my clients can buy, and choose what to show on it. At the moment, it boot up in Firefox, check if it have internet, query my server and get a unique URL which Firefox change to. If it don't have any internet connection, i show a page "You dont have internet, please connect a ethernet cable or connect to WIFI." That my question, what will be the best way to allow my client to connect a Wireless hotspot from Firefox? At the moment my idea is: I add a "Connect wireless" button, which with some javascript call a php script, which SSH to the BOX (localhost), and use connmanctl to first, find all WIFI hotspot and if they reguire password. The Javascript then show this, and SSH again to connect and so on.. Do you know a opensource system, which do that? or a better way to do it?
tagged with: javascript
upvote count: 4
has answer: http://stackoverflow.com/a/26233780
answer count: 2
tagged with: wifi
accepted answer: http://stackoverflow.com/a/26233780
favorite count: 0
tagged with: linux
has comment: http://stackoverflow.com/comment/41145963
tagged with: php
type: AnsweredQuestion
has title: How to connect to WIFI from a browser with Javascript and PHP?
downvote count: 1

http://stackoverflow.com/a/26261596
answers question: http://stackoverflow.com/q/26261257
has comment: http://stackoverflow.com/comment/41202616
has comment: http://stackoverflow.com/comment/41200176
accepted answer of: http://stackoverflow.com/q/26261257
type: Answer
has comment: http://stackoverflow.com/comment/41198986
has comment: http://stackoverflow.com/comment/41198662
has comment: http://stackoverflow.com/comment/41202026
has comment: http://stackoverflow.com/comment/41199273
has body: So based on the comments below, I think I should update my answer. You wanted to ignore a default click and allow a modal to show up using the right click instead. In order for that to happen, you need to block all of the things that a default click would do using preventDefault() and stopPropagation() $("[data-toggle='modal']").click(function (e) { e.preventDefault(); e.stopPropagation(); }); After that you want to bind the modal opening function to the right click event, but don't show the context menu. $("[data-toggle='modal']").on("contextmenu", function(e) { e.preventDefault(); // don't show the context menu $("#changeTime").modal("show"); // show the modal window }) Here's a CodePen of it working
upvote count: 1
has comment: http://stackoverflow.com/comment/41201767
has comment: http://stackoverflow.com/comment/41198439
has comment: http://stackoverflow.com/comment/41199878
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41198893
downvote count: 0

http://stackoverflow.com/a/26208738
type: Answer
has comment: http://stackoverflow.com/comment/41100912
has comment: http://stackoverflow.com/comment/41100401
answers question: http://stackoverflow.com/q/26208716
has body: Try this: image here small images and medium size text content here
score: 0
has comment: http://stackoverflow.com/comment/41100872

http://stackoverflow.com/comment/41294190
has text: So you like when the elements animates all the way till the predefined end position even if the mouse has left? (The most desirable solution in most environments out in the wild is actually the behavior that does the yellow one (using `.stop()`)) which stops the animation if the element looses hover and from that position returns it to it's original position. Which is doable in CSS alone. Just saying.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26313714
score: 0

http://stackoverflow.com/a/26310414
has body: The proper condition would be while (gender !== 'boy' &amp;&amp; gender !== 'girl'){ That's because ("boy" || "girl") will always end up as "boy", therefore the while will look like while(gender !== 'boy'). The || in this case is called a "default" operator, a clever use of the logical OR . If the value on the left side is truthy, it will use the left side value. Otherwise, it will evaluate (hence "default") the right side.
has comment: http://stackoverflow.com/comment/41288272
accepted answer of: http://stackoverflow.com/q/26310398
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26310398
type: Answer

http://stackoverflow.com/comment/41332198
type: Comment
comment on: http://stackoverflow.com/a/26327746
has text: Yes, this is the cause of the problem thanks
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41320100
type: Comment
score: 0
type: AnswerComment
has text: Ok I did that. `arguments.length` was always 46, and `arguments[i]` was each page of HTML that corresponded to which `i` it was on. Oh sweet it worked after I made it `arguments[i][0]`. That's awesome. It's just a lot slower than the code I had before, but at least all the links are in order.
comment on: http://stackoverflow.com/a/26322966

http://stackoverflow.com/a/26260023
answers question: http://stackoverflow.com/q/26259943
type: Answer
score: 0
has body: Looks like in your anchor tag you have not given it a class. Next You then go on in your JQuery code to add a click function to a class which does not exist. $('.pag-next').on('click',function() Try adding class="pag-next" to your anchor tag.

http://stackoverflow.com/comment/41247161
has text: Based on my understanding, I have posted the solution in answer section. please take a look at the code and fiddle provided. Let me know if it meets your requirement.
score: 0
comment on: http://stackoverflow.com/q/26286462
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41306786
score: 0
has text: can you skim this? [preventing conflicts btwn jquery and other libraries](http://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/)...?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26320507

http://stackoverflow.com/comment/41208723
type: AnswerComment
comment on: http://stackoverflow.com/a/26264854
has text: You are correct. I was not loading the jQuery before the turn.min.js file. It took some time, but I eventually had to place the turn.min.js into the layout after the jQuery script. ~ Thanks and well done.
type: Comment
score: 0

http://stackoverflow.com/comment/41363606
score: 0
comment on: http://stackoverflow.com/q/26351488
type: Comment
type: QuestionComment
has text: as i've mentioned in my post; even if i don't include it, calling a widget twice, or even doing a renderPartial() to a page having it causes the inclusion fo the js twice.

http://stackoverflow.com/comment/41128199
type: QuestionComment
comment on: http://stackoverflow.com/q/26222589
has text: remove `securityAuthorization` from your DI in your `config`, it is no longer needed there.
score: 0
type: Comment

http://stackoverflow.com/a/26278439
downvote count: 1
has body: If you have more than 2 forms and only want 2 of them to be submited, they must have a common part, like a css class (no styling here, only a selector). HTML part : &lt;form id="form1" class="myForm ..."/&gt; &lt;form id="form2" class="myForm ..."/&gt; &lt;input type="button" id="myButton" value="Submit both forms"/&gt; js : $("#myButton").click(function(){ $(".myForm").submit(); }); You can add as many form as you want, if they have the class myForm, they will be submited too. No need to change your js code...
has comment: http://stackoverflow.com/comment/41229401
type: Answer
answers question: http://stackoverflow.com/q/26278247
score: 0
upvote count: 1

http://stackoverflow.com/comment/41271195
comment on: http://stackoverflow.com/a/26300373
type: AnswerComment
score: 0
has text: How would I prevent that?
type: Comment

http://stackoverflow.com/q/26259229
type: Question
accepted answer: http://stackoverflow.com/a/26259334
type: AnsweredQuestion
has body: I was using the following MySQL event to update the table with the (CURRENT_TIME)+5) every five min. however my plan is was to get the table updated with that time every full 5 min from current time: e.g., on 12:05 it writes 12:10, on 12:10 it writes 12:15... So I used to fire the below event at exactly 12:30:00 for example in order to get it accurate. CREATE EVENT x_next ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP DO UPDATE data SET x_next= CONCAT(CONCAT(HOUR(CURRENT_TIME),':'),MINUTE(CURRENT_TIME)+5); What I am looking now is to make it more accurate to make this event act like the following JSfiddle result where if the even started at any time it will update only on the next 5 min (snapped-to): http://jsfiddle.net/v06jrobg/ Where the result should be what the event should update. I am wondering if anyone had this experience before or any suggestions?
tagged with: mysql
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26259334
score: 0
has title: MySQL Event update on every snapped 5 min

http://stackoverflow.com/q/26279849
type: UnansweredQuestion
upvote count: 1
tagged with: javascript
type: Question
has title: Image format conversion from png to JPEG/pdf/gif using Javascript
downvote count: 0
score: 1
has body: I am developing a cross-platform application which runs on both mac and windows.The application stack using is Javascript,backbone,node etc.,. I need to convert one image format to another using javascript. If anyone has done before,Kindly provide help. Thanks in advance
favorite count: 0
answer count: 0

http://stackoverflow.com/a/26347446
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41356121
score: 2
has body: When the first token in a new statement is {, then {} is interpreted as an empty block. (Actually of course when { appears after the header clause of something like if or while, then {} is an empty block too, but that's not the interesting case.) Thus in any other context, like say an argument to a function: foo({}); the {} is interpreted as an empty object literal. This situation is similar to the way in which the function keyword is treated differently when it's the first thing in a statement. The syntax has ambiguity, and the parser solves the problem with fixed rules.
has comment: http://stackoverflow.com/comment/137657646
answers question: http://stackoverflow.com/q/26347326
downvote count: 0
has comment: http://stackoverflow.com/comment/41356064

http://stackoverflow.com/q/26342634
tagged with: playframework
score: 2
has title: Tune down JSHint for Play 2.3 : warnings instead of errors
answer count: 0
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
upvote count: 2
tagged with: scala
has body: I use Play 2.3.4 with the JShint sbt plugin. https://www.playframework.com/documentation/2.3.x/AssetsJSHint I'd like to use JSHint to emit warnings and not errors in some cases. How can I configure this to not break the compilation by emmitting an error, but stiell keep the warning [error] /example.js:78: ['user_owner'] is better written in dot notation. [error] var x = a["user_owner"].toLowerCase(); [error] ^ ^ [error] example.js:108: Unnecessary semicolon. [error] }; [error] ^ I allready read about .jshintrc but it looks like an on/off solution for me.
tagged with: sbt
has comment: http://stackoverflow.com/comment/41398375
type: UnansweredQuestion
tagged with: jshint

http://stackoverflow.com/comment/41127127
has text: Although it won't solve your problem of the date text you are using not being parseable in most browsers, *please* consider refactoring your code and formatting it neatly. For formatting, there are online utilities, e.g. [javascriptformat.com](http://www.javascriptformat.com/). For refactoring, you can have *one* function which returns an object with, say, `.date` and `.time` properties; to do that see [Return multiple values in JavaScript?](http://stackoverflow.com/questions/2917175/return-multiple-values-in-javascript).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26221602

http://stackoverflow.com/a/26294131
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26293903
type: Answer
has body: check this Fiddle $(document).ready(function (){ var previousHgt=$("div").height(); var getheightWhenAuto=($("div").css("height","auto").height()); $("div").css("height",previousHgt ) alert(getheightWhenAuto); });
upvote count: 1

http://stackoverflow.com/q/26285732
has body: I need to add a Chosen multi-select to a cfselect that is driven via Bind attribute by another cfselect. The problem seems to be that when Chosen (and the rest of the page) loads, it has no options for the cfselect, and after the cfselect bind makes some AJAX requests (providing the end cfselect with a new set of data), the Chosen display is not updated accordingly. Here are my cfselects: &lt;div class="rowalt"&gt; &lt;p class="_20NP"align="right"&gt;&lt;strong&gt;Event:&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="_70NP" align="left"&gt; &lt;cfselect class="chzn-done" name="EH_ID" id="EH_ID" bind="cfc:EventQuickAdd.GetEvent2({EM_ID},{EC_ID})" display="NAME" value="EH_ID" data-placeholder="Choose an Event" required="yes" selected="#eh_id#" /&gt; &lt;/p&gt; &lt;/div&gt; &lt;div class="rowalt"&gt; &lt;p class="_20NP"align="right"&gt;&lt;strong&gt;Event Detail:&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="_70NP" align="left"&gt; &lt;cfselect name="ED_ID" id="ED_ID" bind="cfc:EventQuickAdd.GetEventDetail2({EM_ID},{EC_ID},{EH_ID})" display="NAME" value="ED_ID" data-placeholder="Choose an Event" multiple selected="#ed_id#" /&gt; &lt;/p&gt; &lt;/div&gt; I've been able to use $('#ED_ID').trigger("liszt:updated") (using the old version of the Chosen plugin) to update chosen. If I run this code in the console, the Chosen display is updated fine, and is loaded with all of the current option data. However, I cannot figure out how to run this code at the correct time. If I run the trigger on $('#EH_ID').change(), the trigger runs before Coldfusion has a chance to make an AJAX request, and return with the selects new data. Is there some way to set an async option to false on the Coldfusion AJAX request, so that it will retrieve the information and THEN update the Chosen? Is there another event handler that will fire only after the AJAX request is successful?
upvote count: 1
tagged with: jquery-chosen
type: Question
tagged with: javascript
tagged with: jquery
has title: How to add Jquery Chosen multiple select to bound CFSELECT?
downvote count: 0
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: coldfusion
answer count: 0
score: 1

postback
tag name: postback
tags question: http://stackoverflow.com/q/26213902
type: Tag

http://stackoverflow.com/q/26280695
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26280740
type: Question
has title: javascript split by whitespaces 3 elements
tagged with: javascript
has body: I have some lines.. For example: var line; line = "INFO 2014-10-08 15:01:17,233 [localhost-startStop-1] Main directory: C:\WORKSPACE"; line = "ERROR 2014-10-08 15:01:16,646 [localhost-startStop-1] Cannot alter it is not a table."; var headerArray = line.split("\\s", 3); //headerArray returns array of 1 element "INFO 2014-10-08 15:01:17,233 [localhost-startStop-1] Main directory: C:\WORKSPACE"; don't know why.. But I want only {"INFO", "2014-10-08", "15:01:17,233"} and then {"ERROR", "2014-10-08", "15:01:16,646"}
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26280740

http://stackoverflow.com/q/26230833
type: Question
has body: I want to make my original image to portrait when I mouse over on an image. Can anyone please tell me how to do this? I want to open whole image on mouseover with portrait effect.
has answer: http://stackoverflow.com/a/26230995
tagged with: javascript
has answer: http://stackoverflow.com/a/26231203
tagged with: jquery
has comment: http://stackoverflow.com/comment/41142099
score: 0
possible better answer: http://stackoverflow.com/a/26231676
has answer: http://stackoverflow.com/a/26231107
has answer: http://stackoverflow.com/a/26231676
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/26231203
tagged with: php
answer count: 4
has comment: http://stackoverflow.com/comment/41143224
has title: PHP jquery image effect on mouseover
type: AnsweredQuestion
downvote count: 2
tagged with: gdlib
has comment: http://stackoverflow.com/comment/41142067

http://stackoverflow.com/comment/41209507
type: QuestionComment
comment on: http://stackoverflow.com/q/26267324
has text: oh- sry guys , i'm new , would you plz help me out ?
score: 0
type: Comment

http://stackoverflow.com/comment/41345533
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26341409
has text: Yeah thanks - this question actually seems to be a duplicate of that one.
score: 0

http://stackoverflow.com/q/26322617
type: Question
accepted answer: http://stackoverflow.com/a/26330272
tagged with: javascript
linked to: http://stackoverflow.com/q/26058205
upvote count: 2
has title: Meteor.WrapAsync don't return value
has body: I been trying to make work Meteor.WrapAsync I have read Meteor wrapAsync syntax answer, this video https://www.eventedmind.com/feed/meteor-meteor-wrapasync and I just cant figure how to return the response from the call from Stripe. I'm using console.log to print the steps, and I been reaching throw number 4 which mean, Im reaching stripe server and getting the response, but after that I can't see why console.log(5) its not printing. please if somebody can help me to understand why its the wrapAsyn its not returning the stripe callback? //this functions are part of an anonymous function and running in the server side of meteor stripe.charge = function (stripeToken) { // get a sync version of our API async func var strypeChargeSync = Meteor.wrapAsync(stripe.charge.process); // call the sync version of our API func with the parameters from the method call console.log("1"); var response = strypeChargeSync(stripeToken); console.log("5" + response); ///// this never get print / log return response; } stripe.charge.process = function(stripeToken){ var _stripe = StripeAPI(stripeKey); console.log("2"); var charge = _stripe.charges.create({ amount: 1000, // amount in cents, again currency: "cad", card: stripeToken.id, description: "paid@whatever" }, function(err, charge) { if (err &amp;&amp; err.type === 'StripeCardError') { alert("Sorry we couldn't charge the money: " + err); //console.log(err); }else{ console.log("4"); //console.log(charge); return charge; } }); console.log("3"); } //current output 1,2,3,4 but never 5 :( EDIT this is how I end having the Stripe function thanks for the support var syncFunction = Meteor.wrapAsync(_stripe.charges.create, _stripe.charges); var response = syncFunction({ amount: 1000, // amount in cents, again currency: "cad", card: stripeToken.id, description: "paid@whatever" });
answer count: 1
has answer: http://stackoverflow.com/a/26330272
has comment: http://stackoverflow.com/comment/41323769
tagged with: meteor
tagged with: stripe-payments
favorite count: 0
has comment: http://stackoverflow.com/comment/41324136
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41230226
type: Comment
type: QuestionComment
has text: Not true. Define a mapping with '.' to change structure. For example, a:'b.c' will map property 'a' of source object to a sub property 'c' of target object's property 'b'.
comment on: http://stackoverflow.com/q/26274424
score: 0

http://stackoverflow.com/comment/41206825
type: Comment
has text: Thank you! That definitely helps me.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26265884

http://stackoverflow.com/a/26321678
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41316131
score: 2
accepted answer of: http://stackoverflow.com/q/26316227
answers question: http://stackoverflow.com/q/26316227
has body: Symbol/icon paths have to be a single SVG path definition. with a fill colour and a stroke (line) colour. Your symbol has multiple paths, plus text and other things like clip paths. Luckily the clip paths that AI adds, can generally be ignored. Plus the text in your symbol is so tiny that it is not really visible and could be removed. The remaining paths (the arrow and the two circles) will need to be merged into a single path. You can do this in Illustrator. Once you have done that, you can copy the path definition from your SVG file into your maps marker definition. However, if you merge all the paths into one, you will be stuck with a single colour marker. If you need to keep the design with more than one colour, then you will need to make two markers (one for the arrow, and one for the circles), then superimpose them on the map. Another option is to just keep the SVG as it is and use absolute positioning to position the SVG at the right place on the map. However you will need to be responsible for moving and rotating it when the map scrolls or zooms.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41327327

http://stackoverflow.com/comment/41342622
comment on: http://stackoverflow.com/q/26340181
score: 0
type: Comment
type: QuestionComment
has text: How about `$scope.BillingDetails.firstname = $scope.Profile.firstname`?

http://stackoverflow.com/comment/41109388
type: QuestionComment
comment on: http://stackoverflow.com/q/26212906
has text: No, is running in another domain.
score: 0
type: Comment

http://stackoverflow.com/a/26226920
has comment: http://stackoverflow.com/comment/41134940
type: Answer
has body: Here is the code you should use for 2 parameters to get in CodeIgniter. Java Script function anade() { var idnumero = $(this).val(); var quant = $("#num" + idnumero).val(); $("#carrito").load("http://example.com/cart/addToCart/" + $(this).val() + "/" + quant); } In CodeIgniter function getCart($p, $cant) { }
answers question: http://stackoverflow.com/q/26226779
score: 0

http://stackoverflow.com/comment/41356180
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26347436
has text: @msrd0 - I just want the regex so that I can replace $xx to $yy if its only present inside the javascript alert function
score: 0

http://stackoverflow.com/q/26224477
has answer: http://stackoverflow.com/a/26224502
downvote count: 2
linked to: http://stackoverflow.com/q/13840429
upvote count: 1
has comment: http://stackoverflow.com/comment/41130478
type: Question
has body: So I've made a form validation in Javascript. It validates wether the input from the form is correct. So when all of the input fields are correctly filled in, I want to send an e-mail to the user containing some information: var to = "info@test.com"; var subject = "subject"; var message = "This is the message"; So I want to change these variables into PHP variables so I can do the following in PHP: mail($to, $subject, $message); So is it possible to change these Javascript variables into PHP variables? Or is there a better way to send the email using Javascritp? Thanks in advance!
tagged with: javascript
score: -1
has title: Use PHP In Javascript
tagged with: email
answer count: 1
has comment: http://stackoverflow.com/comment/41130436
favorite count: 0
type: UnansweredQuestion
tagged with: php
duplicate of: http://stackoverflow.com/q/13840429

http://stackoverflow.com/q/26283542
tagged with: local-storage
has body: I have no clue how localStorage works and I need it for my project. I'm doing a todolist-app and I need to save the items so the user can turn off the app and that the list is still there when they open the app again. How do I do that? Inköpslista Inköp
has comment: http://stackoverflow.com/comment/41239275
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26284182
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41239199
has title: How to get localStorage to work on a todolist-app
has comment: http://stackoverflow.com/comment/41239637
has comment: http://stackoverflow.com/comment/41240111
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41239977

http://stackoverflow.com/a/26315846
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26315813
answers question: http://stackoverflow.com/q/26315813
upvote count: 5
has body: Your problem is: &lt;div class="task" ng-click="task.editting = true" task&gt; Since this is part of the template created from the task directive you are trying to add the task directive over and over. Change to: &lt;div class="task" ng-click="task.editting = true"&gt;
score: 5

http://stackoverflow.com/q/26214834
upvote count: 3
downvote count: 1
type: Question
tagged with: javascript
answer count: 1
tagged with: jquery
favorite count: 0
has title: How can we drag and move an image with JavaScript?
has answer: http://stackoverflow.com/a/26215483
has body: I find and little change code so that I have this code like that, A link to Fiddle code: function Position(x, y) { this.X = x; this.Y = y; this.Add = function(val) { var newPos = new Position(this.X, this.Y); if(val != null) { if(!isNaN(val.X)) newPos.X += val.X; if(!isNaN(val.Y)) newPos.Y += val.Y } return newPos; } this.Subtract = function(val) { var newPos = new Position(this.X, this.Y); if(val != null) { if(!isNaN(val.X)) newPos.X -= val.X; if(!isNaN(val.Y)) newPos.Y -= val.Y } return newPos; } this.Min = function(val) { var newPos = new Position(this.X, this.Y) if(val == null) return newPos; if(!isNaN(val.X) &amp;&amp; this.X &gt; val.X) newPos.X = val.X; if(!isNaN(val.Y) &amp;&amp; this.Y &gt; val.Y) newPos.Y = val.Y; return newPos; } this.Max = function(val) { var newPos = new Position(this.X, this.Y) if(val == null) return newPos; if(!isNaN(val.X) &amp;&amp; this.X &lt; val.X) newPos.X = val.X; if(!isNaN(val.Y) &amp;&amp; this.Y &lt; val.Y) newPos.Y = val.Y; return newPos; } this.Bound = function(lower, upper) { var newPos = this.Max(lower); return newPos.Min(upper); } this.Check = function() { var newPos = new Position(this.X, this.Y); if(isNaN(newPos.X)) newPos.X = 0; if(isNaN(newPos.Y)) newPos.Y = 0; return newPos; } this.Apply = function(element) { if(typeof(element) == "string") element = document.getElementById(element); if(element == null) return; if(!isNaN(this.X)) element.style.left = this.X + 'px'; if(!isNaN(this.Y)) element.style.top = this.Y + 'px'; } } function hookEvent(element, eventName, callback) { if(typeof(element) == "string") element = document.getElementById(element); if(element == null) return; if(element.addEventListener) { element.addEventListener(eventName, callback, false); } else if(element.attachEvent) element.attachEvent("on" + eventName, callback); } function unhookEvent(element, eventName, callback) { if(typeof(element) == "string") element = document.getElementById(element); if(element == null) return; if(element.removeEventL…
type: UnansweredQuestion
score: 2

http://stackoverflow.com/q/26327989
tagged with: http://stackoverflow.com/tag/html
tagged with: form-submit
has title: How to conditionally prevent form submission if no data has been entered into the text fields?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18092917
type: Question
has comment: http://stackoverflow.com/comment/41320042
tagged with: javascript
tagged with: forms
score: 0
linked to: http://stackoverflow.com/q/14614761
upvote count: 1
answer count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/18092917
tagged with: jquery
has body: I have this form: Search I want to make sure that this form is never submitted unless the text field contains at least one character in it. How do I go forward with this?
favorite count: 0
has answer: http://stackoverflow.com/a/26328027

http://stackoverflow.com/a/26324008
has comment: http://stackoverflow.com/comment/41312887
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26323952
type: Answer
has comment: http://stackoverflow.com/comment/41312777
has body: You are also targetting a span while the only child element of your .meters div are strong elements. Here is a working code for me on your site : $().ready(function() { $(".meter &gt; strong").each(function() { $(this) .data("origWidth", $(this).width()) .width(0) .animate({ width: $(this).data("origWidth") }, 1200); }); });
accepted answer of: http://stackoverflow.com/q/26323952
score: 0
has comment: http://stackoverflow.com/comment/41313119
has comment: http://stackoverflow.com/comment/41313033

http://stackoverflow.com/comment/41355814
score: 0
type: AnswerComment
has text: Thank you. I understand scope for the most part that's why I didn't quite understand why one function has the variable declared locally and worked, and the other function had to declare it's variable global to work. Thank you for the advice though!
type: Comment
comment on: http://stackoverflow.com/a/26347311

http://stackoverflow.com/q/26289389
type: UnansweredQuestion
answer count: 0
has body: I've set the width of one item to match the width of another item. This part of my jQuery is working, but what isn't working is the width adjusting when the viewport is resized. What I have is the following: jQuery(document).ready(function($){ // Width Adjustment for Back Item $('.hpadvantageitem_back').css({ width : ($('.hpadvantageitem_front').width() + 64) }); $('.hpextrainfoitem_back').css({ width : ($('.hpextrainfoitem_front').width() + 64) }); }); jQuery(window).load(function($) { // Width Adjustment for Back Item $('.hpadvantageitem_back').css({ width : ($('.hpadvantageitem_front').width() + 64) }); $('.hpextrainfoitem_back').css({ width : ($('.hpextrainfoitem_front').width() + 64) }); }); jQuery(window).resize(function($){ // Width Adjustment for Back Item $('.hpadvantageitem_back').css({ width : ($('.hpadvantageitem_front').width() + 64) }); $('.hpextrainfoitem_back').css({ width : ($('.hpextrainfoitem_front').width() + 64) }); }) The document ready and window load functions seem to be working, but not the window resize function. The reason I have to set equal width is because the primary element, hpadvantageitem_front has position: relative, whereas hpadvantageitem_back has position: absolute. The parent of both containers has position: relative as well, for the hpadvantageitem_back item so that it would stay inside the parent container. The issue for why hpadvantageitem_back cannot just have width: 100% added is because its width exceeds the width of the parent for some odd reason, even though it shouldn't. The quick and dirty solution is to add some JavaScript to force hpadvantageitem_back to have the same width as hpadvantageitem_front, and I can call it a day. Would someone be so kind and help me with how to make hpadvantageitem_back adjust it's width responsively? If you feel that HTML and CSS is needed, let me know and I'll post it. Thank you for your help.
tagged with: javascript
tagged with: jquery
has title: How do I get equal width in jQuery that is responsive?
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
has comment: http://stackoverflow.com/comment/41250444
has comment: http://stackoverflow.com/comment/41250130

http://stackoverflow.com/q/26262083
has title: javascript/json .length returning 1 for array of length 3
score: 0
accepted answer: http://stackoverflow.com/a/26262103
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26262348
has answer: http://stackoverflow.com/a/26262348
tagged with: arrays
tagged with: javascript
has body: I have the following javascript: var emails_array = ["[\"theiremail1\",\"theiremail2\",\"theiremail3\"]"]; var emails_array_length = emails_array.length; alert("emails array: " + emails_array + "emails array length: " + emails_array_length); The alert that appears as the result of this code is: emails array: ["theiremail1","theiremail2","theiremail3"]emails array length: 1 Why isn't it returning 3?
has answer: http://stackoverflow.com/a/26262103

http://stackoverflow.com/a/26311787
score: -1
downvote count: 2
has body: Change you function to this: $("body").on("ab.snap", function(event) { if (event.snapPoint &gt;= 768) { (new floatShareBar()).float() } else { (new floatShareBar()).unfloat(); } }); function floatShareBar () { var fShareBar = $('#article-share'); this.float = function() { console.log( }; this.unfloat = function() { console.log("unfloat"); }; }; you should declare functions when using var before you call them.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26311729

http://stackoverflow.com/comment/41209261
type: QuestionComment
comment on: http://stackoverflow.com/q/26267266
has text: Is there a question?
score: 0
type: Comment

http://stackoverflow.com/q/26295898
tagged with: facebook
has answer: http://stackoverflow.com/a/26303939
type: AnsweredQuestion
type: Question
upvote count: 12
has body: I'm trying to understand the Flux example chat app. The authors mention this unidirectional data flow: However, in the example app there are dependencies between Action Creators (ChatMesssageActionCreator) and Stores (MessageStore), and between Stores (MessageStore, ThreadStore) and Web API Utils (ChatMessageUtils), which seems to be against the unidirectional data flow rule: Is it recommended to follow the given example, or should one design a better pattern? Update I figured out that the ChatMessageUtils doesn't belong to Web API Utils, so the two arrows from store shouldn't point there, therefore maybe they're okay. However the connection between the ActionCreators and the Store seems still strange.
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26303939
has title: Flux architecture misunderstanding in example chat app
answer count: 1
tagged with: reactjs-flux
favorite count: 0
score: 12

http://stackoverflow.com/q/26270661
has comment: http://stackoverflow.com/comment/41215486
has body: I have this Json data I get from server in javascript var mydata = JSON.parse('["X","Y","Z"]'); Below I have the following data model in javascript.. var mySchemasList = { schemas: [new SelectSchemaModel("A", false), new SelectSchemaModel("B", false), new SelectSchemaModel("C", false) ] }; I want to create this model dynamically by getting data ('A','B','C') from mydata.. Any help is sincerely appreciated.. Thanks
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26272002
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26272088
tagged with: javascript
has comment: http://stackoverflow.com/comment/41215426
has answer: http://stackoverflow.com/a/26272088
score: 0
has answer: http://stackoverflow.com/a/26272002
has title: How to create data model dynamically
has comment: http://stackoverflow.com/comment/41215871

http://stackoverflow.com/comment/72301408
has text: Now with objects! `let obj = Object.assign({}, this.state.obj); obj.woo = 'wow'; this.setState({obj});`
score: 0
comment on: http://stackoverflow.com/a/26254086
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/45558641
has text: sure, I'll leave the relevant parts here asap.
type: Comment
comment on: http://stackoverflow.com/a/26995851
score: 0
type: AnswerComment

http://stackoverflow.com/a/26218384
has comment: http://stackoverflow.com/comment/41131369
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41166801
has body: Every document has a new root element by default. If you grab the first xmlElement, that's the root element. Here's an example of the changes you would make to have text-area be the root element: var myDocument = app.documents.add(); var myTextFrame = myDocument.pages[0].textFrames.add(); myTextFrame.geometricBounds = ["6p", "6p", "24p", "24p"]; myTextFrame.contents = "Hello World!"; var myRootElem = myDocument.xmlElements[0]; myRootElem.markupTag.name = "text-area"; var myBounds = myTextFrame.geometricBounds; var myX = "" + myBounds[1]; var myY = "" + myBounds[0]; myRootElem.xmlAttributes.add("x", myX); myRootElem.xmlAttributes.add("y", myY); myTextFrame.markup(myRootElem);
has comment: http://stackoverflow.com/comment/41167215
has comment: http://stackoverflow.com/comment/41119955
has comment: http://stackoverflow.com/comment/41119245
has comment: http://stackoverflow.com/comment/41119993
type: Answer
has comment: http://stackoverflow.com/comment/41120276
has comment: http://stackoverflow.com/comment/41120030
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26213477
answers question: http://stackoverflow.com/q/26213477
has comment: http://stackoverflow.com/comment/41168956

http://stackoverflow.com/comment/41245813
comment on: http://stackoverflow.com/a/26283884
type: AnswerComment
score: 0
type: Comment
has text: fine. I understand that I need to call the function, and I appreciate what you wrote here. But aren't I executing the result function when I call createFunctions()? also, when I put the anonymous function in parentheses as in the edit, isn't that calling the function immediately as well?

http://stackoverflow.com/a/26307260
answers question: http://stackoverflow.com/q/26307203
has body: if you want to add further styles to your boostrap, include an extra style sheet in your HTML, and give your HTML elements an extra class with styling outlined in your added stylesheet. put your class after the bootstrap class when calling it. so, your html would be &lt;div class="row my_special_style_class"&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/41216613
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26271252
type: Comment
has text: You can use something like `JSON.parse()`

http://stackoverflow.com/comment/41234137
type: Comment
type: QuestionComment
has text: I'm using node, so I use `npm` to install `phantom` and then declare `var phantom = require('phantom');`.
comment on: http://stackoverflow.com/q/26280834
score: 0

http://stackoverflow.com/comment/41281050
has text: The reason that `.prop()` didn't throw an error is because when it doesn't find a match, it returns an empty string, whereas `.attr()` will return `undefined`. So while it appears to "work", it's not really a great solution. @ariandamnayak's answer below is probably better.
type: Comment
comment on: http://stackoverflow.com/q/26305798
score: 0
type: QuestionComment

http://stackoverflow.com/a/26306195
has comment: http://stackoverflow.com/comment/41280947
score: 0
has body: Use a for-loop to go through the object attributes var obj = {"prop1":"hello","prop2":"world!"}; var array = []; for(var key in obj){ array.push(obj[key]); }
type: Answer
has comment: http://stackoverflow.com/comment/41280766
answers question: http://stackoverflow.com/q/26306133

http://stackoverflow.com/a/26234668
downvote count: 0
answers question: http://stackoverflow.com/q/26234586
has body: You can include whatever option you need: var options = "g"; //g, m, i, or combination of them new RegExp("(" + variable_name + ":\\((.*?)\\))", options); Hope it's useful!
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/41283605
type: Comment
has text: Makes sense. Thanks for your help! Now I'm on my way to use a dot deliminated `findKey` to traverse deeper :)
comment on: http://stackoverflow.com/a/26306679
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41325388
type: QuestionComment
type: Comment
has text: As hinted at in other comments and answers, [*Array.prototype.indexOf*](http://ecma-international.org/ecma-262/5.1/#sec-15.4.4.14) uses the [*strict equality comparison algorithm*](http://ecma-international.org/ecma-262/5.1/#sec-11.9.6) `===`, so object members will only be equal if they reference the same object.
comment on: http://stackoverflow.com/q/26330559
score: 0

http://stackoverflow.com/comment/41248225
has text: Move your `theController` function definition above your angular code. Modern JS engines will look ahead and find your function definition before executing, but older engines execute from top to bottom (and I think "strict" mode requires this too).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26288367
score: 3

http://stackoverflow.com/a/26245301
has comment: http://stackoverflow.com/comment/41169284
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26245220
accepted answer of: http://stackoverflow.com/q/26245220
has comment: http://stackoverflow.com/comment/41169399
type: Answer
has body: You will want to catch the submit event of the form. There is no submit event on a button. $('form').submit(function () { if (*everything ok*) { alert("Form submitted."); } else { return false; } }); Ideally you would help identify your &lt;form&gt;, either with an ID or a class, i.e.: &lt;form id="xyz-form"&gt; And then change your selector to: $('#xyz-form').submit(...); Now this is only to stop the form from submitting when there are errors. When return false; isn't the path the submit callback takes, your page is going to refresh. If you want to submit the data to the server without a refresh, you will need to approach this differently.
score: 4
upvote count: 4

http://stackoverflow.com/a/26292299
has comment: http://stackoverflow.com/comment/41255308
has body: Hide your HTML by default (display:none) and make it visible (.show) when the event happens.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26292085

http://stackoverflow.com/comment/41209888
type: Comment
type: QuestionComment
has text: No i use a complete page refresh (Postback). I could not make it to work with Ajax but that's ok. I can live with that as long as I can enable my button.
comment on: http://stackoverflow.com/q/26267508
score: 0

http://stackoverflow.com/comment/67168751
type: Comment
has text: @RobG. > "while Function.prototype is a function" but IMHO, `constructor.prototype` are always `objects`. `Function.prototype.prototype` gives `undefined` which is correct, since pure objects (i.e. not function objects) do not have a `prototype` property only function objects do however when I echo `Function.prototype` inside chrome's console it does echo `function () {}`. Can you plz throw some light as to why this gogglee-boggleness?
comment on: http://stackoverflow.com/a/26334037
score: 0
type: AnswerComment

http://stackoverflow.com/a/26336347
has body: I will answer your question first and then explain what went wrong. Don't worry about it, the logic behind your code is absolutely fine. It's just a misplaced curly brace i.e. }. Let's look at your nested for loops and see how they proceed: var intermediaryArray = []; //initialized earlier ... for (var i = 0; i &lt;= maxArrayIndex; i++){ intermediaryArray[i] = []; for (var month = startingMonth; month &lt;= endingMonth; month++){ for (var testNumber = 0; testNumber &lt; testResults.length; testNumber++){ if ( getMonth(testResults[testNumber].dateCreated) == month ){ intermediaryArray[i].push(testResults[testNumber].score); }; }; }; }; In the test case that you provide, length of the intermediaryArray is 4 which gets calculated perfectly. The outer-most for loop runs four times. And for every iteration, you do this part: for (var month = startingMonth; month &lt;= endingMonth; month++){ for (var testNumber = 0; testNumber &lt; testResults.length; testNumber++){ if ( getMonth(testResults[testNumber].dateCreated) == month ){ intermediaryArray[i].push(testResults[testNumber].score); }; }; }; The code above basically loops from startingMonth to endingMonth and finds the appropriate elements of testResulsts array in that month and is supposed to push it to the intermediaryArray. In essence, there should be one entry for a specific month that represents an index in intermediaryArray. However, in your for loop for every index of intermediaryArray, you do this check against all the months. Let's do a dry run for i = 0: i = 0 ----------- startingMonth = 4, endingMonth = 7 month = 4 : Nothing gets pushed into intermediaryArray[0] month = 5 : {dateCreated: "05/11/2014",score: 99.3} gets pushed into intermediaryArray[0] month = 6 : Nothing gets pushed month = 7 : The remaining 3 tests get pushed into intermediaryArray[0] Ultimately all the results get pushed into intermediaryArray[0] as we did not change i with the month variable This is the reason why you in your final returned…
accepted answer of: http://stackoverflow.com/q/26335618
answers question: http://stackoverflow.com/q/26335618
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/q/26210600
upvote count: 2
has comment: http://stackoverflow.com/comment/41107812
tagged with: charts
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26371654
type: Question
tagged with: graph
answer count: 2
tagged with: canvas
has comment: http://stackoverflow.com/comment/41117158
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41108543
has comment: http://stackoverflow.com/comment/41106852
favorite count: 0
possible better answer: http://stackoverflow.com/a/26210672
has answer: http://stackoverflow.com/a/26371654
has answer: http://stackoverflow.com/a/26210672
tagged with: html5-canvas
has title: Creating Polar Area Chart using Canvas
has comment: http://stackoverflow.com/comment/41108943
score: 2
has body: I am trying to create Polar Area Chart using canvas here : http://jsfiddle.net/wm7pwL2w/2/ Code: var myColor = ["#ff0", "#00f", "#002", "#003", "#004"]; var myData = [10, 30, 20, 60, 40]; var myRadius = [120, 80, 40, 70, 40]; function getTotal() { var myTotal = 0; for (var j = 0; j &lt; myData.length; j++) { myTotal += (typeof myData[j] == 'number') ? myData[j] : 0; } return myTotal; } function plotData() { var canvas; var ctx; var lastend = 0; var myTotal = getTotal(); canvas = document.getElementById("canvas"); ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); for (var i = 0; i &lt; myData.length; i++) { ctx.fillStyle = myColor[i]; ctx.beginPath(); ctx.moveTo(200, 150); ctx.arc(200, 150, myRadius[i], lastend, lastend + (Math.PI * 2 * (myData[i] / myTotal)), false); console.log(myRadius[i]); ctx.lineTo(200, 150); ctx.fill(); lastend += Math.PI * 2 * (myData[i] / myTotal); } } plotData(); Update: To clear things out this is what I want to implement : &lt; > This style with this : (This is a simple pie chart) I am not able to implement the second part(exploding the slices) with my current implementation.

http://stackoverflow.com/a/26254790
has body: is this what you are trying to achieve http://jsfiddle.net/fekktthj/1/ ? I added a few lines that check the value of the last select as follows: $(function(){ $("select").change(function(){ $( "select option:selected").each(function(){ if($(this).attr("value")=="Satılık"){ $(".met").show(); $(".de").hide(); } if($(this).attr("value")=="Kiralık"){ $(".met").show(); $(".de").show(); } if($(this).attr("value")=="GünlükKiralık"){ $(".de").hide(); $(".met").show(); } if($(this).attr("value")=="Satılıki"){ $(".de").hide(); $(".met").show(); } if($(this).attr("value")=="Kiralıki"){ $(".de").show(); $(".met").show(); } if($(this).attr("value")=="Devren"){ $(".de").hide(); $(".met").show(); } }); if(($('select[name=isinma_tipi]').val() ==null) || $('select[name=isinma_tipi]').val() ==''){ $('#submitBtn').hide(); }else{ $('#submitBtn').show(); } }).change(); I hope it helps you!
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26254316
answers question: http://stackoverflow.com/q/26254316
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41385334
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26354672
has text: @Jason Whoops that's me getting confused between the old Ember.Deferred syntax, check the answer again
score: 0

http://stackoverflow.com/a/26246422
accepted answer of: http://stackoverflow.com/q/26204178
type: Answer
has body: Looks like this is me not understanding sequelisejs#sync which clears down the db between server restarts. The max query returns as expected after the 2nd request!
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26204178

http://stackoverflow.com/comment/41255717
type: Comment
comment on: http://stackoverflow.com/a/26290287
type: AnswerComment
score: 0
has text: I was linking to the [MDN docs on setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout), which explain that the first parameter can be either a function **or a string**, which is `eval()`ed. I believe `setTimeout()` converts the `undefined` returned by `console.log()` to en empty string, thus executing nothing after the timeout (or not even setting a timer).

http://stackoverflow.com/q/26203801
has body: So I'm using Javascript and ajax to connect to a database through an php file, but something came in mind. If a User log in, the user data will be stored in my Javascript file tittle UserProces.js as: Var Username = "James" Var Age ="25"; (Data obtain from a query through a php: RetrieveUserData.php) If 1 minute after James loged in, another user name Amy log in will the values of name and age of amy will effect the values of James? Since there is only one UserProces.js.
tagged with: javascript
has title: Does everyone shares the same javascript file?
has comment: http://stackoverflow.com/comment/41098922
has answer: http://stackoverflow.com/a/26312423
score: 0
has comment: http://stackoverflow.com/comment/41091026
answer count: 3
has answer: http://stackoverflow.com/a/26312407
has comment: http://stackoverflow.com/comment/41090951
has comment: http://stackoverflow.com/comment/41615411
has comment: http://stackoverflow.com/comment/41090950
has comment: http://stackoverflow.com/comment/41091102
has answer: http://stackoverflow.com/a/26203974
type: UnansweredQuestion
tagged with: php
tagged with: database
has comment: http://stackoverflow.com/comment/41093763
has comment: http://stackoverflow.com/comment/41103583
type: Question
has comment: http://stackoverflow.com/comment/41093679
has comment: http://stackoverflow.com/comment/41090975
has comment: http://stackoverflow.com/comment/41091048

http://stackoverflow.com/q/26288255
tagged with: javascript
has body: I'm attempting to use bootstrap-gallery in my rails 4 app. I've followed the simple instructions outside of not understanding what is meant by: 3. activate the plugin on the gallery container $('.gallery').bootstrapGallery(); I have attempted to add this to the top of my view with: &lt;script&gt; $('.gallery').bootstrapGallery(); &lt;/script&gt; But the JS doesn't appear to execute when I click on an image (I'm just taken to the image URL), and I get the following errors in the JS console: Uncaught TypeError: Cannot call method 'hasOwnProperty' of undefined Uncaught TypeError: Cannot call method 'addMarker' of undefined Pointers on where I'm going wrong? EDIT: this is what I have in my view: &lt;%= javascript_include_tag "bootstrap-gallery" %&gt; &lt;%= stylesheet_link_tag "bootstrap-gallery" %&gt; &lt;div class="gallery row"&gt; &lt;% @post.assets.each do |asset| %&gt; &lt;a class="col-xs-6 col-sm-4" href=&lt;%= asset.asset.url(:medium) %&gt;&gt; &lt;img src=&lt;%= asset.asset.url(:medium) %&gt; alt=""&gt; &lt;/a&gt; &lt;% end %&gt; &lt;/div&gt; &lt;script&gt; var ready; ready = function() { $('.gallery').bootstrapGallery(); }; $(document).ready(ready); $(document).on('page:load', ready); &lt;/script&gt; Still running into the same issue with: Uncaught TypeError: Cannot call method 'hasOwnProperty' of undefined
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26763080
favorite count: 0
has title: bootstrap-gallery, activating plugin on gallery container
type: UnansweredQuestion
tagged with: twitter-bootstrap
score: 1
upvote count: 1
tagged with: ruby-on-rails
type: Question

http://stackoverflow.com/comment/41253285
score: 0
type: Comment
type: AnswerComment
has text: In my project all javascript function is defined in sorry for making no good presentation..lol
comment on: http://stackoverflow.com/a/26289594

http://stackoverflow.com/q/26264608
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/26328194
favorite count: 0
has body: I was playing with the html5 geolocation api for a project I'm working on. Latitude and longitude are reported correctly but altitude is always returned as 'null'. Testing device is Nexus 4 and 5, has anybody else had similar problems with this api?
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: geolocation
type: Question
has answer: http://stackoverflow.com/a/31343715
has title: HTML5 Geolocation Altitude
has comment: http://stackoverflow.com/comment/41204430

http://stackoverflow.com/q/26275039
has comment: http://stackoverflow.com/comment/41223642
tagged with: focus
accepted answer: http://stackoverflow.com/a/26275618
has title: how to auto-focus iframe on bodyload
has comment: http://stackoverflow.com/comment/41222975
has comment: http://stackoverflow.com/comment/41223252
has comment: http://stackoverflow.com/comment/41223017
has comment: http://stackoverflow.com/comment/41223156
tagged with: iframe
type: Question
type: AnsweredQuestion
tagged with: wysiwyg
tagged with: autofocus
has answer: http://stackoverflow.com/a/26275618
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41223370
has body: I am working on a WYSIWYG text editor and I'm using iframe as the textarea, i want the textarea to be selected as soon as the page loads. i tried the onload event and the focus() function but both didn't work. here is the code: And the javascript function iFrameOn(){ richTextField.document.designMode = 'On'; }

http://stackoverflow.com/q/26311812
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26312012
tagged with: http://stackoverflow.com/tag/json
has title: Insert key in Json using Javascript
type: Question
possible better answer: http://stackoverflow.com/a/26312012
answer count: 2
tagged with: jquery-autocomplete
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26311825
has body: In the case of my json format as below var names = ['Lee' , 'Cooper']; How can javascript programatically set the json output to below ? {"suggestions": ['Lee', 'Cooper']} I know to modify the value for names[0] from 'Lee' to something else. But I am not sure on how to set key. This is a pre-requisite for jquery autocomplete where the json format must be in the correct way.
has comment: http://stackoverflow.com/comment/41290467
score: 0
accepted answer: http://stackoverflow.com/a/26311825

http://stackoverflow.com/a/26277194
has comment: http://stackoverflow.com/comment/41226713
answers question: http://stackoverflow.com/q/26276952
upvote count: 1
has comment: http://stackoverflow.com/comment/41227215
has comment: http://stackoverflow.com/comment/41226789
has comment: http://stackoverflow.com/comment/41226865
has comment: http://stackoverflow.com/comment/41226659
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41227122
has body: Port 22 is reserved for ssh and on the list of well known ports, please check http://en.wikipedia.org/wiki/Port_(computer_networking)#Common_port_numbers I would recommend you to run node apps for development on ports 8000-9000, but you can use any from the registered ports range.
type: Answer

http://stackoverflow.com/comment/41266047
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26298585
has text: http://stackoverflow.com/questions/12599637/angularjs-ng-show-ng-hide
score: 0

http://stackoverflow.com/a/26243953
upvote count: 1
has comment: http://stackoverflow.com/comment/41193347
downvote count: 0
has comment: http://stackoverflow.com/comment/41190226
has body: If you're already familiar with PHP and you don't want to move to an entirely new platform (node.js/socket.io), you CAN implement websockets with PHP. Take a look at the Thruway project, which is a PHP implementation of WAMP (Web Application Messaging Protocol). It simplifies getting websockets working with PHP and provides SubPub and RPC. I'm one of the developers of Thruway, so if you have any questions or need help getting something working, you can open an issue on github. If you want to read more about WAMP, here's a good place to get started. Also, php-cgi is designed to be run by your web server. Check and see if XAMPP has a php-cli.exe or a plain old php.exe and use that instead.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26212032

http://stackoverflow.com/comment/41274590
type: AnswerComment
score: 0
type: Comment
has text: I thought I've read _pickles_ somewhere here. Now it disappeared.
comment on: http://stackoverflow.com/a/26303060

http://stackoverflow.com/comment/41095033
has text: http://grooveshark.com/#!/album/Halo+LP/5904939 how does this website has the border normal ?
score: 0
comment on: http://stackoverflow.com/a/26203882
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26316042
has comment: http://stackoverflow.com/comment/41298431
tagged with: javascript
has answer: http://stackoverflow.com/a/26316587
tagged with: post
score: 0
has body: New to rails and ajax. I created a little web app where the user can simply count their steps, pressing a button. Once completed, the user click submit and the number of steps are being saved. This all works great on my pc. However, when I try this on mobile, the number of steps are not being saved. And I can't figure out why this is. My code looks like this: $(document).ready(function(){ var index = 0; function resetcounter() { index = 0; document.getElementById("button1").value = index; } function count(){ index += 1; document.getElementById('button1').value=index; } $('#button1').click(function() { count(); }); $('#resetButton').click(function() { resetcounter(); }); $('#submitButton').click(function(e){ e.preventDefault(); e.stopImmediatePropagation(); $.ajax({ url : "/steps", type: "POST", data: { step: { stepcount: index } }, success: function( data, textStatus, jQxhr ){ $('#response pre').html( data ); }, error: function( jqXhr, textStatus, errorThrown ){ console.log( errorThrown ); } }); window.location = '/steps'; }); }); Count your steps Submit Reset
tagged with: mobile
answer count: 1
has comment: http://stackoverflow.com/comment/41298249
tagged with: jquery
has title: Ajax post call not working on mobile
tagged with: ajax
has comment: http://stackoverflow.com/comment/41298864
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41299141
has comment: http://stackoverflow.com/comment/41313349
accepted answer: http://stackoverflow.com/a/26316587
type: Question

http://stackoverflow.com/q/26330559
upvote count: 1
has comment: http://stackoverflow.com/comment/41325200
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1068834
accepted answer: http://stackoverflow.com/a/26330605
has answer: http://stackoverflow.com/a/26330613
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/26330613
answer count: 2
downvote count: 0
has title: Why is the object not found in the array with indexOf
tagged with: javascript
has comment: http://stackoverflow.com/comment/41325388
linked to: http://stackoverflow.com/q/8618200
linked to: http://stackoverflow.com/q/237104
has comment: http://stackoverflow.com/comment/41325594
has comment: http://stackoverflow.com/comment/41326409
has answer: http://stackoverflow.com/a/26330605
duplicate of: http://stackoverflow.com/q/8618200
favorite count: 0
has comment: http://stackoverflow.com/comment/41325043
has comment: http://stackoverflow.com/comment/41325076
has body: When I search for the object literal below I get for index -1 but I do not understand why. Can I not use complex types like object literal to search for this object in the array? var fruits = [{name: "Banana"}, {name: "Orange"}]; var index = fruits.indexOf({name: "Banana"});

http://stackoverflow.com/a/77770224
has comment: http://stackoverflow.com/comment/137111563
answers question: http://stackoverflow.com/q/26229222
score: -3
downvote count: 3
has body: #BEST MATCHED ANSWER //Function Definition of require() function require(exports,require,module,__filename,__dirname) { //Every program of js is wrap in this function }
upvote count: 0
type: Answer

http://stackoverflow.com/comment/41219513
type: Comment
has text: I will keep it in mind :D Maybe when I learn more I will be able to see what you mean
comment on: http://stackoverflow.com/a/26272877
type: AnswerComment
score: 0

http://stackoverflow.com/q/26330775
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26335635
has body: I'm trying to make the X and Y axes of my chart intersect at 0, always. Currently, I'm intercepting the 'load' event and then changing the offset of the axes which works initially, but when the window is resized or the chart is zoomed in, the axes don't update. How can I keep the axes centred on 0 even when the window is resized or the chart zoomed? Here's my fiddle and code: http://jsfiddle.net/a003mc4b/ $(function () { $('#container').highcharts({ chart: { type: 'scatter', zoomType: 'xy', events: { load : function() { this.xAxis[0].update({ offset: -this.yAxis[0].translate(0) }); this.yAxis[0].update({ offset: -this.xAxis[0].translate(0) }); } }, }, title: { text: 'X and Y axis should intersect at 0' }, yAxis: { lineColor: '#FF0000', lineWidth: 1 }, xAxis: { lineColor: '#FF0000', lineWidth: 1 }, series: [{ data: [[0,0],[1,1],[2,5],[-1,-5],[0,5]] }] }); });
score: 1
favorite count: 0
tagged with: axes
upvote count: 1
has title: Highcharts: make the X and Y axes intersect at 0
has answer: http://stackoverflow.com/a/26335635
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26333357
type: Question
possible better answer: http://stackoverflow.com/a/26333357
answer count: 2
tagged with: highcharts

http://stackoverflow.com/comment/41132039
type: AnswerComment
comment on: http://stackoverflow.com/a/26224313
type: Comment
has text: sorry brother, I change: [new create json](https://gist.github.com/anonymous/132411a0e0a13e5801fe) - [new php](https://gist.github.com/anonymous/42196824df3d49cd6f64) - [list json](http://www.crmdistribuidora.com.br/monitoramento/site/gera_json_coordenadas.php) - but it is not solving, am I doing something wrong?
score: 0

http://stackoverflow.com/comment/41262238
type: Comment
comment on: http://stackoverflow.com/a/26282795
has text: It couldn't be possible if the "targetPath" covers all the relative path of the domain. For example, if your targetPath is **"com/cms/anything/spots"**: domain.com/cms/anything/spots can exists only once. But if you don't cover all the relative path, for example with a targetPath **"anything/spots"**: domain.com/section1/anything/spots and domain.com/section2/anything/spots -> The if statement will result in true in both cases
score: 0
type: AnswerComment

http://stackoverflow.com/q/26343071
score: 0
has comment: http://stackoverflow.com/comment/41348123
has comment: http://stackoverflow.com/comment/41348071
has comment: http://stackoverflow.com/comment/41348227
tagged with: http://stackoverflow.com/tag/html
has body: I have the following HTML generated by javascript: ' '+ ' '+ ' '+ ' ' + ' '+ ' '+ ' '+data['stats']['average_score']+''+ ' 1'+ ' Gennemsnitlig score '+ ' '+ ' '+data['stats']['average_modules_taken']+''+ ' Antal moduler taget 2'+ ' '+ ' '+ ' '+data['academy_completed']+''+ ' '+data['academy_completed']+''+ ' Gennemførte akademier '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+data['category']+''+ ' Beste kategori'+ ' '+ ' '+ ' '+data['type']['type_name']+ ''+ ' Beste modul type'+ ' '+ ' '+ ' Se mere'+ ' '+ ' '+ ' '+ ' ' When i run this on my local machine it results in the following: However when i run the EXACT same code on my server i get the following:
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41348020
has comment: http://stackoverflow.com/comment/41348277
has comment: http://stackoverflow.com/comment/41348050
answer count: 0
has comment: http://stackoverflow.com/comment/41347961
has comment: http://stackoverflow.com/comment/41348401
has comment: http://stackoverflow.com/comment/41348068
has title: HTML interpreted in a different way on server
type: Question
has comment: http://stackoverflow.com/comment/41348314
has comment: http://stackoverflow.com/comment/41348062
tagged with: javascript
has comment: http://stackoverflow.com/comment/41348191

http://stackoverflow.com/comment/41203952
type: QuestionComment
has text: You have to redirect "some.json" to "some.php" at your web server (while keeping some.json in browser URL). I think it can be done by configuring .htaccess file.
comment on: http://stackoverflow.com/q/26264521
score: 0
type: Comment

http://stackoverflow.com/a/26242456
has comment: http://stackoverflow.com/comment/41168665
score: -1
has comment: http://stackoverflow.com/comment/41164685
has comment: http://stackoverflow.com/comment/41164710
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/26241876
has body: Have you tried : http://jsfiddle.net/dhyjwg4L/ Just tested in IE 10 / 11, don't have an IE9 machine to hand. $(document).ready(function () { alert($("#promo-form :input").length); }); If you didn't want textareas / buttons remove the : before the input, and they wont be counted. $('#promo-form').find(':input'); //Combine the selector to make $("#promo-form :input") UPDATE : Have now tested this on IE 8-11, and is working on all of them.
upvote count: 0

http://stackoverflow.com/q/26328658
has comment: http://stackoverflow.com/comment/41321394
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1873983
has comment: http://stackoverflow.com/comment/41321313
accepted answer: http://stackoverflow.com/a/26328716
downvote count: 3
upvote count: 1
duplicate of: http://stackoverflow.com/q/1873983
type: Question
score: -2
linked to: http://stackoverflow.com/q/7145514
has comment: http://stackoverflow.com/comment/41321420
has answer: http://stackoverflow.com/a/26328716
duplicate of: http://stackoverflow.com/q/7145514
answer count: 1
has title: what does the semikolon mean at the begining of this function?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41321314
favorite count: 0
linked to: http://stackoverflow.com/q/7365172
has body: what kind of code is that? what does the semikolon mean at the begining of this function? ;(function ( $, window, document, undefined ) what is the purpose to write function like that? creatorHashChanged: function(event) {} what does "extend" mean here ? $.extend( {}, defaults, options ); The complete code: ;(function ( $, window, document, undefined ) { function Plugin( options ) { this.options = $.extend( {}, defaults, options ); this._defaults = defaults; this._name = pluginName; this._tour = defaults.tour; if(this.options.delete) this.tourdate_delete(true); else this.init(); } Plugin.prototype = { init: function() { }, creatorHashChanged: function(event) { }, exitCreator: function() { }, })( jQuery, window, document );

http://stackoverflow.com/comment/41116370
has text: @MarkZucchini: Exactly, hence you are confusing an IIFE with jQuery.
comment on: http://stackoverflow.com/q/26217100
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26350516
tagged with: angularjs
has title: Express JS not sending JSON in response to post request
accepted answer: http://stackoverflow.com/a/26353108
tagged with: node.js
score: 0
type: AnsweredQuestion
has body: I'm writing a little AngularJS app that's communicating with an ExpressJS backend for JSON. My server.js file looks like: var express = require('express'), app = express(); //Express 4 app.use(express.static(__dirname, '/')); app.get('/questions', function(req, res) { res.json(questions); }); app.post('/new_question', function(req, res){ res.json(req.body); //questions.unshift(req.body); }); app.listen(8080); When I: curl -H "Content-Type: application/json" -d '{text: "text", votes: 0 }' localhost:8080/new_question I get nothing back. What am I missing here? I feel like it must be something exceptionally dumb.
has comment: http://stackoverflow.com/comment/41362222
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41361506
has answer: http://stackoverflow.com/a/26353108
type: Question
answer count: 1
tagged with: javascript
tagged with: express

http://stackoverflow.com/comment/41106206
type: Comment
score: 0
has text: You never know how old user's browser is and the topicstarter didn't said which one is in use and how big the bunch of data have to be sent is. But according to user2049768's answer the advice works. However I apologize for possible misleading.
type: AnswerComment
comment on: http://stackoverflow.com/a/26211019

http://stackoverflow.com/comment/41336660
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26336505
type: Comment
has text: @D.Singh: That's why I use it. Cleaner than injecting a Javascript variable value into pages (which is another option) :)

http://stackoverflow.com/comment/41261758
type: Comment
comment on: http://stackoverflow.com/q/26295762
type: QuestionComment
has text: Yes, for security reasons the browser does not allow that. *www* is a sub-domain of *.one.com* but *.one.com* can delete any cookies from the sub-domains because it's the main domain name. I think there is a problem with the google script because of the domain redirection from without *www.* to *www.* and the cookie is set for both domains.
score: 0

http://stackoverflow.com/a/26275650
score: 1
downvote count: 0
has body: This should do it. function validatePassword(pw) { if (pw.length &lt; 7 || pw.length &gt; 16) return false; var lastChar = pw.charAt(0); var maxCount = 1; for (var i = 1; i &lt; pw.length; i++) { if (pw.charAt(i) == lastChar) maxCount++; else maxCount = 1; lastChar = pw.charAt(i); if (maxCount == 3) return false; } return true; }
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26275074

http://stackoverflow.com/q/26313001
answer count: 1
tagged with: jquery
tagged with: zooming
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26313969
type: Question
tagged with: javascript
has body: Need help! Is it possible to center this network tree http://bvusolutions.com/tree2.html after loading the page? I would also like to fit this inside a 960px width div to avoid scrolling and have zoom function. Every time I add another list or level the page gets larger. Thanks in advance.
score: 0
has title: How to fit and center css family tree inside a div with zoom function

http://stackoverflow.com/q/26211498
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: jquery
has body: In a web page I use jquery to style javascript alerts and add a virtual keyboard (which gets its position on screen with JqueryUI). Everything works just fine. However, if I add &lt;meta name="viewport" content="width=device-width" /&gt; in the HTML head, both popups (Jquery alert and virtual keyboard) are positioned wrong. When adding meta viewport, should I first get the screen resolution with javascript? Or should I get the window height/width with JQuery? If I do this, will these two popups automatically know how to position themselves, like they do when no meta viewport is added? Thank you!
tagged with: http://stackoverflow.com/tag/html
tagged with: meta-tags
favorite count: 0
type: Question
upvote count: 1
has title: Positioning elements with meta name="viewport" active
tagged with: jquery-ui

http://stackoverflow.com/q/26289344
favorite count: 0
has comment: http://stackoverflow.com/comment/41249974
tagged with: blogs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41324891
has answer: http://stackoverflow.com/a/26289408
has comment: http://stackoverflow.com/comment/41267515
has body: I am trying to create a blog site and use time ago to create a relative time stamp to when the a post is created. I have it working but the time does not update automatically or at all for a fact Does anyone know how to get it to update automatically Here is my code: msgDate = jQuery.timeago(new Date()); $("#centerDiv").prepend("&lt;div id='postInner'&gt;&lt;div id='timeStamp'&gt;" + msgDate + "&lt;/div&gt;&lt;/div&gt;")
has title: How to get timeago.js to update automatically
upvote count: 3
has comment: http://stackoverflow.com/comment/41253611
tagged with: timeago
type: Question
score: 3
has comment: http://stackoverflow.com/comment/41306409
has comment: http://stackoverflow.com/comment/41328137
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41250335
tagged with: javascript

http://stackoverflow.com/q/26335076
favorite count: 0
has answer: http://stackoverflow.com/a/26335164
has comment: http://stackoverflow.com/comment/41333464
type: Question
has comment: http://stackoverflow.com/comment/41333674
score: -2
accepted answer: http://stackoverflow.com/a/26335164
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/26335766
has answer: http://stackoverflow.com/a/26335766
tagged with: javascript
has comment: http://stackoverflow.com/comment/41341684
downvote count: 4
has title: Math.ceil not working with negative floats
has comment: http://stackoverflow.com/comment/41333527
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41334934
has body: I am trying to create a RoundUp function with help of Math.ceil it working fine with positive number but do not round up the negative numbers Here is what i am trying var value = -12.369754; --&gt; output = -12 // make value = 12.369754; and out put will be 13 var decimalPoints = 0; if (decimalPoints == 0) { value = Math.ceil(parseFloat(value)); } console.log(value); Here is the Fiddle http://jsfiddle.net/n7ecyr7h/ Why This function? I need to create a function in which user will give a number and decimal points upto which he wants to round the number The RoundUp function will roundUp the given value to a given number of decimal points For example if user enters 12.12445 and wants to roundUp to 3 decimal points the output will be 12.125 Here is a table of required outputs with 2 decimal points **Input** **output** 1.2369 1.24 1.2869 1.29 -1.1234 -1.13 -1.17321 -1.18 And here is the Updated Fiddle with original JS code http://jsfiddle.net/n7ecyr7h/1/

http://stackoverflow.com/a/26337393
has comment: http://stackoverflow.com/comment/41340962
has comment: http://stackoverflow.com/comment/41343730
has comment: http://stackoverflow.com/comment/41338739
upvote count: 1
has body: I see this in Docs: Only available on GET. The returned content type MUST be application/javascript . Also check JSONP enabled
score: 1
has comment: http://stackoverflow.com/comment/41342790
has comment: http://stackoverflow.com/comment/41342168
has comment: http://stackoverflow.com/comment/41344140
downvote count: 0
has comment: http://stackoverflow.com/comment/41343226
answers question: http://stackoverflow.com/q/26335594
type: Answer
has comment: http://stackoverflow.com/comment/41342406
has comment: http://stackoverflow.com/comment/41342531

http://stackoverflow.com/comment/41167488
has text: I'm not seeing anything explicitly labeled Origin...through there is a label called Referer which holds the url of the client making the call
comment on: http://stackoverflow.com/q/26244059
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41287881
score: 3
has text: Shouldn't the first condition be `bmi < 18.5`?
comment on: http://stackoverflow.com/q/26310265
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26345441
has comment: http://stackoverflow.com/comment/41352274
type: AnsweredQuestion
has body: I have a problem when I try to add a class in the catch statement. When I click the button to confirm, javascript show me the error with the class successfully added, but when I reclick the button, without refreshing the page, the class added is no longer present. function catchclass(){ var result, x; result = document.getElementById("result"); result.innerHTML = ""; x = document.getElementsByTagName("input")[0].value; try { if(x == "") throw "is Empty"; } catch(err) { result.innerHTML = "Input " + err; result.className += 'error'; } } p.error { background: red; padding: 10px; } Test Input
accepted answer: http://stackoverflow.com/a/26345546
has answer: http://stackoverflow.com/a/26345538
type: Question
has comment: http://stackoverflow.com/comment/41352405
tagged with: javascript
tagged with: try-catch-finally
has answer: http://stackoverflow.com/a/26345544
score: 0
has comment: http://stackoverflow.com/comment/41352546
answer count: 3
has title: Add a class to the catch statement
has comment: http://stackoverflow.com/comment/41352391
possible better answer: http://stackoverflow.com/a/26345544
has answer: http://stackoverflow.com/a/26345546

http://stackoverflow.com/comment/41107428
type: Comment
type: QuestionComment
has text: @Amal Your suggestion will work of course, but I don't need anything else of the document. My suspicion would be that creating an html doc and looking for the title is much more overhead than the regex approach. Correct me please if I am wrong.
comment on: http://stackoverflow.com/q/26212128
score: 0

jquery-file-upload
tags question: http://stackoverflow.com/q/26283681
tags question: http://stackoverflow.com/q/26282001
type: Tag
tag name: jquery-file-upload

http://stackoverflow.com/comment/41174405
has text: thanks, I found out the problem.
type: Comment
comment on: http://stackoverflow.com/q/26247769
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41251951
comment on: http://stackoverflow.com/q/26290486
has text: And when there is no space?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41199473
score: 0
type: Comment
type: QuestionComment
has text: You're not *moving* it by 10px, you are *setting* it to 10px. You have to get the current position and *add* 10 to it.
comment on: http://stackoverflow.com/q/26262151

http://stackoverflow.com/q/26350447
has comment: http://stackoverflow.com/comment/41361407
type: AnsweredQuestion
upvote count: 0
has title: Code Mysteriously Stops Working
has comment: http://stackoverflow.com/comment/41361404
has answer: http://stackoverflow.com/a/26350553
has comment: http://stackoverflow.com/comment/41361387
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/26350553
has body: This code worked fine for about a week (much longer before that as well, however I've since then greatly improved the internal function). It's not complex to read, but for some reason yesterday, it stops working. I didn't change anything to this portion of the code and have kept this portion of the script separated into it's own script tag at the bottom of the file with all of the HTML id's staying exactly the same (this gigantic table sorta stands out in the source file so it's easy to avoid)... Anybody else experience something like this? If anybody see's anything obvious, let me know... window.addEventListener("load", function () { function Kill_Count(id,totalDeaths) { var deathsPerSecond = totalDeaths/365/24/60/60/4; var deaths = 0, result; var timer = 1; setInterval(function() { deaths = deathsPerSecond*timer; result = deaths.toFixed(); document.getElementById(id).value = result; timer++; }, 250); } var killnum = "23199336 1501799 301275455 49877536490 2676365000 402611664 5018470 1375940758 564785251 635382008"; killnum = killnum.split(" "); for (var i = 1; i <= 10; i++) { var num = i-1; var temp = killnum[num]; Kill_Count('Kill_Count'+i,Number(temp)); } }); Buffalo Camels Cattle Chickens Ducks Goats Horses Pigs Sheep Turkeys
has comment: http://stackoverflow.com/comment/41361410
tagged with: http://stackoverflow.com/tag/html
score: -11
downvote count: 11
has comment: http://stackoverflow.com/comment/41361805
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41174980
type: Comment
score: 0
type: AnswerComment
has text: That depends, I thought greasemonkey scripts were a separate sandbox. Using the Add-on SDK you can clone objects into content safely now, see [this](https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/). As far as the scope of the console is concerned, that's some devtools magic that handles console commands and utilities like clear() and $$ correctly.
comment on: http://stackoverflow.com/a/26247688

http://stackoverflow.com/q/26238086
possible better answer: http://stackoverflow.com/a/38309175
accepted answer: http://stackoverflow.com/a/26238166
linked to: http://stackoverflow.com/q/17907445
has answer: http://stackoverflow.com/a/26238147
tagged with: http://stackoverflow.com/tag/html
has body: I have tried using the following script [if IE] &lt;script type="text/javascript"&gt; window.location = "error.html"; &lt;/script&gt; [endif] It works like a treat apart from the fact that other browsers such as Chrome are also redirecting to the error.html page. What is wrong with it? Thanks
favorite count: 0
upvote count: 2
tagged with: http-redirect
tagged with: css
answer count: 4
score: 2
type: AnsweredQuestion
tagged with: internet-explorer
has title: How to redirect Internet Explorer users to a new page?
has answer: http://stackoverflow.com/a/26238148
has answer: http://stackoverflow.com/a/26238166
type: Question
has answer: http://stackoverflow.com/a/38309175
has comment: http://stackoverflow.com/comment/41155202
has comment: http://stackoverflow.com/comment/41155269
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41250968
type: QuestionComment
comment on: http://stackoverflow.com/q/26290025
score: 0
has text: Check if the first element (response[0]) is an array or not. If it's an array, then you know the response is a multidimensional array.
type: Comment

http://stackoverflow.com/q/26339396
has comment: http://stackoverflow.com/comment/41378607
tagged with: http://stackoverflow.com/tag/html
has body: Here is the JSFiddle example of table I'm using. I'm getting ID of selected row using window.id. So I need to code a function so that when the user wants to move row 51 to row 3. (user click on row 51 and then clicking on button UP it moves row by one row up until row 51 is on position 3). I also need to all rows to dynamically renumber when clicking on button UP or DOWN button.
tagged with: datatable
answer count: 0
has comment: http://stackoverflow.com/comment/41341956
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41342182
type: Question
has comment: http://stackoverflow.com/comment/41341119
has title: Moving Rows Up and Down in DataTables using buttons in toolbar
has comment: http://stackoverflow.com/comment/41343373
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41341729
score: 0

http://stackoverflow.com/comment/41244966
has text: Last I checked, there were no client-side JavaScript libraries for generating a PDF (although that may very well have changed since then). As far as I know, you'd have to set up a web service that takes the HTML (or gets it via the URL of the page to convert), converts it to a PDF, and then streams it back to the client. That's the approach we used, anyway.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26286417
type: AnswerComment

http://stackoverflow.com/comment/41263394
type: Comment
type: QuestionComment
has text: yes @RichardParnaby-King - it should be true ... because a=c=1.... so it should return true
score: 0
comment on: http://stackoverflow.com/q/26296611

http://stackoverflow.com/q/26274282
has body: I'm trying to write code that will display a grid when a link is clicked, and I managed to get the link display, but failing to get grid displayed at the bottom of the page. Thanks for your help. * export function setCustomLinkContent(divId: string, field: propertybox.Field) { var container = $('#' + divId); container.height(70); container.width(260); container.append(" View all works "); this.container.prepareGridContainer(); var gridContainer = $("#" + this.container); var gridContHeight = gridContainer.height() - 27 - 43; var workHtml = " " + " " + this.headerLabel + " " + " " + " " + " " + " " + " " + " " + " " + " " + " "; gridContainer.append(workHtml); } *
answer count: 1
has answer: http://stackoverflow.com/a/26276116
has comment: http://stackoverflow.com/comment/41224130
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41224514
tagged with: typescript
has comment: http://stackoverflow.com/comment/41224320
has title: Display a grid from a clicked link using typescript
has comment: http://stackoverflow.com/comment/41223410
type: Question
has comment: http://stackoverflow.com/comment/41223199
tagged with: javascript
has comment: http://stackoverflow.com/comment/41222651
tagged with: jquery
score: 0

http://stackoverflow.com/a/26197527
type: Answer
has body: Alerts and the others take callback functions on creation, https://github.com/alertifyjs/alertify.js/blob/0.3.12/src/js/alertify.js#L608. You don't need to attach another event listener, just give it the function you want it to execute. example below: alertify.alert("alerttext", function(e) { functionIWantToCall(); });
has comment: http://stackoverflow.com/comment/41080476
accepted answer of: http://stackoverflow.com/q/26197463
answers question: http://stackoverflow.com/q/26197463
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41079954
has comment: http://stackoverflow.com/comment/41080419

http://stackoverflow.com/comment/41327947
has text: @GarrettMaring If you agree, please click **correct answer**
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26331958
type: AnswerComment

http://stackoverflow.com/comment/41254283
comment on: http://stackoverflow.com/a/26291911
score: 0
type: AnswerComment
type: Comment
has text: Just create php file mailer.php

http://stackoverflow.com/a/26295449
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26294999
answers question: http://stackoverflow.com/q/26294999
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Something like that: HTML &lt;div id="images"&gt; &lt;div class="img img1"&gt; &lt;img data-gif_src="http://38.media.tumblr.com/tumblr_mdnaeqwmTr1rtuulro1_250.gif" src="http://i.dailymail.co.uk/i/pix/2011/12/25/article-2078552-0F44CB3D00000578-206_468x331.jpg"/&gt; &lt;/div&gt; &lt;/div&gt; CSS #images .img { width: 200px; height: 150px; } #images .img img { width: 200px; height: auto; } JS $('#images .img img').mouseenter(function(){ $(this).data('img_src', $(this).attr('src') ); $(this).attr('src', $(this).data('gif_src') ); }).mouseleave( function(){ $(this).attr('src', $(this).data('img_src') ); }); on jsfiddle
has comment: http://stackoverflow.com/comment/41312350
score: 4

http://stackoverflow.com/comment/41314258
comment on: http://stackoverflow.com/q/26324806
has text: this sounds like an `X-Y` problem. Start by explaining use case
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/41270772
answers question: http://stackoverflow.com/q/26206688
has body: Starting with IE10, the child mode can be different from the parent. See this link. It says... IE9 mode displays the child frame in standards mode (because the parent document is in standards mode). Starting with Internet Explorer 10, however, child frames can emulate quirks mode. For more info, see IEBlog: HTML5 Quirks mode in IE10. For best results, however, use document modes consistently.
downvote count: 0
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/a/26310845
has body: I solved this problem by using an event trigger 'input'. 'input' event detect change of input even if do not lose the focus from input field. ('change' effects only when input field loses focus)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26279679

http://stackoverflow.com/comment/41251905
type: QuestionComment
has text: Just on a side note: The click event doesn't work at all in Firefox. Chrome fine though.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26290435

http://stackoverflow.com/comment/41391909
type: QuestionComment
comment on: http://stackoverflow.com/q/26350599
has text: Yes, calling a callback multiple times does not seem desired. There will be an easy fix while still using `async`. Post some more code to help narrow possibilities.
score: 0
type: Comment

http://stackoverflow.com/comment/41237861
score: 0
type: Comment
type: QuestionComment
has text: The fiddle shows a swinging element using CSS animation, your question implies animation using Javascript. Also, your fiddle does not replicate the issue you are describing.
comment on: http://stackoverflow.com/q/26282242

http://stackoverflow.com/a/26245537
answers question: http://stackoverflow.com/q/26245033
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: Yes, the problem is in GetResponseSynchronously. Polling for completion is a very questionable approach. There are a couple of ways to solve this. One is to throw out the FatSearch CSharp library and use HttpClient to write to their JSON API. This approach is cleaner, but means you'll have to write more code. The other approach is to wrap the sort-of-EBAP APIs from FatSearch CSharp as async-compatible methods. In this case, the important members are GotResult, GotError, and StartRequestAsync. Note that your web method will become async.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41268066
accepted answer of: http://stackoverflow.com/q/26245033

http://stackoverflow.com/comment/41111053
has text: You forgot to add two ways to your list of options: `$('.elementA', '.parent')` and `$('.parent .elementA')`
score: 0
comment on: http://stackoverflow.com/q/26214560
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26327131
type: Answer
has body: This worked best for me: var $d = $('.thumbs'); var $p = $('.col-sm-3:gt(3)', $d); if ($p.length) { $('&lt;div class="row thumbs"&gt;').insertAfter($d).append($p); $('&lt;hr class="divider"&gt;').insertAfter($d); }
has comment: http://stackoverflow.com/comment/41318570
score: 0
answers question: http://stackoverflow.com/q/26326551

http://stackoverflow.com/a/26279716
score: 0
has body: You have to stop the event bubble. Check the code. $(document).ready(function () { $(".shortlistProperty").hide(); $(".mySearchProperty").hide(); $(".NoViews").click(function (e) { $('.shortlistProperty').toggle(); $('.mySearchProperty').hide(); e.stopPropagation(); }); $('.shortlistProperty').click(function (e) { e.stopPropagation(); }); $(".closeShortlist").click(function (e) { $('.shortlistProperty').toggle(); e.stopPropagation(); }); $(".searchView").click(function (e) { $('.mySearchProperty').toggle(); $('.shortlistProperty').hide(); e.stopPropagation(); }); $(".closemySearch").click(function (e) { $('.mySearchProperty').toggle(); e.stopPropagation(); }); $('body').click(function (e) { $('.shortlistProperty').hide(); }); });
type: Answer
answers question: http://stackoverflow.com/q/26279575
has comment: http://stackoverflow.com/comment/41256018
has comment: http://stackoverflow.com/comment/41231816
has comment: http://stackoverflow.com/comment/41231570
accepted answer of: http://stackoverflow.com/q/26279575
type: AcceptedAnswer

http://stackoverflow.com/comment/41109464
comment on: http://stackoverflow.com/q/26213750
score: 2
type: Comment
type: QuestionComment
has text: `$('.thatImage').load(function(){ //code here });`

python
tags question: http://stackoverflow.com/q/26230071
tags question: http://stackoverflow.com/q/26268934
tags question: http://stackoverflow.com/q/26259623
tags question: http://stackoverflow.com/q/26236780
tag name: python
tags question: http://stackoverflow.com/q/26247733
tags question: http://stackoverflow.com/q/26323922
tags question: http://stackoverflow.com/q/26241645
tags question: http://stackoverflow.com/q/26245476
tags question: http://stackoverflow.com/q/26287101
tags question: http://stackoverflow.com/q/26341842
tags question: http://stackoverflow.com/q/26348724
tags question: http://stackoverflow.com/q/26340326
type: Tag
tags question: http://stackoverflow.com/q/26341696
tags question: http://stackoverflow.com/q/26303529
tags question: http://stackoverflow.com/q/26322565
tags question: http://stackoverflow.com/q/26320253
tags question: http://stackoverflow.com/q/26334107
tags question: http://stackoverflow.com/q/26275881
tags question: http://stackoverflow.com/q/26240681
tags question: http://stackoverflow.com/q/26307897
tags question: http://stackoverflow.com/q/26305074
tags question: http://stackoverflow.com/q/26309878
tags question: http://stackoverflow.com/q/26226220
tags question: http://stackoverflow.com/q/26341294
tags question: http://stackoverflow.com/q/26247916
tags question: http://stackoverflow.com/q/26311221
tags question: http://stackoverflow.com/q/26339605

http://stackoverflow.com/q/26203729
accepted answer: http://stackoverflow.com/a/26205886
tagged with: javascript
score: 0
tagged with: pug
answer count: 1
has body: I'm Looking to build a loop that will show all of my members with a collapse card. I looked around for code that did something similar and I found something like the &lt;% index+1 %> tags like below but if they work I don't know the Jade syntax. each user, index in currentUsers .col-lg-12 #accordion.panel-group #panel1.panel.panel-default .panel-heading h4.panel-title a(data-toggle='collapse', data-target='#collapse&lt;%= index+1 %&gt;', href='#collapse&lt;%= index+1 %&gt;') h1 #{user.Name} #collapse&lt;%= index+1 %&gt;.panel-collapse.collapse.in .panel-body ....
has title: using an each index loop to create collapsable menus with jade
tagged with: twitter-bootstrap
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26205886
type: Question

http://stackoverflow.com/q/26253234
has answer: http://stackoverflow.com/a/26253292
has title: Only run function if the elements are found on the page?
has answer: http://stackoverflow.com/a/26253286
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26253286
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26253290
score: 0
has answer: http://stackoverflow.com/a/26253290
answer count: 3
has comment: http://stackoverflow.com/comment/41182979
tagged with: jquery
has body: How can I run this code only if the elements are found on the page? This function runs great on my home page where the function is needed; however, on other pages, where the function is not needed, the console produces cannot read property .top of undefined... errors in the console because, I'm assuming, the elements aren't found on the page. $('.play').click(function( e ){ e.preventDefault(); $('html, body').animate({ scrollTop: $("#music").offset().top - ( $(window).width() &lt; 450 ? 112 : 60 ) }, 500); $('.play').fadeOut(function() { $('.music-home').fadeIn('slow'); }); });

http://stackoverflow.com/a/26308098
has body: It seems you have to do a workaround to make it work, but it is possible. As you can see in this topic, you need to have overflow: auto; in parent, and position: fixed; in child. This may be a problem later, but no other position setting works in this scenario, so let's hope it won't be. Here's the working fiddle
type: Answer
has comment: http://stackoverflow.com/comment/41304677
downvote count: 0
answers question: http://stackoverflow.com/q/26307802
score: 1
accepted answer of: http://stackoverflow.com/q/26307802
has comment: http://stackoverflow.com/comment/41338875
has comment: http://stackoverflow.com/comment/41284937
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26271993
has body: I am puzzled about this. I have two XMLHttpRequests that operate on Select elements of my HTML file (each one operates on a different Select element right when the HTML file is loaded). I am using a callback function as was recommended on W3CSchools. If my variable xmlHttp is defined outside of my callback function, only the second request works, and the first one gets deleted before it has a chance to finish. If I put 'var' in front of it the same thing happens. However, if my variable is inside the function with 'var' in front of it, then absolutely nothing happens. I have narrowed it down to where to the line that says "HERE!!!!!" is where the program seems to hang. I know the loadXMLDoc function does not actually finish because when I put an alert outside of it, nothing happens. I am supposing it has something to do with the 'if' part and the program not being able to recognize xmlHTTP, even though it was locally defined. I am still pretty new to JavaScript and just want to be able to run multiple XMLHttpRequest objects at once without them getting in each other's way but also without the page hanging. Any ideas why this does not work? HTML: Select a State Select a State JavaScript:
has comment: http://stackoverflow.com/comment/41218945
accepted answer: http://stackoverflow.com/a/26272487
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41219685
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/41218662
has title: Multiple XMLHttpRequests not working
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26272487
score: 1
has comment: http://stackoverflow.com/comment/41218503
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41209343
has text: This code is just waiting to be exploited with SQL injection the way that you've implemented it. http://php.net/manual/en/security.database.sql-injection.php
type: QuestionComment
type: Comment
score: 4
comment on: http://stackoverflow.com/q/26267324

http://stackoverflow.com/comment/41186056
comment on: http://stackoverflow.com/q/26254944
has text: can you share your html code also
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26267739
has body: There is no 'generic' way to load javascript library only once. When a javascript is loaded, it's executed and injected directly into the global domain, and there would be no 'generic' trace you can track it down. It's more of the remote javascript's responsibility to make sure that itself cannot be loaded more than once. There are, however, clever tricks that can be done here. Instead of loading the the javascript directly using the script tag, use a init() function to 'inject' the dependencies, and there you have a chance to verify if the script has been loaded or not. For example, if you use jQuery, do something like this: var jsCache = {}; function init() { if (jsCache[myJavascript]) { return; } $.getScript("my_javascript.js").done( function() { jsCache[myJavascript] = true; } } init(); Not perfect, but should serve the purpose. If possible, use requiejs (http://requirejs.org/docs/whyamd.html), but yes, you have to modularize your scripts into AMD modules.
answers question: http://stackoverflow.com/q/26267609
score: 0
type: Answer

http://stackoverflow.com/q/26275255
score: 0
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/41227400
has comment: http://stackoverflow.com/comment/41228783
has answer: http://stackoverflow.com/a/26278579
has comment: http://stackoverflow.com/comment/41227890
has body: I've been struggling with some jquery and php. I have some data I receive from, one of the input from php is put in a class like this: <span class="<?php echo $row1['Tag']; ?>"> I can see the class is add'ed to the DOM as excepted. I want to use the class in a checkbox filter function with jquery and jquerymobile. This is were I get the checkbox input: Menu Søg Vælg Virksomheder: It Maskin Design Elektro My html were I input the php looks like this: h <?php mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die("Unable to specified database"); //MySQL Query to read data $result1 = mysql_query("select * from Company"); while ($row1 = mysql_fetch_array($result1, MYSQL_ASSOC)) { ?> <?php echo $row1['CompanyName']; ?> <?php echo ' ';?> Fagområde: <?php echo $row1['CompanyField']; ?> Telefon: <?php echo $row1['ContactPhone']; ?> Email: <?php echo $row1['ContactEmail']; ?> <?php echo ' ';?> Beskrivelse: <?php echo $row1['CompanyDetail']; ?> <span class="<?php echo $row1['Tag']; ?>">Søger: <?php echo $row1['Tag']; ?> <?php } ?> <?php mysql_close(); // Closing Connection with Server ?> and my jquery look like this: $(document).ready(function () { $('.results').show(); $('div.tags').find('input:checkbox').on('click', function () { $('.results').hide(); $('div.tags').find('input:checked').each(function () { $('.doh > span.' + $(this).attr('rel')).show(); }); }); }); I can hide my content with the $('.results').hide(); but it doesn't filter and show my content afterward as I try to with: $('div.tags').find('input:checked').each(function () { $('.doh > span.' + $(this).attr('rel')).show(); }); Any feedback would be appreciated.
has comment: http://stackoverflow.com/comment/41228948
has comment: http://stackoverflow.com/comment/41224095
has comment: http://stackoverflow.com/comment/41227702
has comment: http://stackoverflow.com/comment/41227768
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41224238
has comment: http://stackoverflow.com/comment/41228063
has comment: http://stackoverflow.com/comment/41224473
accepted answer: http://stackoverflow.com/a/26278579
type: Question
has comment: http://stackoverflow.com/comment/41224281
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41224756
tagged with: css
has title: Checkbox not filtering as expected with jquery and php

http://stackoverflow.com/a/26313236
upvote count: 2
answers question: http://stackoverflow.com/q/26306762
downvote count: 0
type: Answer
has body: As @Mike says, they are only used to preserve the ordering of the real DOM elements if your are adding to/removing from a list. They only need to be unique to the local component, so it's ok to reuse natural ids from your data. I would not use an index from an iterator because of this. Re. numbers, vs strings: if you're concerned about performance, I'd use whatever type you've already got. Any conversion/parsing you do will be done on every render. However, this would be pretty low on my list of performance concerns in my app.
score: 2

http://stackoverflow.com/comment/41162506
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26241791
has text: I can't say for sure, but it looks like `url_for` is failing and returning an error or something instead of the url you are expecting. My advice would be to dump the return value and see what's going on.

http://stackoverflow.com/comment/41352848
type: Comment
comment on: http://stackoverflow.com/a/26345346
has text: @realph [It doesn't appear `/random` has any options to provide more than a single user](http://uifaces.com/api). You may try asking the owners if they'll add such an option. Otherwise, if you want a list of 3, you'll have to make 3 separate `$http.get()` requests and consolidate their individual `data`. Related: [accessing data of multiple http calls - how to resolve the promises](http://stackoverflow.com/questions/14545573/angular-accessing-data-of-multiple-http-calls-how-to-resolve-the-promises)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41077711
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26196146
score: 1
has text: You're complicating it -> **http://jsfiddle.net/QcUPk/2558/**

http://stackoverflow.com/q/26230055
answer count: 4
has answer: http://stackoverflow.com/a/26230183
type: Question
has body: I've written a dropdown menu that I want functions to fire when an option is clicked. It hasn't been working on any browser so I replaced the first function with a simple alert but that's not firing either. Any pointers would be appreciated! &lt;select name="webmenu" id="webmenu"&gt; &lt;option value="UK" id="UK_button" title="assets/images/uk_flag.png" onclick="alert('You are clicking on me');"&gt;&amp;nbsp;&lt;/option&gt; &lt;option value="US" id="US_button" title="assets/images/us_flag.png" onclick="finalResultsUS()"&gt;&amp;nbsp;&lt;/option&gt; &lt;option value="EU" id="EU_button" title="assets/images/euro_flag.png" onclick="finalResultsEuro()"&gt;&amp;nbsp;&lt;/option&gt; &lt;/select&gt; I've made a few changes to the code based on replies so far (thanks guys) &lt;select name="webmenu" id="webmenu"&gt; &lt;option value="UK" id="UK_button" title="assets/images/uk_flag.png" onchange="alert('You are clicking on me');"&gt;&amp;nbsp;&lt;/option&gt; &lt;option value="US" id="US_button" title="assets/images/us_flag.png" onchange="finalResultsUS()"&gt;&amp;nbsp;&lt;/option&gt; &lt;option value="EU" id="EU_button" title="assets/images/euro_flag.png" onclick="finalResultsEuro()"&gt;&amp;nbsp;&lt;/option&gt; &lt;/select&gt; &lt;script&gt; document.getElementById("webmenu").onchange = function() {alert('you clicked me'); } &lt;/script&gt; but I need a to be able to fire off a different function for each specific choice rather than one function for any change in selection. How could I do this without jquery please? I could use: document.getElementById("webmenu").onchange = function() { alert(this.value) return false }; but how would I write it so that clicking on the US option (2nd option) would trigger the US function for example rather than just firing off alerts please?
linked to: http://stackoverflow.com/q/5749597
has title: onClick won't fire up functions
tagged with: javascript
has answer: http://stackoverflow.com/a/26230087
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26233207
has answer: http://stackoverflow.com/a/26230435
type: UnansweredQuestion

http://stackoverflow.com/comment/41503282
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26406474
has text: You are right but this is the requirement actually there is a website working fine in IE9, and i need to convert it into chrome.i need to follow each line of code to prevent the ripples That is why i am doing this all.
score: 0

http://stackoverflow.com/q/26299703
downvote count: 0
has answer: http://stackoverflow.com/a/26300140
has answer: http://stackoverflow.com/a/26299972
has comment: http://stackoverflow.com/comment/41268362
has comment: http://stackoverflow.com/comment/41268508
favorite count: 0
has comment: http://stackoverflow.com/comment/41268619
has comment: http://stackoverflow.com/comment/41268647
has answer: http://stackoverflow.com/a/26300195
upvote count: 2
has title: Simplify a working function to replace specific words?
answer count: 4
possible better answer: http://stackoverflow.com/a/26299853
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26299853
type: Question
accepted answer: http://stackoverflow.com/a/26300195
tagged with: function
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: truncate
has body: I have a function to shorten certain words when the label wraps (to adjust to various resolutions). My function is working, but I think it can be simplified...just I'm not sure how. As I add more words here, the repetition can get out of hand fast. Could I put the long words/short words in an array and feed everything all at once or something? I couldn't get the fiddle working (even though it is working on my project), but here you go. http://jsfiddle.net/wucd1mws/1/ Thanks in advance! if ($('label').height() &gt; 20) { alert('Text wrapped'); var numtext = $('label:contains("Number")') if (numtext) { numtext.each(function () { $(this).html($(this).text().replace('Number', '#')); }); } var pertext = $('label:contains("Percent")') if (pertext) { pertext.each(function () { $(this).html($(this).text().replace('Percent', '%')); }); } var invtext = $('label:contains("Invoice")') if (invtext) { invtext.each(function () { $(this).html($(this).text().replace('Invoice', 'Inv')); }); } // etc... } I was thinking this is most likely the first step to shorten the function... now to feed in the long/short word pairs. if ($('label').height() &gt; 32) { var long = "Number"; var short = "#"; var labelwrap = $('label:contains('+ long +')') if (labelwrap) { labelwrap.each(function () { $(this).html($(this).text().replace(long, short)); }); } }

http://stackoverflow.com/comment/41202119
type: Comment
comment on: http://stackoverflow.com/q/26263585
score: 0
has text: What is the initial value of the id?
type: QuestionComment

http://stackoverflow.com/q/26227032
tagged with: http://stackoverflow.com/tag/jpeg
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26236216
has body: I am currently new to Tableau and I am wondering if there is a way to simply keep the tooltip functionality of tableau when you output it? I am running Tableau on the mac so I think Tableau server is out of the question. Will tableau create JS code?
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: tableau-api
has title: Keeping Tooltip and hover over after outputting Tableau
has answer: http://stackoverflow.com/a/26236216

http://stackoverflow.com/comment/41185442
has text: Can you do a `console.log(foo, foo.apply, typeof foo, foo instanceof Function)` maybe? My guess would be that `.apply(this, arguments);` is internally optimized, but "touching" `arguments` *requires* the explicit creation of an arguments object. And as you can see from the possible duplicate that Quentin found, IE is very quirksy about "methods" of plugin objects.
type: QuestionComment
comment on: http://stackoverflow.com/q/26243141
type: Comment
score: 1

http://stackoverflow.com/q/26246969
has comment: http://stackoverflow.com/comment/41172200
type: Question
has comment: http://stackoverflow.com/comment/41172445
possible better answer: http://stackoverflow.com/a/26247015
has comment: http://stackoverflow.com/comment/41172178
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26247071
score: 0
answer count: 2
has title: How can I make this function more efficient?
has answer: http://stackoverflow.com/a/26247071
has answer: http://stackoverflow.com/a/26247015
tagged with: angularjs
has body: I have this data structure of credit card types. It would be nice to make the hasTransFee more efficient. If I started adding storecards etc to this list it could get quite big so the faster it works the better. Anyone have any suggestions? $scope.creditCards = [ { name: 'VISA DEBIT/DELTA', value: 'DEL', transactionFee: false}, { name: 'VISA CREDIT', value: 'VIS', transactionFee: true }, { name: 'MASTERCARD CREDIT', value: 'MSC', transactionFee: true }, { name: 'MASTERCARD DEBIT', value: 'MCD', transactionFee: false }, { name: 'MAESTRO', value: 'MAE', transactionFee: false }, { name: 'SWITCH', value: 'SWI', transactionFee: false }, { name: 'VISA ELECTRON', value: 'ELC', transactionFee: false }, { name: 'SOLO', value: 'SOL', transactionFee: false } ]; var hasTransFee = function(cardType) { for (var i=0; i &lt; $scope.creditCards.length; i++) { if($scope.creditCards[i].value==cardType &amp;&amp; $scope.creditCards[i].transactionFee == true){ return true; } } return false; }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41172236

http://stackoverflow.com/comment/41327180
type: QuestionComment
has text: @ProllyGeek `i-1` and `i+1` here mean the previous and the next index of the current index `i`. There is just 1 loop here. There is no reason for it to be invalid.
score: 0
comment on: http://stackoverflow.com/q/26331548
type: Comment

http://stackoverflow.com/comment/41129064
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26223724
type: Comment
has text: so it is really? is that what you are saying? var action = function(number){ sum += number; }

http://stackoverflow.com/q/26224668
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/41130922
accepted answer: http://stackoverflow.com/a/26236605
has comment: http://stackoverflow.com/comment/41130932
has answer: http://stackoverflow.com/a/26236605
has body: I'm new to Rails and appreciate any insight! Updating Rails' or Ruby's version is not an option, I am being required to use my client's current version. Ruby version: 1.9.3-p194, Rails version: 3.2.18 I'm loading in dynamic HTML content through a JavaScript/jQuery Ajax call. Everything works fine when I make the Ajax call from inside of app/assets/javascripts/application.js. Here's the call: $.ajax({ url: '/search/login', cache: true, success: function(html){ console.log('SUCCESS: ', html); } }); The response variable called html contains all the HTML inside of /search/login.html.erb However, if I move that exact call to another JavaScript file such as app/assets/javascripts/search/jh.js, everything seems to work fine except the HTML that's returned is a LOT more than expected. It actually contains the entire HTML DOM tree, from &lt;DOCTYPE&gt; to &lt;/html&gt; in addition to the content from /search/login.html.erb. Can someone please help me understand why this is happening?
answer count: 1
has comment: http://stackoverflow.com/comment/41131042
has title: Rails + AJAX is returning more HTML than expected
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: ruby
type: AnsweredQuestion

http://stackoverflow.com/a/26342603
downvote count: 0
has comment: http://stackoverflow.com/comment/41347295
has comment: http://stackoverflow.com/comment/41347729
score: 4
answers question: http://stackoverflow.com/q/26342565
has comment: http://stackoverflow.com/comment/41347197
has body: Like this : function index(c) { if (c&gt;10) return; // done some code here $.ajax({ url: 'foo.htm', success: function( response ){ // do something with the response index((c||0)+1); // recursion } }); } You can call it as index(); the counter will be automatically initialized at first increment. Another pattern, useful when the number of calls may change, is to pass a decrementing counter : function index(nbIterations) { if (!nbIterations) return; .ajax({ url: 'foo.htm', success: function( response ){ index(nbIterations-1); } }); } index(10)
has comment: http://stackoverflow.com/comment/41347512
has comment: http://stackoverflow.com/comment/41347246
type: Answer
has comment: http://stackoverflow.com/comment/41347865
upvote count: 4

http://stackoverflow.com/a/26218632
upvote count: 1
answers question: http://stackoverflow.com/q/26217615
has body: You can access the data by 'traversing up' the DOM to the data you've bound to the parent node: (in the function where the color is set) var d = d3.select(this.parentNode.parentNode).datum(); Then using that data to set the color: var colorList = d3.scale.category10().range(); if (d.type === "c") { if (d.subtype === "p") return colorList[0]; if (d.subtype === "r") return colorList[1]; } else if (d.type === "e") { if (d.subtype === "p") return colorList[2]; if (d.subtype === "r") return colorList[3]; } Updated fiddle here: http://jsfiddle.net/n4rba907/1/
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41120110
accepted answer of: http://stackoverflow.com/q/26217615
type: Answer
has comment: http://stackoverflow.com/comment/41119620
score: 1
has comment: http://stackoverflow.com/comment/41128682

http://stackoverflow.com/q/26306942
answer count: 1
tagged with: objective-c
tagged with: css
tagged with: uiwebview
type: UnansweredQuestion
upvote count: 1
has body: I'm trying to get 2 .js files and a .css file to load in a UIWebView application on iOS via a HTML file (which is being found).. but it's not working.. The files are already copied on Copy Bundle Resources under Build Phases etc.. This is the code so far on ViewController.m @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"game1" ofType:@"html" inDirectory:nil]; NSString* htmlString = [NSString stringWithContentsOfFile:htmlFile encoding:NSUTF8StringEncoding error:nil]; //Append javascript NSString *script = @" "; htmlString = [htmlString stringByAppendingString:script]; [self.webview loadHTMLString:htmlString baseURL:nil]; } I'm running xcode6.. Any help in the right direction etc would be great, many thanks..
has title: Adding 2 .js files and a .css file to UIWebView in xcode6
score: 1
type: Question
has answer: http://stackoverflow.com/a/29118571
downvote count: 0
tagged with: ios
tagged with: javascript
favorite count: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/26307572
tags question: http://stackoverflow.com/q/26299864
tags question: http://stackoverflow.com/q/26209301
tags question: http://stackoverflow.com/q/26340275
tag name: web-services
tags question: http://stackoverflow.com/q/26303940

http://stackoverflow.com/comment/41103015
has text: Look at the developer tools of the browser, network tab - how much data is sent to the server. Otherwise you have something on your server-side that cuts the string. Or the part of code is doing something that you do not expect. Or the string that you are sending on server has \x0, for example..
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26209956

http://stackoverflow.com/comment/41131085
type: QuestionComment
comment on: http://stackoverflow.com/q/26224597
score: 0
has text: Are you asking about how to implement such (I think you're looking for [`DataView`s](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)), or looking for full-fledged libraries that allow declarative parsing like the `construct` you mentioned?
type: Comment

http://stackoverflow.com/a/37204467
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26353247
downvote count: 0
has body: The different DevTools (tested in Chrome DevTools, Firefox DevTools and Firebug) don't offer a way to see the value changes in real time. You always have to refresh their display manually. Firefox offers an Object.prototype.watch() function (for other browsers there is a shim), which does what you want. Example: test = 0; setInterval(() =&gt; test++, 1000); window.watch("test", (id, oldValue, newValue) =&gt; { console.log(new Date().toLocaleTimeString(), newValue); return newValue; }); This will output something like this: 09:51:03 1 09:51:04 2 09:51:05 3 09:51:06 4 09:51:07 5 Note: This function only allows to watch single properties of an object, so, in order to watch all object properties you need to loop over them and call watch() for each one.

http://stackoverflow.com/q/26278864
type: Question
has answer: http://stackoverflow.com/a/26279168
answer count: 2
tagged with: google-maps
has body: I'm writing the below script to add a marker on click, the map loads fine but when I click on it no marker is added and there are no errors in the console, anyone have any suggestions as to what might be going on? function selectMapLocation() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(37.7699298, -122.4469157) }; var map = new google.maps.Map(document.getElementById('map'), mapOptions); google.maps.event.addListener(map, 'click', function(event){ var marker = new google.maps.Marker({ position: event.LatLng, map: map }); }); } function loadSelectMapLocation() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&amp;callback=selectMapLocation'; document.body.appendChild(script); }
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26279168
favorite count: 0
tagged with: google-maps-api-3
possible better answer: http://stackoverflow.com/a/26279108
has comment: http://stackoverflow.com/comment/41230586
score: 0
has comment: http://stackoverflow.com/comment/41230679
has answer: http://stackoverflow.com/a/26279108
has title: Google Maps V3 Marker not showing
has comment: http://stackoverflow.com/comment/41230836
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41231056
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41230426

http://stackoverflow.com/a/26205133
type: Answer
answers question: http://stackoverflow.com/q/26205071
score: 0
has body: Not possible. It is just the way js objects are. Can't you just iterate over the array and put the data inside an object? var color = ['green', 'blue', 'red', 'yellow', 'purple']; var colors_obj = {}; for(var color_num_key in color) { colors_obj[color_num_key] = color[color_num_key]; } console.log(colors_obj); JS Fiddle demo

http://stackoverflow.com/a/26235636
type: Answer
answers question: http://stackoverflow.com/q/26235265
has body: Start the page already opacity 0 then use jQuery to change it on document ready. I used CSS3 transitions as it is simpler but it could also be done with jQuery and the display: none property. // CSS body { opacity: 0; transition: opacity 1.5s; } // JS $(function() { $('body').css({opacity: 100}); }); http://jsbin.com/qecaha/1/edit // CSS body { display: hidden; } // JS $(function() { $('body').fadeIn(1500); }); http://jsbin.com/qecaha/2/edit
score: 0
has comment: http://stackoverflow.com/comment/41153938

http://stackoverflow.com/comment/41129956
has text: Changing the selector would make a huge difference if the current selector was picking up a different element.
type: AnswerComment
comment on: http://stackoverflow.com/a/26224146
type: Comment
score: 0

http://stackoverflow.com/a/26200907
has comment: http://stackoverflow.com/comment/41085856
downvote count: 3
answers question: http://stackoverflow.com/q/26200823
score: -3
type: Answer
upvote count: 0
has body: It seems, that you don't have referenced the jQuery lib in your file. Check this first. Open the console (F12) to check if any errors are thrown.

http://stackoverflow.com/q/26204694
type: Question
tagged with: javascript
has body: I need to make div visible on hover $(document).ready(function () { $('.carousel').hover(function () { $(this).parent().next('.semitransparentoverlay').fadeIn('200'); }, function () { $(this).parent().next('.semitransparentoverlay').fadeOut('200'); }); }); but on hover div becomes visible again and again http://jsfiddle.net/n8b65qbb/14/ How to prevent it and make div visible only once and then hide it on mouselive only once?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26204782
accepted answer: http://stackoverflow.com/a/26204782
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26204823
has title: make div visible on hover
has answer: http://stackoverflow.com/a/26204823
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/41299535
comment on: http://stackoverflow.com/a/26309488
score: 0
type: AnswerComment
type: Comment
has text: Glad to hear, I really like it.

http://stackoverflow.com/a/26241163
type: Answer
answers question: http://stackoverflow.com/q/26240989
score: 0
has body: I think you went to add a jQuery code but stuck while calling it in proper way. You can do the following. 1) Cover your JS code within $(document).ready(function(){ //your code goes here }); OR jQuery(document).ready(function($){ //your code goes here }); 2) Put your JavaScript/jQuery code in a .js file. 3) Call that file after the jQuery library file into your HTML code. e.g. &lt;script class="cssdeck" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"&gt; &lt;/script&gt; &lt;script src="pathto/yourfile.js"&gt; &lt;/script&gt; You can also put your code inside &lt;script&gt;&lt;/script&gt; tags in the HTML file itself rather than creating a separate JS. However, in either case, the main thing is that the jQuery library should be loaded first, so that your jQuery code can run. NOTE: I have not checked your JS code logic, I have just given instruction over how you should use this JS code to work.

http://stackoverflow.com/comment/41077539
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26196146
has text: And where you define it?

header
type: Tag
tags question: http://stackoverflow.com/q/26218904
tags question: http://stackoverflow.com/q/26213255
tag name: header
tags question: http://stackoverflow.com/q/26326778

http://stackoverflow.com/comment/41287947
has text: http://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-screenshots + http://html2canvas.hertzen.com/, but only to send it to server, it can not save it to the local filesystem.
score: 0
comment on: http://stackoverflow.com/q/26310247
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41138649
comment on: http://stackoverflow.com/q/26228773
score: 0
type: Comment
type: QuestionComment
has text: Can you add your code(whatever you tried so far) here?

http://stackoverflow.com/q/26253351
answer count: 19
has answer: http://stackoverflow.com/a/44825254
linked to: http://stackoverflow.com/q/28121272
linked to: http://stackoverflow.com/q/43040721
has answer: http://stackoverflow.com/a/69819460
linked to: http://stackoverflow.com/q/42029477
has body: I want to add an element to the end of a state array, is this the correct way to do it? this.state.arrayvar.push(newelement); this.setState({ arrayvar:this.state.arrayvar }); I'm concerned that modifying the array in-place with push might cause trouble - is it safe? The alternative of making a copy of the array, and setStateing that seems wasteful.
upvote count: 626
favorite count: 0
has answer: http://stackoverflow.com/a/71730688
linked to: http://stackoverflow.com/q/37755997
has answer: http://stackoverflow.com/a/60597711
has answer: http://stackoverflow.com/a/26254086
has answer: http://stackoverflow.com/a/60275710
has answer: http://stackoverflow.com/a/60719577
has answer: http://stackoverflow.com/a/69550994
has answer: http://stackoverflow.com/a/65584676
accepted answer: http://stackoverflow.com/a/26254086
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/60557775
has answer: http://stackoverflow.com/a/41445812
has answer: http://stackoverflow.com/a/78164064
has comment: http://stackoverflow.com/comment/41184522
has answer: http://stackoverflow.com/a/32260156
has answer: http://stackoverflow.com/a/62122092
downvote count: 1
possible better answer: http://stackoverflow.com/a/37002941
type: Question
has answer: http://stackoverflow.com/a/52473397
tagged with: reactjs
has comment: http://stackoverflow.com/comment/105576544
has answer: http://stackoverflow.com/a/37002941
has title: Correct modification of state arrays in React.js
has answer: http://stackoverflow.com/a/68865947
tagged with: javascript
score: 625
has answer: http://stackoverflow.com/a/59712716
has answer: http://stackoverflow.com/a/64988304

http://stackoverflow.com/comment/41100993
comment on: http://stackoverflow.com/a/26209056
score: 0
type: Comment
has text: Understood, I'll be more forthcoming about false positives in future, thanks for the link it'll help a lot.
type: AnswerComment

http://stackoverflow.com/q/26267369
favorite count: 0
tagged with: ajax
has body: I have Javascript to where a cursor moves on up, down, enter on a table. It works but I want to move the cursor left and right on the same row. How can I do that? I tried and it doesn't work: else if (evt.keyCode == 39){ event.preventDefault(); var cellindex = $(this).index() var rowindex = $(this).parents('td').index() + 1 $(this).parents('table').find('tr:eq('+rowindex+') td:eq('+cellindex+')').focus() } This is the working code for up, down, enter. jQuery(document).ready(function(){ $('td').keydown(function(evt){ if(evt.keyCode == 40){ event.preventDefault(); var cellindex = $(this).index() var rowindex = $(this).parents('tr').index() + 1 $(this).parents('table').find('tr:eq('+rowindex+') td:eq('+cellindex+')').focus() }else if (evt.keyCode == 38){ event.preventDefault(); var cellindex = $(this).index() var rowindex = $(this).parents('tr').index() - 1 $(this).parents('table').find('tr:eq('+rowindex+') td:eq('+cellindex+')').focus() } else if (evt.keyCode == 13){ event.preventDefault(); var cellindex = $(this).index() var rowindex = $(this).parents('tr').index() + 1 $(this).parents('table').find('tr:eq('+rowindex+') td:eq('+cellindex+')').focus() } }) });
tagged with: http://stackoverflow.com/tag/html
has title: Javascript moving cursor on table that is editable move on save row
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26268005
type: Question
score: 1
tagged with: html-table
accepted answer: http://stackoverflow.com/a/26268005
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26200787
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41085679
upvote count: 1
downvote count: 1
type: Question
has title: How to have a hidden image in a HTML program?
has comment: http://stackoverflow.com/comment/41085715
has answer: http://stackoverflow.com/a/26200836
tagged with: javascript
tagged with: image
has body: I'm making a program using HTML and javascript (with jQuery) that asks users a series of questions, and displays an image depending on their answers. I do not intend to make this program available online. It's just something I'll send to my friends, so they can download and try it from their computer. The problem is, the image should not be accessible outside the program. Previously, I just put the images in the same folder, with the .html and .js files, and used drawImg() or the img tag. But here the images should only be seen in the program, and users should not be able to see it or open it from outside. So how can I do this? Simply setting the property of images to hidden is not enough.
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41163591
type: Comment
comment on: http://stackoverflow.com/q/26242362
has text: @Dwza - My problem is solved thanks for Zeke. I missed the obvious on new RegExp()
score: 0
type: QuestionComment

http://stackoverflow.com/q/26225324
tagged with: google-sheets
has body: I am trying to access a private google drive spreadsheet for my code in javascript. Is it possible? If access private spreadsheet is not possible, how do I access the public spreadsheet using javascript code?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26428433
type: UnansweredQuestion
type: Question
has title: Access google drive spreadsheet in javascript
score: 0

http://stackoverflow.com/comment/106629045
score: 1
has text: Anyone found a solution? Taking 50 seconds for ~1,5k rows and ~140 cols
comment on: http://stackoverflow.com/q/26322153
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41096650
type: Comment
comment on: http://stackoverflow.com/a/26199677
type: AnswerComment
has text: So it works here: http://jobrangers.com/dialogmodaljqueryplugin/test.html however it does not work when you click on "GET STARTED" and it pulls up the modal window here: http://jobrangers.com/en/
score: 0

http://stackoverflow.com/comment/41249829
comment on: http://stackoverflow.com/a/26287237
has text: I also tried writing the load line at the top before the lines of click events. I added an alert message just to see if i goes through and the alert message pops up but still no webpage in the specified div.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41339630
has text: you need to use a regex with a global (g) flag. I have updated the answer to use this
comment on: http://stackoverflow.com/a/26337014
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26330473
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41393580
favorite count: 0
accepted answer: http://stackoverflow.com/a/26430739
tagged with: skipper
has comment: http://stackoverflow.com/comment/41393448
has title: Upload files Sails JS Skipper v0.10.5
tagged with: node.js
type: AnsweredQuestion
has body: I am uploading files with skipper, everything it's working perfectly, but I have a problem with the option saveAs I am assigning it's value by means of a function but it doesn't work, how can I assign the value of req.param('titulo') + file extension to the option saveAs? var path = require('path'); module.exports = { 'save':function(req,res,next){ var uploadOptions = { dirname: sails.config.appPath + '/assets/books', saveAs: function(file){ return req.param('titulo')+path.extname(file.filename); }, maxBytes: 20 * 1000 * 1000 } req.file('archivoPath').upload(uploadOptions,function(err,files){ if(err){ return res.serverError(err); } else{ console.log(files); } }); Book.create(req.params.all(),function bookCreated(err,book,next){ if(err) { console.log(err); } return res.redirect('/book/books'); }); } }; I also really want to know if inside of the folder assets would be a good place to upload a pdf file to show it in my front end, ty.
tagged with: sails.js
has answer: http://stackoverflow.com/a/26430739
score: 4
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41394018

http://stackoverflow.com/q/26313101
has title: Visual Studio 2013 JS HTML Template
type: UnansweredQuestion
upvote count: 1
tagged with: visual-studio
score: 1
type: Question
has answer: http://stackoverflow.com/a/26313132
tagged with: javascript
has body: before i reinstalled visual studio i had an option to choose a blank html/js only template. There is still an option for a blank JS project but it's different and it seems like it's supposed for windows 8 store apps. I found a picture from a typescript template. I had the same option for javascript: (source: msdn.com) Now it's gone and I'd like to have it back. Maybe someone can help me out? Thanks in advance
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41109949
type: AnswerComment
comment on: http://stackoverflow.com/a/26213930
has text: You can place this code instead of the following code $theResults = <<<EOD **RESULT PAGE** EOD;
score: 0
type: Comment

http://stackoverflow.com/comment/41326404
score: 0
type: Comment
type: QuestionComment
has text: Good point, although the code is part of a Thunderbird plugin, where harmony features are working. Here I'm trying to run tests from (node) command line, so issues come out now.
comment on: http://stackoverflow.com/q/26304517

http://stackoverflow.com/a/26340218
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26337511
answers question: http://stackoverflow.com/q/26337511
upvote count: 1
has body: Check this out : I think this is your app.js, if yes it will work. var win1 = Titanium.UI.createWindow({backgroundColor: "#ffffff"}); win1.open(); var aview = Titanium.UI.createView({ borderRadius : 10, backgroundColor : 'Red', width : Titanium.UI.FILL, height : Titanium.UI.FILL, layout : 'vertical' }); win1.add(aview); var headings = Ti.UI.createLabel({ height : 'auto', width : Titanium.UI.FILL, top : 10, left : 100, right : 40, bottom : 40, text : 'Registration', color : 'White' }); aview.add(headings); var usern = Ti.UI.createLabel({ height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40, text : 'Username', color : 'black' }); aview.add(usern); var user = Ti.UI.createTextField({ borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color : '#336699', text : 'Username', height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40 }); aview.add(user); var passn = Ti.UI.createLabel({ text : 'Password', height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40, color : 'black' }); aview.add(passn); var pass = Ti.UI.createTextField({ height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40, text : 'Password', color : '#336699', keyboardType : Titanium.UI.KEYBOARD_PHONE_PAD, // This has varities of keyboard and I choose PHONE_PAD as layout and it displays number pad when we click on the edit box of the date returnKeyType : Ti.UI.RETURNKEY_DONE, passwordMask : true, //This makes the letter display in ***** format borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED }); aview.add(pass); var fname = Ti.UI.createLabel({ height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40, text : 'Fullname', color : 'black' }); aview.add(fname); var fn = Ti.UI.createTextField({ borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color : '#336699', text : 'Fullname', height : 'auto', width : Titanium.UI.FILL, top : 10, left : 40, right : 40 }); aview.add(fn); var buttons = Ti.UI.createButton({ title : 'Submit', height :…

http://stackoverflow.com/comment/41131540
has text: if you have `var data= {"photo":{"id":85456501,"user_id":601182}}` then you need to use `data.photo.id` to get the id value. Where is the object located? Is it a data attribute on the body element? If not your selector will return nothing.
score: 0
comment on: http://stackoverflow.com/q/26225077
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41118908
score: 0
has text: if you look at jsfiddle code i am seeing right side div being at bottom, so start with it.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26208759

http://stackoverflow.com/q/26293796
type: AnsweredQuestion
score: 0
has title: How Do I Check For Matching Strings When Using Spacebars?
type: Question
has answer: http://stackoverflow.com/a/26296015
answer count: 1
tagged with: javascript
tagged with: meteor-helper
accepted answer: http://stackoverflow.com/a/26296015
has body: this is my code &lt;select id="updOrg"&gt; {{#each organization}} &lt;option id="{{_id}}" {{ifSelected ../user.profile.organization}}&gt;{{name}} &lt;/option&gt; {{/each}} &lt;/select&gt; in my template helper my code is 'ifSelected':function(org){ console.log(org); console.log(this.name); var name=this.name; if(org === this.name){ console.log("matched"); return "selected"; } } in the console I'm getting TEST XXX TEST TEST the second two strings are matching,but here it is not matching in the if condition and I also I can't see matched in my console. what is wrong here
tagged with: meteor
tagged with: spacebars

http://stackoverflow.com/comment/41394897
type: QuestionComment
comment on: http://stackoverflow.com/q/26347699
type: Comment
score: 0
has text: [1, 1, 2] and [1, 2] both produce true, is there a requirement i'm missing?

http://stackoverflow.com/q/26235398
tagged with: arrays
tagged with: jquery
has comment: http://stackoverflow.com/comment/41150207
has answer: http://stackoverflow.com/a/26237643
has comment: http://stackoverflow.com/comment/41149868
has comment: http://stackoverflow.com/comment/41149910
tagged with: dry
has title: Javascript rewriting to DRY with loads of elements and arrays
type: AnsweredQuestion
has body: I'm having some problem with rewriting my code to the "DRY"-way. It's really messy right now because in this example I've even removed half of the arrays for this example. The script works as the user selects a country from #country-dropdown with the country-codes as keys. The script fills a second dropdown with the corresponding array values. So if i select "UK" in dropdown1, then it fills dropdown2 with the uk array. And right now everything works. And it also changed text in a few site elements named #uk, #fr, #be etc.. with the selectedIndex in the dropdown2. But the code is badly written and just looks plain ugly. Good to know: All the number arrays are the same length, so I match them using the selectedIndex. Because If the user selects uk 4 it's matched with ru 38. var uk = [2, 4, 6, 8, 10, 12]; var fr = [30, 32, 34, 36, 38, 40]; var us = ["00", 0, 2, 4, 6, 8]; var ca = ["00", 0, 2, 4, 6, 8]; var de = [28, 30, 32, 34, 36, 38]; var es = [30, 32, 34, 36, 38, 40]; var ru = [36, 38, 40, 42, 44, 46]; var it = [34, 36, 38, 40, 42, 44]; var be = [30, 32, 34, 36, 38, 40]; var countries = ["uk", "us", "fr", "it", "de", "au", "es", "jp"]; var selectedSize = $('#size').val(); //This function changes text in all the sites text elements named #uk, #fr, #de etc.. $('#size').change(function (e) { for (var i = 0; i &lt; countries.length; i++) { //var country = String(countries[i]); //console.log(uk[size.selectedIndex]); $("#uk").text(uk[size.selectedIndex]); $("#fr").text(fr[size.selectedIndex]); $("#de").text(de[size.selectedIndex]); $("#es").text(es[size.selectedIndex]); $("#ru").text(ru[size.selectedIndex]); $("#be").text(be[size.selectedIndex]); } }); $('#country').change(function (e) { $("#size").empty(); var countrySize; var selectedCountry = $('#country').val(); switch (selectedCountry) { case "uk": countrySize = uk; console.log(countrySize); break; case "fr": countrySize = fr; console.log(countrySize); break; case "de": countrySize = de; console.log(countrySize); bre…
has comment: http://stackoverflow.com/comment/41149981
has comment: http://stackoverflow.com/comment/41150422
possible better answer: http://stackoverflow.com/a/26235769
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26237643
has answer: http://stackoverflow.com/a/26235769
has comment: http://stackoverflow.com/comment/41150718
type: Question
score: 0
answer count: 2

http://stackoverflow.com/q/26275394
downvote count: 0
tagged with: web-audio-api
tagged with: web
favorite count: 0
possible better answer: http://stackoverflow.com/a/30511606
has title: Alternate for Web Audio API
has answer: http://stackoverflow.com/a/30511606
has comment: http://stackoverflow.com/comment/41414670
has body: I have a web program which makes use of Web Audio API. The issue here is that i want to make it compatible for IE. Is there any alternate for the Web Audio API, so that i can make the same code run on IE specifically?
has answer: http://stackoverflow.com/a/26281172
has comment: http://stackoverflow.com/comment/41223550
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41277235
accepted answer: http://stackoverflow.com/a/26281172
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41223591
tagged with: javascript
has comment: http://stackoverflow.com/comment/41369814
answer count: 2

http://stackoverflow.com/q/26216281
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: jQuery UI sortable - do something when user starts dragging an element from a specific block
favorite count: 0
accepted answer: http://stackoverflow.com/a/26216854
score: 2
type: AnsweredQuestion
upvote count: 2
has body: This question is related to this I have two block one is "draggable" and the other is "sortable". What I want to do is when I start dragging an item from "sortable" to do something via jQuery. this is my JS: $(".sortableList").sortable({ start: function(event, ui) { alert("Do something here!"); } }); $(".draggable").draggable({ connectToSortable: '.sortableList', cursor: 'pointer', helper: 'clone', revert: 'invalid', start: function (event, ui) { $(this).addClass('testing'); } }); $("#sidebar-wrapper").droppable({ accept: 'li', drop: function (event, ui) { ui.helper.remove(); } }); The problem is that is doing something before I drop the element from "draggable" to "sortableList" and I want to do something when element is dragged from "sortableList." Here's a jsbin. Any suggestions on how can I do this?
type: Question
linked to: http://stackoverflow.com/q/26192255
tagged with: jquery-ui-sortable
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/26216854

http://stackoverflow.com/a/26258670
accepted answer of: http://stackoverflow.com/q/26258429
has comment: http://stackoverflow.com/comment/41192533
answers question: http://stackoverflow.com/q/26258429
score: 1
upvote count: 1
has body: Whell Validation and masking are two different things. When you want to validate, you simply add onkeyup event $('input').keyup(function(){ var inputText = $(this).val(); if ( !/[a-zA-Z0-9]+/.test(inputText) ){ // put your reg exp here, this will require only letters and numbers console.log('Display error'); }else{ console.log('Hide error'); } }); When you want to mask your characters, you need to create seocnd hidden input, next to your input and copy your input value. After you cope input value, you can replace spacial characters with some char and place it inside of your input.. This one is more complicated than first case. Most ppl would advise to use validation. Just remember not to do mutch operations here, if you are worried on performance, and you can accept validation on value change, I would advise onValueChange event instead.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26221455
type: Answer
answers question: http://stackoverflow.com/q/26220013
score: 0
has body: Dawson's comment should work. As you can see at the Cordova documentation page: http://docs.phonegap.com/en/2.2.0/cordova_notification_notification.md.html#notification.alert The code: navigator.notification.alert is AFTER loading the cordova library.

http://stackoverflow.com/comment/41190540
type: Comment
has text: Nice, '+' is more intuitive than '{ }'. Thank you very much.
comment on: http://stackoverflow.com/a/26234505
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41233219
has text: I have to uncheck it as an accepted answer though, before i give you the bounty:)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26260780
type: Comment

http://stackoverflow.com/a/26351415
has body: Yes, you should loop through the collection and assign the handlers individually. jQuery also does this behind the scenes. querySelectorAll returns a NodeList which is an array-like object. For looping through the list, you can either use a for loop: var list = document.querySelectorAll('li'), l = list.length, li; for (var i = 0; i &lt; l; i++) { li = list.item(i); // ... } Or use the forEach method: [].forEach.call(document.querySelectorAll('li'), function(li) { // ... });
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26351383
answers question: http://stackoverflow.com/q/26351383
has comment: http://stackoverflow.com/comment/41363011
has comment: http://stackoverflow.com/comment/41363058
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41363016

http://stackoverflow.com/a/45249859
has body: You may want to try this tiny NPM library: printable-characters (note: I'm the author of this library) It handles all kinds of burden with processing strings containing zero-width characters and ANSI escape codes. Getting first N symbols without breaking ANSI codes: const { first } = require ('printable-characters') const s = '[22mfoobar[22m' first (s, 0) // === '[22m[22m' first (s, 1) // === '[22mf[22m' first (s, 3) // === '[22mfoo[22m' first (s, 6) // === '[22mfoobar[22m'
downvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26238553
type: Answer
upvote count: 2

http://stackoverflow.com/comment/112028534
has text: Yeah this is the structure of JSON.stringify() `stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26324037

http://stackoverflow.com/a/26259851
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26259707
has body: I seem that you hidding different element than you showing. You hidding .comment_body_wrapper and showing .comment_wrapper
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/26235992
upvote count: 1
has comment: http://stackoverflow.com/comment/41151847
downvote count: 0
answers question: http://stackoverflow.com/q/26235922
has body: You can use bind rather more simply: Carousel.prototype.addEventListeners = function(){ this.button.on('click', this.callMyClassFunction.bind(this)); }; I'm not sure what bind you were using in your example (you were calling it on the return value of the on function), but the above uses Function#bind, which is a part of JavaScript itself (as of ES5; it's easy to shim/polyfill for older browsers). Function#bind returns a new function that, when called, calls the original function with this set to the first argument you give bind. So in the above, a click will call the function returned by bind, which will call callMyClassFunction with this set to the correct value. If you need to use removeListener later and it requires the same function be passed into it, you'll have to remember the function, like this: Carousel.prototype.addEventListeners = function(){ if (!this.boundCallMyClassFunction) { this.boundCallMyClassFunction = this.callMyClassFunction.bind(this); } this.button.on('click', this.boundCallMyClassFunction); }; Carousel.prototype.removeEventListeners = function(condition){ if(condition &amp;&amp; this.boundCallMyClassFunction){ this.button.removeListener('click', this.boundCallMyClassFunction); } }; You can't just pass it the result of calling bind again, as that would be a different function. But check the documentation of whatever's providing the on and removeListener functions you're calling above, it may provide a simpler way to do that (jQuery does, but it doesn't look like you're using jQuery there).
type: Answer
has comment: http://stackoverflow.com/comment/41151742
score: 1

http://stackoverflow.com/a/28520060
score: 3
upvote count: 3
has body: How to access data in Mongo DB from html ? First of all you need to have the Mongo DB instance present in global variable i:e it must be declared in any .js file as below. It is not part of client or server code Say we create a Collection of Events in one of the js files. EventList = new Mongo.Collection('Events'); Now, in order to access all the objects from HTML, we would need a helper function inside client in our .js file. Below is Helper used:- Template.viewEvent.helpers ({ //NOTE : 'event' is the name of variable from html template 'event' : function () { //returns list of Objects for all Events return EventList.find().fetch(); } 'users' : function () { //returns reference to Document for all users return UserList.find().fetch(); } }); Just left to display all the content on .html:- Say EventList Collection has fields Event_Name, Event_Date. Below would be the html template code View Event {{#each event}} {{Event_Name}} : {{Event_Date}} {{/each}}
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26225685

http://stackoverflow.com/comment/41269817
has text: I added a plunker with a minimal repro of the issue.
type: AnswerComment
comment on: http://stackoverflow.com/a/26284276
score: 0
type: Comment

http://stackoverflow.com/comment/41215118
has text: ‎@Ram Then it is a browser configuration issue. You cannot change this server-side.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26270215
type: Comment

http://stackoverflow.com/comment/41136758
score: 0
comment on: http://stackoverflow.com/q/26227249
type: QuestionComment
type: Comment
has text: I put a sample up there for now. I will try a fiddle in a bit.

http://stackoverflow.com/q/26222367
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26231628
tagged with: firefox-addon
tagged with: firefox-addon-sdk
has title: How to change excluded urls in Mozilla SDK page-mod dynamically
has answer: http://stackoverflow.com/a/26231628
has body: How do I change the value of 'exclude' in the Mozilla SDK's page-mod and use the new value at runtime? In my scenario, when a user chooses to exclude the page from my addon, I refresh the 'pages' array in the simple-storage. I want to immediately exclude this page from processing by somehow restarting the page-mod with the new settings. At the moment, when I reload the excluded tab, my script is still working on the page. The only thing that works at the moment is just the static array declaration: ['*.example.org']. var excludedUrls = require("sdk/simple-storage").storage.pages; // doesn't //work. //When exclude is set to this var I get: "Message: RequirementError: //If set, the `exclude` option must always contain at least one rule as a //string, regular expression, or an array of strings and regular expressions." // excludedUrls does contain an array of stings! var pm = require("sdk/page-mod").PageMod({ include: ['*'], //Error when set to: excludedUrls OR require("sdk/simple-storage").storage.pages exclude: ['*.example.org'], contentScriptWhen: "ready", attachTo: ["existing", "top"], contentScriptFile: [data.url("script.js")] }); Page-mode entry in MDN: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-mod
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: mozilla
type: Question
upvote count: 2
tagged with: firefox

http://stackoverflow.com/comment/41101918
has text: Have you tried a headless browser with selenium (PhantomJS, for example)?
type: Comment
comment on: http://stackoverflow.com/q/26205111
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41213897
score: 0
type: Comment
type: QuestionComment
has text: What about `console.log(customer)`? Also, you can just use `customer.push(person)`, this way feels more "consistent", without worrying about the index.
comment on: http://stackoverflow.com/q/26269791

http://stackoverflow.com/comment/41162299
type: AnswerComment
comment on: http://stackoverflow.com/a/26241733
has text: $( ".to" ).datepicker({ dateFormat: ' YYYY-MM-DD' });
type: Comment
score: 0

http://stackoverflow.com/comment/41176783
has text: But I have a question, why the first version of Vivek code didn't work? With setting visibility to hidden, it should have worked. I appreciate if you could tell me what do you think is the reason of not working in the first version of Vivek code?
comment on: http://stackoverflow.com/a/26248875
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26293276
accepted answer of: http://stackoverflow.com/q/26292877
type: Answer
answers question: http://stackoverflow.com/q/26292877
score: 3
downvote count: 0
has body: You misspelled the property "packageElement" as "pacakageElement". Change all instances to use "packageElement" and it should work.
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/comment/41222969
type: Comment
comment on: http://stackoverflow.com/a/26272988
has text: and one more . how to get vale of this hidden column
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41189103
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26256526
score: 0
has text: I am calling this on html page within 'head' tag

http://stackoverflow.com/comment/41146066
has text: atleast show some code which you have already tried and not worked
comment on: http://stackoverflow.com/q/26233180
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26284937
has answer: http://stackoverflow.com/a/26285026
has answer: http://stackoverflow.com/a/26349539
tagged with: javascript
answer count: 2
has body: I am building a Facebook canvas application. I did most of the parts using the javascript SDK, and now I am stuck at where I would probably need to use PHP SDK 4 for. I am trying to send notifications to my users. For this purpose, I did some research and could find only limited documentation available. I will summarize through points. I performed all the actions like logging in, retrieving user profile etc etc in JavaScript SDK. Need to use PHP SDK4 for sending out notifications. The following is what I have done so far. Imported all the required files like require_once( 'Facebook/HttpClients/FacebookHttpable.php' ); and used them like use Facebook\HttpClients\FacebookHttpable; [ I triple cross checked the paths. They are all correct]. Set a Facebook session like follows. FacebookSession::setDefaultApplication('xxxxxxx','xxxxxxxx'); Obtained a new app access token like follows. $appSession = FacebookSession::newAppSession(); Tried to use Graph API to do notification $notification = new FacebookRequest( $appSession, 'POST', '/{777911845584420}/notifications', array ( 'href' =&gt; "apps.wehubs.com/ashifshereef/amritham2/againsample/again2/", 'template' =&gt; 'You have been tagged, please set privacy preference', ) ); $response = $notification-&gt;execute(); $graphObject = $response-&gt;getGraphObject(); I am getting nothing. No Notifications, no anything. I know there is something strange with this code. Something to add, or something not done the right way. I am pretty well versed in javacsript, but not PHP. My Question is, clear. How to make this thing work? Sorry for the junks, Its all I could come up with, with the pretty shitty Documentation available on PHP SDK 4.
downvote count: 0
tagged with: facebook-graph-api
favorite count: 0
tagged with: facebook
tagged with: php
type: UnansweredQuestion
score: 1
has title: Using PHp SDK4 with Javascript SDK to send notifications
upvote count: 1
type: Question

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/26293796
type: Tag

http://stackoverflow.com/comment/41346214
has text: Maybe syntax error on the page, it never gets to AJAX.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26342008

http://stackoverflow.com/comment/132768495
score: 0
type: AnswerComment
type: Comment
has text: I know how old this post is, but you have no idea how long I've been trying to get this to work. Your answer is EXACTLY what I've been looking for. Thank you!!! I did wrap most of it in an if statement to make sure it doesn't fire if it's deselected ( `if(!direction)...` ). Thank you again!!
comment on: http://stackoverflow.com/a/26241123

http://stackoverflow.com/comment/41393448
has text: Are you sure to have access to `req` inside the saveAs function? I'm not quite sure. Try to see if `req.param('titulo')` contains anything inside the function itself.
type: Comment
comment on: http://stackoverflow.com/q/26330473
score: 0
type: QuestionComment

http://stackoverflow.com/a/26267993
type: Answer
answers question: http://stackoverflow.com/q/26267508
score: 1
upvote count: 1
downvote count: 0
has body: The Response.End() aborts the thread and sends the execution to Application_EndRequest. There is not much to do after that. Please check this post. It presents a solution using iframes.

http://stackoverflow.com/comment/41177886
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26250123
has text: using php how can i do
score: 0

http://stackoverflow.com/comment/41220961
type: Comment
type: QuestionComment
score: 1
has text: `$.ajax()` is a [jQuery](http://jquery.com) function, the `$` being a shorthand for `jQuery` when writing code using it, so you'd need to load jQuery before that code will work. From the error message you haven't done that.
comment on: http://stackoverflow.com/q/26273833

http://stackoverflow.com/a/26275963
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26275535
has body: Like this: function bind() { $(window).resize(function () { $("#scriptToReload").attr("src", "reloadedScript.js"); }); } $(document).ready( function () { bind();} );

http://stackoverflow.com/comment/41198954
comment on: http://stackoverflow.com/q/26261712
score: 0
type: Comment
type: QuestionComment
has text: are we overthinking here.....he is using $('manifesto').hover() instead of $('#manifesto').hover()....could that be why it is not working....??

http://stackoverflow.com/comment/41107885
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26212182
type: Comment
has text: @Steve That's because `step` in such cases become `< 1` and casted to `0`. See the fix for this in updated answer

http://stackoverflow.com/q/26320058
tagged with: angular-promise
has title: Trying to run a function after a promise fail in array
has body: I have an array of promises and a function I need to call after the promises are complete. However, whenever a single promise fails out of the array, my $q.all(promise) will not launch the callback function. function searchLibraries(library) { //console.log(library); console.log('inside searchlibraries'); var libraryCount = library.length; for (var i = 0; i &lt; libraryCount; i++) { //console.log(i,library[i].siteUrl,library[i].listID,library[i].listName) itemPromise[i] = $().SPServices({ operation: "GetListItems", webURL: library[i].siteUrl, listName: library[i].listID, CAMLViewFields: cViewFieldsLimited, CAMLQuery: cQueryAllCheckedOutDocuments, CAMLQueryOptions: cQueryOptions, cacheXML:true, completefunc: function (xData,Status){ if($(xData).hasSPError()){ console.log("Error"); console.log("Error Code:" ,$(xData).getSPErrorCode()); console.log("Error Message:" ,$(xData).getSPErrorText()); } } }) } return $q.all(itemPromise).then(parseSearchResult); }
has comment: http://stackoverflow.com/comment/41305395
possible better answer: http://stackoverflow.com/a/26320097
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41317084
has answer: http://stackoverflow.com/a/26320100
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26320097
tagged with: promise
linked to: http://stackoverflow.com/q/25296960
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26320100

http://stackoverflow.com/comment/41156373
comment on: http://stackoverflow.com/q/26236650
has text: Nope still not working :( I get the same warning, but the files are not created:/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26349635
type: Question
has comment: http://stackoverflow.com/comment/41360211
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26349844
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/41361878
has title: Js check login from exterior website
has body: i've to create a "like" button as Facebook. So this button will be on many web sites, that calls a javascript file hosted by me, which handle hover/click/etc.. action of button. Now, how can I check if the user is logged or not in my website (Php with sessions) with js? So if the user is logged the like button would change text and shows that user liked it, otherwise the user will be redirected(maybe a popup) on registration page. How can I handle this type of cross-domain(js/ajax) request?
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/26222855
has comment: http://stackoverflow.com/comment/41131628
has body: iOS places some restrictions on when/how you can play audio in web apps. For example, you can't simply auto-play sounds, but they have to be initiated from a user-event (tapping a button, etc). Check this out for more info: http://www.ibm.com/developerworks/library/wa-ioshtml5/#N100E8
accepted answer of: http://stackoverflow.com/q/26205767
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26205767
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26288549
has comment: http://stackoverflow.com/comment/41268748
answer count: 3
tagged with: v8
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26288604
linked to: http://stackoverflow.com/q/28514411
has body: We have an Array with a number of properties on each page. Sometimes it has a "values" property. We examine this with myArrayObject['values'] and expect either a string or undefined. After updating to Chrome 38 myArrayObject['values'] returns function values() { [native code] } After some digging this seems to be related to a V8 ticket to implement @@unscopables for the 6th Edition of ecmascript. These changes were committed two months ago. Soon after one dev tried to roll them back with the note that they were "web-breaking". So the question is, is Array.values() an undocumented feature, early adoption an ecmascript-6 draft, a bug, or something else? Will this get rolled back? What other upcoming changes should I be aware of? Small example in Chrome 38.0.2125.101 (on Win7 64): var test=new Array(); // items pushed and popped ... // test['values'] may have been set at some point test['values']; //returns a function pointer: function values() { [native code] }. // yesterday this returned undefined edit: From Bergi's answer this looks like a ES6 feature. Will there be more ES6 features coming out in background patches months before the spec is released? Is there anything I can do to protect our platform? Is there some way to request ES5 compatibility mode?
tagged with: javascript
type: UnansweredQuestion
score: 6
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/26644928
downvote count: 0
has comment: http://stackoverflow.com/comment/84949459
favorite count: 0
has comment: http://stackoverflow.com/comment/41248561
type: Question
has title: ecmascript 6 features found in Chrome 38
has comment: http://stackoverflow.com/comment/41253876
upvote count: 6
has answer: http://stackoverflow.com/a/26304631

http://stackoverflow.com/q/26203222
type: AnsweredQuestion
tagged with: java
accepted answer: http://stackoverflow.com/a/26205234
type: Question
has answer: http://stackoverflow.com/a/26205234
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has body: I have the restful webservices call from the Jquery ajax and getting the response in json object. Jquery HTML: $.ajax({ url: "mcrs/object/api/Lighting", type: "POST", traditional: true, dataType: "json", contentType: "application/x-www-form-urlencoded", async: "false", data:JSON.stringify(postdata), success: function (ResData) { }, error: function (error, data) { console.log(error); } }); } }); And writing the response object for the restful webservices in java @POST @Path("api/{subsystem}") @Produces("application/json") public Response changeStatus(@PathParam("subsystem") String subsystem, /*@FormParam("result")*/ String result) { } I got the response below and which is correct changeStatus:88 - Reponse OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} Depending upon the reponse need to update the status whether the value is on/off in the label tag. str = ' Status : ' + '' + onoffStat + ''; How can I achieve this in ajax and want to have the refreshing the div tag for every 2 seconds. Please help me.
tagged with: ajax
has comment: http://stackoverflow.com/comment/41090819
has title: Need to get the response and to have change in ajax jquery GUI

firefox-addon-sdk
tags question: http://stackoverflow.com/q/26299849
type: Tag
tags question: http://stackoverflow.com/q/26222367
tag name: firefox-addon-sdk
tags question: http://stackoverflow.com/q/26301351
tags question: http://stackoverflow.com/q/26245973
tags question: http://stackoverflow.com/q/26316156
tags question: http://stackoverflow.com/q/26316222
tags question: http://stackoverflow.com/q/26239723
tags question: http://stackoverflow.com/q/26261955

http://stackoverflow.com/comment/41280850
has text: @KevinB Yes, you're right, I'm trying to understand what risk for client in such requests without any cookie.
score: 0
comment on: http://stackoverflow.com/q/26306080
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26348126
accepted answer of: http://stackoverflow.com/q/26279184
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26279184
score: 1
upvote count: 1
has body: Since the data is to be picked in SessionWizardView i would suggest to have a hidden field slider_value in a form. Now in the frontend this field is not visible. The slider function will update the value in this hidden field which can be posted by posting the form. The value can then be accessed from the form object in session wizrd view.

http://stackoverflow.com/a/26212850
downvote count: 0
has comment: http://stackoverflow.com/comment/41122973
type: Answer
answers question: http://stackoverflow.com/q/26209908
score: 3
upvote count: 3
has body: The answers for Rhino and Nashorn would be different. For Rhino, when you create the global object using Context.initStandardObjects, you can then add your properties on the Java side by calling ScriptableObject.defineProperty (see Rhino API) and then the properties will be added to that global scope. If you need a property of type function as your example shows, create it using the FunctionObject API. For Nashorn, you can use the interfaces mostly based on the standard javax.script APIs, with a couple of Nashorn-specific extensions. When evaluating your script, first use ScriptEngine.createBindings() to create a Bindings object, then use Bindings.put to use eval(String/Reader,Bindings) If you need a function property, then on the Java side call ScriptUtils.wrap to create a ScriptObjectMirror (make sure to cast it to that; return type of the method is Object), then call get([function name]) to get an executable function property, then put that in the global scope. All of that said, it seems to me that this is more easily handled on the script side using: var abc = function() { return n.abc.apply(n,arguments); }; That's portable across Rhino/Nashorn and is one line, which is a lot less work than what you're going to do if you want to avoid writing that one line. If you execute that in the global scope, you don't need a qualifier; it'll be added to the top-level object as a property. If you want to be more explicit you can do something like this: (function() { var global = this; // inner functions called without target default to global as 'this' this.abc = function() { return n.abc.apply(n,arguments); }; })(); ... which will work unless you start doing stuff that's a lot fancier (like messing around with 'this' values when loading scripts).
has comment: http://stackoverflow.com/comment/41121598
has comment: http://stackoverflow.com/comment/41119652

http://stackoverflow.com/q/26283125
type: Question
tagged with: function
tagged with: javascript
tagged with: jquery
tagged with: show-hide
has title: Show() Function Not Activating When Value Reaches 100%
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26283211
has comment: http://stackoverflow.com/comment/41238035
has comment: http://stackoverflow.com/comment/41238471
tagged with: if-statement
has body: So I'm trying to have a submit button show once a progress bar reaches 100%. The value of the progress bar increases when each of two drop-downs are selected, and subsequent check-boxes are chosen. Here's the div for the bar and button: &lt;div id="submitContainer" align="center"&gt; &lt;br /&gt; &lt;progress id="progressBar" value="0" max="100"&gt;&lt;div class="progressbar"&gt;&lt;/div&gt;&lt;/progress&gt; &lt;br /&gt; &lt;input id="submitButton" type="button" value="Check Trade" onclick="function()" /&gt; &lt;/div&gt; Here's the script to increase the value of the progress bar: var doneA = false; $('#teamASelect').on('change', function() { if (!doneA) { $("#progressBar").attr('value', $("#progressBar").prop('value')+25); doneA = true; } }); var doneB = false; $('#teamBSelect').on('change', function() { if (!doneB) { $("#progressBar").attr('value', $("#progressBar").prop('value')+25); doneB = true; } }); var doneC = false; $('.checkA').on('change', function() { if (!doneC) { $("#progressBar").attr('value', $("#progressBar").prop('value')+25); doneC = true; } }); var doneD = false; $('.checkB').on('change', function() { if (!doneD) { $("#progressBar").attr('value', $("#progressBar").prop('value')+25); doneC = true; } }); var progress = $("#progressBar").attr('value'); and here's the script that should show the submit button...or so I thought: $(document).ready(function () { $('#submitButton').hide(); }); $('#progressBar').prop('value').on('change', function () { if (progress &gt; 99) { $('#submitButton').show(); } }); What am I doing wrong? Any help is greatly appreciated. Thanks, everyone!

http://stackoverflow.com/a/26292318
answers question: http://stackoverflow.com/q/26292296
has body: You can use: $('#header1').html( $('&lt;strong/&gt;', {text:'Year: ' + ui.value}) ); DEMO
type: Answer
score: 0

http://stackoverflow.com/q/26197304
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26197472
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
has body: I have the following code: 23/09/2014 - 09:15 (DD/MM/YYYY - HH:SS) I need to use JS to reformat in milliseconds.
has comment: http://stackoverflow.com/comment/41079366
accepted answer: http://stackoverflow.com/a/26197472
score: 0
has title: JavaScript - DD/MM/YYYY HH:SS to milliseconds
possible better answer: http://stackoverflow.com/a/26197402
tagged with: datetimepicker
has answer: http://stackoverflow.com/a/26197402
favorite count: 0

http://stackoverflow.com/comment/41338973
type: AnswerComment
comment on: http://stackoverflow.com/a/26303539
type: Comment
has text: Sorry, I had another problem that was drawing a small red square on my canvas after I drew my image. It wasn't my code and I was unaware of it, so I thought it was a problem with my code.
score: 0

http://stackoverflow.com/q/26294768
has title: How to download few files in iphone via JS?
has body: I have a website where user can download few files automatically. I did it using JS, that creates few hidden iframe tags: &lt;iframe src="/path/to/file1.jpg" /&gt; &lt;iframe src="/path/to/file2.zip" /&gt; &lt;iframe src="/path/to/file3.exe" /&gt; The response has content-disposition: attachment header. This works in PC browsers, but don't work in iPhone. Is there a method to download few files in iPhone?
type: Question
has answer: http://stackoverflow.com/a/26294803
tagged with: iphone
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: download
type: UnansweredQuestion

http://stackoverflow.com/comment/41343469
type: Comment
score: 2
has text: val returns a string `"false"` use `return val=="false"?true:false;` instead http://jsfiddle.net/ws4n4nqd/6/
type: AnswerComment
comment on: http://stackoverflow.com/a/26340170

http://stackoverflow.com/q/26325498
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26329514
has answer: http://stackoverflow.com/a/26326713
has comment: http://stackoverflow.com/comment/41315400
has body: I am aware this question has been answered before but I am somehow unable to hit an action within my controller. Here is the Action public JsonResult GetUpdate() { //get a list of valid elements var result = getContent(); return Json(result, JsonRequestBehavior.AllowGet); } In my script: $.ajax({ type: 'GET', url: '@Url.Action("GetUpdate")', dataType: 'json', success: function (constraints) { alert("Application updated"); }, error: function (ex) { alert('Failed to retrieve update.' + ex); } }); Using fiddler I can hit GetUpdate but from the browser the Ajax call fails. Am I correctly accessing the URL? Update: The following is the error message: "NetworkError: 404 Not Found - protocol://localhost:port/Controller/@Url.Action(%22GetUpdate%22)" The following works through Fiddle: protocol://localhost:port/Controller/GetUpdate
has answer: http://stackoverflow.com/a/26329514
tagged with: ajax
type: Question
tagged with: razor
has comment: http://stackoverflow.com/comment/41315594
accepted answer: http://stackoverflow.com/a/26326713
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41315867
has comment: http://stackoverflow.com/comment/41315332
tagged with: asp.net-mvc
tagged with: javascript
has title: How to make AJAX calls

http://stackoverflow.com/a/26342319
upvote count: 1
answers question: http://stackoverflow.com/q/26342246
accepted answer of: http://stackoverflow.com/q/26342246
has body: you are doing: RULES.rules[i] you should do: RULES[rules[i]] when you do the first one, Javascript first looks for a rules property on the RULES object (but this property doesn't exist) then it tries to access element 0 of the rules property, which doesn't exist... hence you get "Cannot read property '0' of undefined" error in the case where you want to access the property of an object using a variable for the name you cannot use dot notation any more and must use the square brackets
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/41198445
has text: @Bergi thanks for your help, touching `arguments` it is then. Would've been nice to know the reason behind the magic touch though and `apply` without it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26243141

http://stackoverflow.com/comment/41119268
score: 0
has text: later on i will only show 1 div at the time, so when u press on buttonclick, div 1 will be hidden, and div 2 pop up
type: QuestionComment
comment on: http://stackoverflow.com/q/26218769
type: Comment

http://stackoverflow.com/q/26212367
has title: creating a table using jade and underscore
type: Question
has body: I want to iterate through a JSON object array and create a table using underscore and jade but my jade template is throwing me the following error and I haven't been able to find any resources to fix it. Error: /home/kseguy/node_projects/prwrite/views/dashboard/index.jade:69 67| script(type="text/template" ,id="data-table") 68| &lt;% _.each(article,function(article){ %&gt; &gt; 69| tr 70| td &lt;%= article.ProjectName %&gt; 71| td &lt;%= article.Date %&gt; 72| td &lt;%= article.Status %&gt; unexpected token "indent" at Parser.parseExpr (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:252:15) at Parser.block (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:707:25) at Parser.tag (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:816:24) at Parser.parseTag (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:737:17) at Parser.parseExpr (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:211:21) at Parser.block (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:707:25) at Parser.tag (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:816:24) at Parser.parseTag (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:737:17) at Parser.parseExpr (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:211:21) at Parser.block (/home/kseguy/node_projects/prwrite/node_modules/jade/lib/parser.js:707:25) How can I debug the issue ? I have already tried converting indentation to tabs and spaces using sublime text but so far no success. Here is my jade template tbody script(type="text/template" ,id="data-table") &lt;% _.each(article,function(article){ %&gt; tr td &lt;%= article.ProjectName %&gt; td &lt;%= article.Date %&gt; td &lt;%= article.Status %&gt; td &lt;%= article.Url %&gt; &lt;% }); %&gt;
tagged with: javascript
has comment: http://stackoverflow.com/comment/41114280
tagged with: pug
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26216833
has comment: http://stackoverflow.com/comment/41112976
upvote count: 1
accepted answer: http://stackoverflow.com/a/26216833
type: AnsweredQuestion
tagged with: underscore.js
score: 1

http://stackoverflow.com/comment/41184106
score: 1
has text: Is this want you want? http://stackoverflow.com/questions/6991494/javascript-getelementbyid-base-on-partial-string
type: QuestionComment
comment on: http://stackoverflow.com/q/26253887
type: Comment

http://stackoverflow.com/comment/41352546
type: QuestionComment
comment on: http://stackoverflow.com/q/26345441
has text: @DanielA.White wrong....There is no form submission on this example.
score: 0
type: Comment

http://stackoverflow.com/q/26294952
tagged with: javascript
tagged with: jquery
has title: Set radio buttons group checked
has answer: http://stackoverflow.com/a/26295119
tagged with: radio-button
has answer: http://stackoverflow.com/a/26295023
possible better answer: http://stackoverflow.com/a/26295014
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/41259489
has answer: http://stackoverflow.com/a/26295014
tagged with: attr
has answer: http://stackoverflow.com/a/26295025
accepted answer: http://stackoverflow.com/a/26295119
downvote count: 1
has comment: http://stackoverflow.com/comment/41259487
type: AnsweredQuestion
score: -1
type: Question
upvote count: 0
has body: I trying to set the radio buttons group set checked by default, but I cant do this. I try these ways: $('tr:first').closest('input:radio').attr('checked', true); $('tr:first td input:radio').each(function(){ $(this).attr('checked', true); }); $('tr:first').closest('input:radio').attr('checked', true); Please help me, how I can solve this issue.

http://stackoverflow.com/q/26351827
tagged with: ng-options
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/26290982
linked to: http://stackoverflow.com/q/17606936
has comment: http://stackoverflow.com/comment/41363886
favorite count: 0
tagged with: angularjs
answer count: 0
has title: Model in from ng-option not displaying results | Possible dynamic model?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41363830
upvote count: 1
has comment: http://stackoverflow.com/comment/41363884
tagged with: angular-ngmodel
score: 1
type: Question
has body: I currently list a set of options for ng-options from a resource that contains JSON. [ { id:23, name:"Other" }, { id:24, name:"Crew" }, { id:25, name:"Announcer" }, { id:26, name:"Producer" }, { id:27, name:"Cameraman" }, { id:28, name:"Monitor" } ] This is all added into my scope at $scope.broadcaster = response.data. I then loop through everything in my options by a simple ng-options. &lt;select ng-model="selectedrole" ng-options="roles as roles.name for roles in broadcaster" ng-init="selectedrole=broadcaster[0]"&gt; &lt;/select&gt; Everything goes good once the page loads up. I can select from my list of names and the ng-init starts on the first selection as anticipated. However I have a few issues that I can't seem to resolve. 1) In my doc I set up {{selectedrole}} and I expected to see the contents of my model on the page reflected by my current selection. Instead I see no output at all. I can't tell if the model is even being updated properly so I'm not sure if I can use it in my formdata. 2) This select is generated on click so users can select a role for more than one person. However since the model is the same, any selection is copied over which ever one is changed. I need to find a way to output the model to check the data, but make that model dynamic so i can get a list of results from all the different selections. EDIT: Now this is really crazy. I mocked it up in a plunker and its at least showing the model just fine. Are there some conflictions I should worry about that would stop the model from updating? I literally copy pasted my data and its working in plunker but not my project. http://plnkr.co/edit/GbdOmdjj1M3OuZKO5cSq?p=preview EDIT2: Even more info. As I stated before, the select is created when a user clicks on a function that creates an ng-repeat with user information and a new select option for role. If I place the {{selectedrole}} within that ng-repeat I actually get all the data returned when I user selects it. It seems that since the click …

http://stackoverflow.com/a/26336740
has body: Perhaps you meant this: http://jsfiddle.net/t1w4gy0w/3/ Updated for both ways: http://jsfiddle.net/t1w4gy0w/4/ Slight improvement if user presses quickly: http://jsfiddle.net/t1w4gy0w/5/ $('.blackholder').parent().on('click', function(event) { if ($(this)[0] === $('.red.active').parent()[0]) { return; } var animFull = function (obj) { obj.addClass('top').finish() .css('width', '0').animate({ width: '100%'}, { duration: 1000, queue: false, complete: function () { $(this).removeClass('top'); } }); }; var moveRight = function (atag) { animFull( $('.red.active').removeClass('active').siblings('.black') ); animFull( $(atag).children('.red').addClass('active') ); }; var animZero = function (obj) { obj.addClass('top').finish() .animate({ width: '0'}, { duration: 1000, queue: false, complete: function () { $(this).removeClass('top').css('width', '100%'); } }); }; var moveLeft = function (atag) { animZero( $('.red.active').removeClass('active') ); $(atag).children('.red').addClass('active'); animZero( $(atag).children('.black') ); }; if ($('.red.active').parent().position().left < $(this).position().left) { moveRight(this); } else { moveLeft(this); } }); .blackholder { color: #000; } .black.top, .red.top { z-index: 3; } .black { z-index: 1; color: #000; left: 0; position: absolute; } .red { color: red; left: 0; position: absolute; } .red.active { z-index: 2; } Home Home Home Longer menu item Longer menu item Longer menu item Two words Two words Two words About About About Contact Contact Contact If you need any changes, like me adding comments to code, feel free to comment.
type: Answer
has comment: http://stackoverflow.com/comment/41339056
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26336293
answers question: http://stackoverflow.com/q/26336293
has comment: http://stackoverflow.com/comment/41338212
has comment: http://stackoverflow.com/comment/41336657
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26307270
has comment: http://stackoverflow.com/comment/41285443
favorite count: 0
tagged with: angularjs
type: Question
has title: Angular "controller as syntax", passing variables, and isolate scoping
upvote count: 2
tagged with: angularjs-scope
answer count: 1
has comment: http://stackoverflow.com/comment/41320487
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41318040
has comment: http://stackoverflow.com/comment/41288978
has comment: http://stackoverflow.com/comment/41319127
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26332447
has body: I was just doing this tutorial which makes a lot of sense - http://onehungrymind.com/angularjs-sticky-notes-pt-2-isolated-scope/. A fiddle provided is here: http://jsfiddle.net/simpulton/SPMfT/ It shows how to bind attributes to the parent controllers scope using @, =, &. I wanted to change the fiddle to use "controller as syntax", but can't seem to get it to work, my fiddle is here - http://jsfiddle.net/SPMfT/304/ Any thoughts on why this wouldn't work? View: Parent Scope // Update to see how parent scope interacts with component scope Attribute get: {{isolatedAttributeFoo}} set: // This does not update the parent scope. Binding get: {{isolatedBindingFoo}} set: // This does update the parent scope. Expression Submit // And this calls a function on the parent scope. JS: var myModule = angular.module('myModule', []) .directive('myComponent', function () { return { restrict:'E', scope:{ /* NOTE: Normally I would set my attributes and bindings to be the same name but I wanted to delineate between parent and isolated scope. */ isolatedAttributeFoo:'@attributeFoo', isolatedBindingFoo:'=bindingFoo', isolatedExpressionFoo:'&' } }; }) .controller('MyCtrl', ['$scope', function ($scope) { this.foo = 'Hello!'; var self = this; this.updateFoo = function (newFoo) { self.foo = newFoo; } }]);
score: 2
downvote count: 0

http://stackoverflow.com/q/26212691
tagged with: bash
tagged with: shell
has comment: http://stackoverflow.com/comment/41107803
answer count: 0
type: UnansweredQuestion
has title: Invoke JAVASCRIPT method from Shell Script
upvote count: 1
downvote count: 1
type: Question
has body: I have a OPENREPORT.js I need to call a function in that js.From Shell Script(UNIX) Can anyone tell me HOW to do this. Thanks in advance.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41107798
has comment: http://stackoverflow.com/comment/41115561
favorite count: 0
score: 0

http://stackoverflow.com/comment/41223461
has text: glad to help, i'll post my comment as answer, if i found it usefull may mark it as correct
comment on: http://stackoverflow.com/q/26269201
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/26298103
answer count: 1
duplicate of: http://stackoverflow.com/q/4053262
accepted answer: http://stackoverflow.com/a/26298156
linked to: http://stackoverflow.com/q/4053262
tagged with: http://stackoverflow.com/tag/html
tagged with: audio
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26298156
has title: Unable to add multiple audio formats to audio tag using javascript
type: Question
has body: I am trying to have three file formats in one HTML 5 Audio Tag that plays for different browser. function setAudioSource(source){ var audioTag = document.getElementById("myAudio"); console.log(source); audioTag.src = source + ".wav"; audioTag.type = "audio/wav"; console.log(source + ".wav"); audioTag.src = source + ".mp3"; audioTag.type = "audio/mp3"; console.log( source + ".mp3"); audioTag.src = source + ".aac"; audioTag.type = "audio/aac"; console.log(source + ".aac"); } The audio tag selects only the .aac file and not wav or mp3 files. It doesnt play wav or mp3 file if .aac audio is not present
tagged with: javascript
has comment: http://stackoverflow.com/comment/41265161
score: 0

http://stackoverflow.com/a/26297450
accepted answer of: http://stackoverflow.com/q/26297337
answers question: http://stackoverflow.com/q/26297337
type: Answer
score: 3
has body: In the UPDATE query, don't concatenate raw data into the values, use placeholders and pass an array for the values, in the same way as your INSERT query. An unquoted string value is likely causing the SQL syntax error. By using placeholders, you don't need to handle quotes in the values. connection.query('UPDATE SCORES_' + leaderboardName + ' SET SCORES = ? WHERE SCORES &lt; ? AND USER_EMAIL = ?', [scoreValue, scoreValue, useremail], function (err, rows, fields) {
downvote count: 0
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/a/26317097
downvote count: 0
score: 1
has body: you need to combine them on the controller side. Change my action to public PartialViewResult MyAction (int id) { MyViewModel model = new MyViewModel(id); return PartialView("PartialName", model); } then in your script instead of calling your render view function $('#divMyText').html(result); this will take the returned partial view with the tied model and put it into the div
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26316980
has comment: http://stackoverflow.com/comment/41300707
accepted answer of: http://stackoverflow.com/q/26316980
type: Answer

http://stackoverflow.com/q/26337558
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Fix position of div tag inside dialog op-up
score: 0
tagged with: css
has body: I have dialog box which comes on clicking a button. In the dialog box i have a button and other content. I want to make that button position fixed inside dialog pop-up. $(window).bind('scroll', function() { if ($(window).scrollTop() &gt; 50) { $('#footer_buttons').addClass('sticky'); } else { $('##footer_buttons').removeClass('sticky'); } }); &lt;style&gt; .sticky{ position : fixed; } &lt;/style&gt; I used above code to make the button position fix, it worked outside the dialog box but not working when the same code is used inside the dialog box. I can make a button fix by adding a min-height to dialog and make the dialog content scrollable. But I don't want to add any scroll to the content inside dialog box. Can any one help me out. Thanks in advance
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26337978
type: Question

http://stackoverflow.com/comment/41362918
has text: Well it's shared across browsers, so more likely to uniquely identify a machine. But cookies in general are the answer and have their limitations, yes.
type: AnswerComment
comment on: http://stackoverflow.com/a/26351363
score: 0
type: Comment

http://stackoverflow.com/comment/41239107
comment on: http://stackoverflow.com/a/26283651
score: 0
type: Comment
type: AnswerComment
has text: Simply needs to be adapted to take in your rand function for the time, other than that should work fine.

http://stackoverflow.com/comment/41412594
type: QuestionComment
has text: Probably I will need to think harder on scenario you've proposed, it would be great if GUID/UUID parameter could be taken off the URL. Though at this point I don't see the whole picture on how to achieve that. The main problem I see right now is: 1) identifying whether we are moving forward or backward 2) intercept `move forward` / `move backward` events Ok, suppose we could use the decorator pattern and intercept every `$state.go(...)` call, it would be a sign of the fact that we are moving forward, otherwise backward
comment on: http://stackoverflow.com/q/26350756
score: 0
type: Comment

http://stackoverflow.com/a/26217624
has comment: http://stackoverflow.com/comment/41117215
has comment: http://stackoverflow.com/comment/41116985
has comment: http://stackoverflow.com/comment/41117056
has body: You cann't Pass parameters in JavaScript as You Show Remove this from markup onclick='javascript:showme("&lt;%# Eval("ID") %&gt;")' For DataLost add in DataList_OnItemDataBound event OnItemDataBound="DataList1_OnItemDataBound" Code Behind: protected void DataList1_OnItemDataBound(object sender, DataListItemEventArgs e) { DataListItem row = e.Item; CheckBox chkDatabase = (CheckBox)row.FindControl("chkDatabase"); chkDatabase.Attributes.Add("onclick", "showme('" + ID + "')"); }
answers question: http://stackoverflow.com/q/26217596
score: 0
has comment: http://stackoverflow.com/comment/41116907
has comment: http://stackoverflow.com/comment/41117296
has comment: http://stackoverflow.com/comment/41117063
has comment: http://stackoverflow.com/comment/41116715
has comment: http://stackoverflow.com/comment/41117343
has comment: http://stackoverflow.com/comment/41117105
type: Answer

http://stackoverflow.com/q/26246796
tagged with: classname
upvote count: 1
has body: Here is the main part of my code attempting to toggle class on a p tag (info) on click of my button (btn). I'm not sure what I'm doing wrong. I have never used the className property before so I'm not sure if I'm missing something simple, or if there is fundamental error in my logic trying to attempt this. var handler = function(event){ if(info.className === 'on'){ info.className='off'; }else{ info.className='on'; } }; btn.addEventListener('click', handler);
type: AnsweredQuestion
has title: My JavaScript isn't changing className property
has comment: http://stackoverflow.com/comment/41171934
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26246848
answer count: 2
has answer: http://stackoverflow.com/a/26246848
has comment: http://stackoverflow.com/comment/41171904
tagged with: javascript
has answer: http://stackoverflow.com/a/26246870
score: 0
has comment: http://stackoverflow.com/comment/41171913
has comment: http://stackoverflow.com/comment/41172046
tagged with: dom-events
favorite count: 0
accepted answer: http://stackoverflow.com/a/26246870

http://stackoverflow.com/comment/41412089
has text: Specs don't meet reality? I could swear I've gotten zero from it back in the day. Also from setTimeout.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26320086
score: 0

http://stackoverflow.com/q/26277979
has body: Actually am trying the following one like.. A number divided by a non-numeric string becomes NaN (Not a Number): OUTPUT its giving me like.. A number divided by a non-numeric string becomes NaN (Not a Number): 10 Please explain me why its coming like this. Thanks..
type: Question
has comment: http://stackoverflow.com/comment/41228288
tagged with: javascript
has answer: http://stackoverflow.com/a/26278142
has comment: http://stackoverflow.com/comment/41228066
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/41228315
has answer: http://stackoverflow.com/a/26278152
favorite count: 0
has comment: http://stackoverflow.com/comment/41228254
has answer: http://stackoverflow.com/a/26278066
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41228222
has comment: http://stackoverflow.com/comment/41228159
downvote count: 0
score: 1
has title: Is it possible to divide a number with string in javascript?

http://stackoverflow.com/a/26196840
has body: You're not invoking the function. Change Spark.list.push[this] to Spark.list.push(this)
upvote count: 5
score: 5
has comment: http://stackoverflow.com/comment/41078563
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26196792
type: Answer
answers question: http://stackoverflow.com/q/26196792

http://stackoverflow.com/q/26211739
tagged with: ajax
has answer: http://stackoverflow.com/a/26212109
tagged with: security
tagged with: http://stackoverflow.com/tag/html
has body: I wanted to load HTML contents dynamically, such as updating a Bootstrap's modal dialog contents via AJAX call (because refreshing the page and showing the modal again is weird), but before I do that, I want to know what risks that I will need to concern when doing so, and possible solutions. The main reason to do this is that I'm developing a portlet for Liferay, and I wished to update the content of my portlet dynamically without refreshing the whole page. Of course I could return data in JSON from my server to client, but I will have to write complex client side logic to update the DOM, which the logic is probably done easier in, say, JSP Assume the webapp is HTTPS only, not sure if this will help with anything.
favorite count: 0
type: UnansweredQuestion
has title: Risk in returning HTML content on AJAX call via HTTPS
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/26212118
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41155797
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26237925
has text: To apply the duplicate to your problem: the value of `id` is either a DOM object or something that contains a DOM object (e.g., a jQuery object).

http://stackoverflow.com/a/26219294
has body: You can use the same controller by doing : {{ x.firstname }} {{ x.lastname}} id:{{ currentSelection.firstname}} name:{{ currentSelection.lastname}} With the script : function customersController($scope, $http) { $scope.currentSelection = {}; $scope.getid= function (order) { $scope.currentSelection.firstname = order.firstname; $scope.currentSelection.lastname = ordername; }; $http.get("localhostlink").success(function (response) { $scope.Id = response;}); } }
accepted answer of: http://stackoverflow.com/q/26218769
has comment: http://stackoverflow.com/comment/41121900
answers question: http://stackoverflow.com/q/26218769
type: AcceptedAnswer
upvote count: 1
has comment: http://stackoverflow.com/comment/41121265
has comment: http://stackoverflow.com/comment/41120747
has comment: http://stackoverflow.com/comment/41141451
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26329292
answer count: 0
score: 1
type: Question
downvote count: 0
tagged with: javascript
has title: ms-scroll-snap-points not working in Windows Phone
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has body: It seems that -ms-scroll-snap-points-x is not working in Windows Phone 8.1 Update 1 (IE11 Mobile) while the same thing can run properly in Windows 8.1 Update 1 (IE11 Desktop and Modern) You can test it yourself, or see this example. (the background is not important for me. I just want this scrolling behavior which is in front) It's the example from this tutorial (The JavaScript Behind Touch-Friendly Sliders). It creates this effect using -ms-scroll-snap-points-x property for IE, and with some touch events for others. Creating this effect using touch events is not an option, since they are terribly slow in Windows Phone. So, is there any workaround to simulate the effect of -ms-scroll-snap-points-x in Windows Phone? Or in general, is there any way to achieve the effect in the example and the tutorial to Windows Phone? Update: I'm using PhoneGap, if it matters.
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: windows-phone-8.1
tagged with: css

http://stackoverflow.com/q/26222599
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41126947
tagged with: css
has answer: http://stackoverflow.com/a/26222767
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26223326
tagged with: javascript
has title: Unable to link html file to jquery
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41126652
has comment: http://stackoverflow.com/comment/41126695
tagged with: jquery
has body: Unable to get jquery to do its magic, on a live website. I have tried to figure this out for myself but getting nowhere. Its just a case of linking the html and css to the jquery but I am unable to do this. Help appreciated. I have the following code: Button Magic Click Me! Below is the stylesheet: div { height: 60px; width: 100px; border-radius: 5px; background-color: #69D2E7; text-align: center; color: #FFFFFF; font-family: Verdana, Arial, Sans-Serif; opacity: 0.5; } And here's the j query magic: $(document).ready(function(){ $('div').mouseenter(function() { $('div').fadeTo('fast',1); }); });
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26276196
has body: Try this if you know which element to select: $('[aria-labelledby=ui-dialog-title-4]')
downvote count: 1
has comment: http://stackoverflow.com/comment/41226614
score: -1
has comment: http://stackoverflow.com/comment/41225778
upvote count: 0
has comment: http://stackoverflow.com/comment/41226819
type: Answer
answers question: http://stackoverflow.com/q/26276042

http://stackoverflow.com/a/26348846
has comment: http://stackoverflow.com/comment/41358752
accepted answer of: http://stackoverflow.com/q/26348737
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26348737
upvote count: 2
type: Answer
score: 2
has body: You can use map to do it: a = a.map(function(entry) { return entry + 7; }); I'm not seeing how it's "better" to create a new array rather than update the one you have. You can also use forEach: a.forEach(function(entry, index) { a[index] += 7; }); It's still a bunch of function calls (but that's not a problem), but you have the advantage (over a for loop) of not having to declare the indexing variable, and you're modifying the existing array rather than replacing it. Edit: Your "most interesting" example says even more that map is not really the best choice. a.forEach(function(entry) { entry.x += 7; });

http://stackoverflow.com/q/26262718
has title: Cannot detect click on link in table
type: Question
score: 0
has body: I am trying to detect a click on a link in a table td element , the alert is not raised on click I added a js file in my assets and added the require in my application.js application.js ... //= require albums albums.js $(function() { $("#owners tr td a").click(function() { return alert(clicked); }); }); the html is inside a modal window 1 2 suiv. Adresse courriel Identifiant Prénom Nom active.memory@example.com active_memory Active Memory albert.camus@example.com albert n/a n/a arthur.rubinstein@example.com arthur n/a n/a debbie.kind@example.com debbie Debbie Elkind sergio.mendez@example.com sergio n/a n/a what mistake did I do ?
answer count: 1
has answer: http://stackoverflow.com/a/26262828
tagged with: javascript
type: UnansweredQuestion
tagged with: ruby-on-rails-4
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41116888
comment on: http://stackoverflow.com/a/26216798
has text: sry if u not understanding, so I want to create a form that will fill in the data will be saved into the databases with the submit button, like a the table you created, so when press the save button will save all data on the contents into databases, its already correct but when i try input with 3 table(text1-text2-text3) only text1 save and another undefined(text2-text3)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26213750
has comment: http://stackoverflow.com/comment/41112535
has comment: http://stackoverflow.com/comment/41109464
upvote count: 1
has comment: http://stackoverflow.com/comment/41109807
answer count: 1
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/26215434
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26215024
accepted answer: http://stackoverflow.com/a/26215024
tagged with: css
has comment: http://stackoverflow.com/comment/41111676
has comment: http://stackoverflow.com/comment/41109729
type: AnsweredQuestion
type: Question
has title: How do I call a method when an image has been fully loaded and rendered?
tagged with: javascript
score: -1
has body: I need to call a method after an image has been loaded and fully rendered in the browser. Quick example for a big image: http://jsfiddle.net/2cLm4epv/ &lt;img width="500px" src="http://www.digivill.net/~binary/wall-covering/(huge!)14850x8000%2520earth.jpg"&gt; My method should be called when the picture is fully visible.
downvote count: 2

http://stackoverflow.com/a/26340669
score: 1
has comment: http://stackoverflow.com/comment/41354435
has body: This is pure javascript functionality. A new empty literal object is being created called 'factory' it is a different object. The line "var factory = {}" is what creates the object. From there you can add functions (methods) on this new object e.g. "message". I haven't played with Angular for a while, but the only thing that it does for you is assign this new returned object to the name you specified 'myfactory' The fact that the variable is named factory inside the function is what might be confusing you. the name could be anything like "foo" or "builder" and it would work them same. In response to your last comment see below about the factory returning an instance of "itself" The factory constructor is not returning an instance of 'itself'. The factory method takes (in this case) two parameters a "name" and function. The function returns an object (with methods,properties etc.) that provide the desired functionality. All that The factory method on myapp (angular internals) is doing is assigning 'name' to the object that is returned from the function and making it available to your controllers. Don't get hung up on the idea of angular returning a 'factory'. Angular just needs a piece of code (a provider) that provides some functionality to your controllers. For example a service could be created like this: function Houdini(){ this.doIt = function(){ alert("abracadabra"); }; } myapp.factory("mrMagic", function doSomethingGreat(){ return new Houdini() }) Later in your controller you could do mrMagic.doIt().
answers question: http://stackoverflow.com/q/26340368
upvote count: 1
has comment: http://stackoverflow.com/comment/41344054
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41152963
type: AnswerComment
score: 0
has text: This is for triggering manual navigation. However if the user clicks on an `` link with the hash which are making up the tabs, it will create the history.
type: Comment
comment on: http://stackoverflow.com/a/26236984

http://stackoverflow.com/q/26253397
tagged with: jquery-ui
tagged with: javascript
has body: I have the following JSfiddle. It's just changing the id and text of the button when you change tab and then there when you click on them it just displays an alert. I know the code works because before you change tab it works as expected. However when you change tab the id of the button is set but the click event doesn't fire. HTML Awaiting Allocation Awaiting Issued Issued Allocate Selected Parts Allocate tab Awaiting Issued tab Issued Items Jquery $( "#lineitems" ).tabs(); $('button').button(); $("#lineitems").tabs({ activate: function (event, ui) { issued = ui.newPanel.attr('id'); //Get newly selected tab //alert("tabs "+issued); switch(issued) { case "allocate": var buttonText = " Allocate Selected Parts "; $('#joblist').removeAttr("disabled"); $('button').prop('id','allocate-parts'); break; case "not-issued": var buttonText = " Issue Selected Parts "; $('#joblist').removeAttr("disabled"); $('button').prop('id','issue-parts'); break; case "issued": var buttonText = " Return Selected Parts "; $('#joblist').removeAttr("disabled"); } //End of switch $('#button-container').html(buttonText); $('button').button(); } }); $('#allocate-parts').click(function() { alert("Parts Allocated"); }); $('#issue-parts').click(function() { alert("Parts Issued"); }); On tab change I have tried changing the id in the HTML and by using $('button').prop('id','issue-parts'). But neither of them work.
tagged with: jquery-ui-tabs
score: 0
has title: Jquery not setting element ID when using .button()
tagged with: jquery
has answer: http://stackoverflow.com/a/26253911
answer count: 4
has answer: http://stackoverflow.com/a/26254328
possible better answer: http://stackoverflow.com/a/26253931
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26253931
has answer: http://stackoverflow.com/a/26253945
accepted answer: http://stackoverflow.com/a/26253911
type: Question

http://stackoverflow.com/comment/41357107
comment on: http://stackoverflow.com/q/26340758
score: 0
type: Comment
type: QuestionComment
has text: Hi RemarkLima. I've edited the original question to show the format of the data. Each array is basically an array of JSON objects with one attribute - value pair within each object. And yeah D3 library is included.

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/26252701
type: Tag
tags question: http://stackoverflow.com/q/26296635
tags question: http://stackoverflow.com/q/26219606
tags question: http://stackoverflow.com/q/26199550
tags question: http://stackoverflow.com/q/26290084

http://stackoverflow.com/q/26223599
tagged with: javascript
has answer: http://stackoverflow.com/a/26223814
score: 0
tagged with: facebook
has answer: http://stackoverflow.com/a/26223781
tagged with: facebook-javascript-sdk
has title: Facebook javascript sdk asking for birthday permission randomly
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26223814
answer count: 2
accepted answer: http://stackoverflow.com/a/26223781
has body: I need to get user_birthday and email along with some of the basic profile info for a facebook user. I am not using XFBML in my view but an HTML button that calls the following javascript function on click function loginToFacebook(){ FB.login(function(response){ console.log(JSON.stringify(response)); checkLoginState('login'); }, {scope: 'email,user_birthday'}); return false; } The issue is a little strange, When I go to login and the permission dialog pops up. basic profile and email permission is always asked but user_birthday is random. for some id`s I can see this being asked for others not. Am I missing something? any guidance? If you need other part of code, please let me know.

http://stackoverflow.com/a/26342900
downvote count: 1
answers question: http://stackoverflow.com/q/26320689
has body: I took a look at your page, but it requires authentication. I suspect you're getting this result because there's a JavaScript error that only occurs on Firefox and IE that prevents the Stripe.js code from working. I'd check the error console for that. Removing all other JavaScript that might be on the page and retesting would also confirm this theory. I'd also update your server-side code so that no charge attempt is made without having a token present. Cheers, Larry PS I work on Support at Stripe.
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/q/26300773
tagged with: javascript
favorite count: 0
tagged with: dropzone.js
has body: I have a web page that uses dropzone.js. My web page lets people choose their profile picture. If they have already set it, I want to show their picture, but allow them to change it. In an attempt to do this, I'm using the following dropzone code: var currentPicture = null; function removeCurrentPicture() { try { if (dropzone) { for (var i = 1; i < dropzone.files.length; i++) { dropzone.removeFile(dropzone.files[i-1]); } } } catch (ex1) { console.log(ex1); } return false; } function setThumbnailWidths() { var thumbnails = $("*[data-dz-thumbnail]"); for (var i=0; i<thumbnails.length; i++) { $(thumbnails[i]).css('max-width', '150px'); } } var pictureDropZone = new Dropzone("#myPicture", { url: "/profile/picture/", maxFilesize: 5, clickable: true, uploadMultiple: false, previewTemplate: previewTemplate, previewsContainer: "#previews", init: function () { dropzone = this; // add picture if it exists var pictureUrl = 'DYNAMICALLY POPULATED FROM SERVER'; if (pictureUrl) { var pictureSize = // POPULATED FROM SERVER; var pictureFileName = // POPULATED FROM SERVER; var pictureMimeType = 'img/png'; var currentPicture = { name: pictureFileName, size: pictureSize, type: pictureMimeType }; this.addFile.call(this, currentPicture); this.options.thumbnail.call(this, currentPicture, pictureUrl); this.files.push(currentPicture); $('#picturePrompt').hide(); } this.on('addedfile', function (file) { if (dropzone.files.length > 1) { removeCurrentPicture(); } $('#picturePrompt').hide(); $("#errorMessage").hide(); }); this.on('removedfile', function (file) { $('#picturePrompt').show(); }); this.on('success', function (file, res) { setThumbnailWidths(); }); this.on('error', function (e, m) { $("#previews").hide(); $("#errorMessage").html('An unknown error has happened. Please try again.'); $("#errorMessage").show(); }); } }); The HTML that complements this dropzone looks like this: Drop a picture here or just click Delete This code works unless a picture is loaded from the server when the p…
upvote count: 1
has comment: http://stackoverflow.com/comment/65510093
type: UnansweredQuestion
answer count: 0
downvote count: 0
score: 1
has title: Adding new thumbnails to dropzone.js after initialization
type: Question

http://stackoverflow.com/a/26322111
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41315226
accepted answer of: http://stackoverflow.com/q/26321914
upvote count: 2
answers question: http://stackoverflow.com/q/26321914
has comment: http://stackoverflow.com/comment/41317726
has body: This is horrible. Never ever, ever, ever integrate dynamic output directly into javascript like that. Read the plethora of reasons why this is a terrible practice here. But since you're just going to do it anyway, at least encode the JavaScript value properly first. var json = '&lt;?php echo json_encode(the_field("cure_description"), JSON_HEX_APOS) ?&gt;'; var cureDescription = JSON.parse(json); opener.postConditionPostCure(cureDescription); I'm calling json_encode with the JSON_HEX_APOS flag because I'm wrapping the JSON in ' (single quotes) in the JavaScript. You have two other more ideal options at your disposal though use ajax to get the value you need render a &lt;input type="hidden"&gt; and fetch the value using JavaScript. Both solutions avoid embedding PHP directly in your JS.
downvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26227685
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26243341
has title: JavaScript Events On An IFrame
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15080222
has comment: http://stackoverflow.com/comment/41136497
has body: Is there a way to attach an onclick event to an IFrame? I tried using the HTML attribute, but that didn't work. Then I tried surrounding it with a div, and that didn't work. Then I tried setting up a jQuery event handler, but the same result. I'm assuming that when you click inside the frame, you're not clicking in the DOM, so it doesn't pick it up. Is this correct? Anyway around it?
tagged with: iframe
type: Question
has answer: http://stackoverflow.com/a/26229066
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41288800
comment on: http://stackoverflow.com/a/26310761
has text: I suppose, the variable would be available in global scope
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/41305060
comment on: http://stackoverflow.com/q/26319836
score: 0
type: Comment
type: QuestionComment
has text: Further down the line I was planning on having the popup js handle message/data passing between the content and background scripts, while using that data for modifying elements within the display popup.

http://stackoverflow.com/a/38273220
upvote count: 2
type: Answer
score: 2
has body: I had luck just adding -webkit-transition: all .3s ease-in-out; -moz-transition: all .3s ease-in-out; transition: all .3s ease-in-out; to my css for a class on a tag and it effected the transition time for the onmouseover and onmouseout (not using any :hover css). PS in order for the onmouseover and onmouseout to effect the text inside the tag I had to put the tag for my link around the entire button, instead of inside. Hope that helps!
downvote count: 0
answers question: http://stackoverflow.com/q/26298664

http://stackoverflow.com/q/26222999
type: AnsweredQuestion
tagged with: javascript
has body: I have the below html, how to apply the styling using span for the title attribute of the div. I applied a background color for the id 'tooltip-value' and it was not applied in this case, how to make it work? Here is the jsfiddle link, http://jsfiddle.net/KendoDev/qtyL1rdm/ 1 2
accepted answer: http://stackoverflow.com/a/26223122
type: Question
score: 0
answer count: 1
has title: How to change the tooltip (title of the div) background color in html
has comment: http://stackoverflow.com/comment/41127484
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26223122
linked to: http://stackoverflow.com/q/2011142

http://stackoverflow.com/comment/41305505
type: Comment
type: QuestionComment
has text: the fourth charcter must be a letter A-Z
comment on: http://stackoverflow.com/q/26320039
score: 0

http://stackoverflow.com/q/26244062
has comment: http://stackoverflow.com/comment/41167916
has answer: http://stackoverflow.com/a/26245276
has comment: http://stackoverflow.com/comment/41167622
has title: Adding 2 Object.keys to one array
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41168258
has body: I am iterating over this in my html file to create a dynamic table header. I have a nested object $scope.tasks = [{ "Number": 159232, "Title": "BUG", "Status": "pending", "Link": "www.google.com", "Card": "www.kanban.com", "Point": { "Value": 1, "IsTimeBased": true }, "ApprovalStatus":{ "CR": true , "BA": true } }; $scope.titles = Object.keys($scope.tasks[0]); This iterates through all the non nested items but I cant figure out how to add the keys from the nested object. I tried $scope.titles.push(Object.keys($scope.tasks.ApprovalStatus[0])); But nothing seems to be working I tried a splice in this fashion as well.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26245276
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/49672471
score: 0
type: AnswerComment
has text: @lukkea Good catch, indeed `(oldValue !== newVal)` is redundant as it's never `false`.
comment on: http://stackoverflow.com/a/26308083
type: Comment

http://stackoverflow.com/comment/41313292
comment on: http://stackoverflow.com/q/26323877
type: Comment
type: QuestionComment
has text: @AdarshHegde FYI, there is a nice option called *Tidy Up* in jsfiddle...
score: 0

http://stackoverflow.com/a/26406793
type: Answer
answers question: http://stackoverflow.com/q/26254298
has body: The trick that worked was making the video as an attachment during the video upload to S3 : options = { accessKeyId : 'xxxxxxxxxxxxxxxxxxxxxxx', secretAccessKey : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx', region : 'xxxxxx' } var s3 = new AWS.S3(options); var params = { Bucket : bucketName + '/' + bucketStructure, Key: fileName, ContentType: file.type, Body: file, ServerSideEncryption: 'AES256', ACL : 'private', ContentDisposition: 'attachment; filename=' + fileName, ContentType: 'application/octet-stream' }; s3.putObject(params, function(err, data) { if(err) { // There Was An Error With Your S3 Config console.log('AWS Error : '+err.message); return false; } else { console.log('AWS Video upload done!'); } }) This would make the video to force download automatically when a signed url was used. Has worked for most of the video mime types for me.
score: 0

http://stackoverflow.com/q/26346223
tagged with: http://stackoverflow.com/tag/html
has title: Select some text in html page with JS
score: 0
type: Question
has body: I would like to select text automatically (I mean something with the Ranges) in some div to in order to unit test my script in JS. My problem is that I want to be able to select text in different ways here are some examples of selection (selection represented by [ for start and ] for end) [ here I select all the text in the div ]</div This is just a piece [ of selection] Also with [list And why not select many items ? With a p ?] but not the complete p ! I want to do that because the user can do that and so I should test every cases of use. (If I don't, the unit test is quite useless...) Do you have an idea about how to select what I want ? (if possible...)
answer count: 2
has answer: http://stackoverflow.com/a/26346679
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26346733

http://stackoverflow.com/comment/41163097
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26242090
has text: can you check the actual outgoing request and confirm if the parameters are part of it, if you are using chrome press F12 and check networks tab to see the xhr request.

http://stackoverflow.com/a/26330135
answers question: http://stackoverflow.com/q/26330049
type: Answer
has body: Just add position:relative to your .tab_container and try to move it a bit - bottom:1px. Also Reduce width of this element by 1px - width:299px Working demo: JSFIDDLE
upvote count: 1
has comment: http://stackoverflow.com/comment/41324440
score: 1
downvote count: 0

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/26222556
tags question: http://stackoverflow.com/q/26255775
tags question: http://stackoverflow.com/q/26209295
tags question: http://stackoverflow.com/q/26304517
tags question: http://stackoverflow.com/q/26317521
tags question: http://stackoverflow.com/q/26205565

http://stackoverflow.com/q/26240114
tagged with: linux
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/28128101
has title: Grunt: Error: Cannot find module './util/task'
upvote count: 1
type: Question
score: 1
tagged with: javascript
has body: I am having a problem getting grunt to work on my linux box. I checked the node_modules folder and there is a folder missing from the grunt source. This does not happen on my local machine. Grunt is installed globally but seems to be having this problem when installing locally. My Grunt version is 0.4.5 Is there a problem with grunt and linux? Error: Cannot find module './util/task' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (/home/ec2-user/my_project/node_modules/grunt/lib/grunt.js:28:19) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/41281163
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26305982
has text: For your third edit, there are a few issues : you added one parenthesis that shouldn't be there ; you don't need to add all those anti-slashes (`\"`) if you just get the string between single quotes (`'`) ; and [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element.innerHTML) is a property of the DOM element, you should set it like that : `element.innerHTML = 'Loading, please wait... ';`
type: Comment

http://stackoverflow.com/comment/41343019
comment on: http://stackoverflow.com/q/26340322
has text: Also, looking at your code, you want to use $(this) (jquery 'this') instead of the generic javascript 'this'.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/84569046
type: AnswerComment
has text: tinymce.remove("#tinytext"); work for me, no need removeData(). Thanks.
type: Comment
comment on: http://stackoverflow.com/a/26286002
score: 1

http://stackoverflow.com/comment/41310439
type: AnswerComment
comment on: http://stackoverflow.com/a/26314956
has text: if input is is not first child of the field set then you could try $("#xyz input").val(""); see http://jsfiddle.net/aodzvya7/3/
type: Comment
score: 0

http://stackoverflow.com/comment/41147427
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26233930
has text: Indeed, the function `myContainer()` is never called.

http://stackoverflow.com/comment/41220108
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26273195
score: 2
has text: @Braj `:` comes after `,` in the ASCII tables, so you need to invert the order.

radio-button
tags question: http://stackoverflow.com/q/26289830
tags question: http://stackoverflow.com/q/26346268
tag name: radio-button
tags question: http://stackoverflow.com/q/26206703
tags question: http://stackoverflow.com/q/26294952
tags question: http://stackoverflow.com/q/26253282
type: Tag
tags question: http://stackoverflow.com/q/26223952
tags question: http://stackoverflow.com/q/26211437
tags question: http://stackoverflow.com/q/26301377
tags question: http://stackoverflow.com/q/26288787

disabled-control
tags question: http://stackoverflow.com/q/26321375
tag name: disabled-control
tags question: http://stackoverflow.com/q/26329399
type: Tag

http://stackoverflow.com/a/26219917
score: 1
has body: You can't (without resorting to eval) access local variables by string. You can (but shouldn't) do it with global variables, or if the variable in question is actually a property of another object (the former being a special case since global variables are in reality properties of the window object), i.e.: var o = {}; o.car = document.getElementById('car'); o.color = document.getElementById('color'); var c = 'car'; o[c].setAttribute('name', 'bmw');
downvote count: 0
answers question: http://stackoverflow.com/q/26219858
type: Answer
upvote count: 1

http://stackoverflow.com/a/26202757
downvote count: 0
type: Answer
upvote count: 1
has body: Your problem here is that testFunction(qwerty); will not even reach the function. Javascript cannot interpret the variable 'qwerty' as it is not defined, so it will crash right there. Just for fun, here's a way to do what you request, by catching the error thrown when you try to interpret an undefined variable : function testFunction( option ){ console.log(option); } try { var myvar = "1234"; testFunction("test"); //alerts "test" testFunction(myvar); testFunction(qwerty); //alert "qwerty" }catch(e){ if(e.message.indexOf('is not defined')!==-1){ var nd = e.message.split(' ')[0]; testFunction(nd); } } JSFiddle here Bear in mind that you should absolutely never do that, instead, try using existing variables in your programs, it works better ;)
answers question: http://stackoverflow.com/q/26202625
score: 1

http://stackoverflow.com/comment/41230371
score: 1
comment on: http://stackoverflow.com/a/26276022
type: AnswerComment
has text: Thanks :)! Maybe you remove the iframe too early. I have updated my second example. So you can see how I would handle this. All of the form data in my example is send via ajax. When it was successful the function `closeIframe()` of the parent window will be called.
type: Comment

http://stackoverflow.com/a/26334535
answers question: http://stackoverflow.com/q/26333903
score: 1
downvote count: 0
type: Answer
upvote count: 1
has body: I think Mocha is waiting for sendMail result via callback. I have a similar sendMail, using nodemailer.js, in an application: function send(fr, to, sj, msg, callback){ //... var transport = nodemailer.createTransport(); console.log("Message content: "+msg); transport.sendMail({from:fr, to:to, subject: sj, text: "\r\n\r\n" + msg}, function(err,response){ if(err){ callback(err); }else{ callback(response); } }); }; In my test: describe('when this example is tested',function(done){ it('should be sending an email', function(done){ mailSender.sendMail('test@test.es', 'Test', 'Test text', function(sent){ sent.should.be.ok; done(); }); }); You get the sent in your callback and then Mocha can reach the done() method to indicate the test has finished. Also, you can use Supertest to test your endpoint. It should be something like this: it('should return 200 on /api/mail', function(done) { supertest('http://localhost:3000').post('/api/mail').expect(200) .end( function(err, res) { if (err) { return done(err); } done(); }); });

http://stackoverflow.com/q/26215470
tagged with: kendo-ui
type: AnsweredQuestion
has body: Is it possible to collapse the RecurrenceEditor inside the CustomEditorTemplate, if I change a value somewhere? I have problems with the Start value of the RecurrenceEditor's datetime, it will not update before the RecurrenceEditor has been collapsed.
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26217305
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26217305
has title: Kendo RecurrenceEditor Collapse Javascript

http://stackoverflow.com/comment/41144608
comment on: http://stackoverflow.com/a/26232243
has text: If there is a error pertaining to your code. You get that in the error as well. I will update the answer to show you one such example.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/132195227
type: Comment
comment on: http://stackoverflow.com/a/68865947
type: AnswerComment
has text: @MarcinWojnarski Except that it doesn't work when stuff ought to be appended concurrently…
score: 0

http://stackoverflow.com/a/26228921
has comment: http://stackoverflow.com/comment/41214469
has body: I have made two following changes in the code, Replaced &lt;/br&gt; to &lt;br/&gt; Added Jquery library to the Frameworks &amp; Extensions section of JSFiddle I believe it works fine, Please refer: http://jsfiddle.net/7hxv3kd4/3/
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41139111
answers question: http://stackoverflow.com/q/26228066
has comment: http://stackoverflow.com/comment/41140169
has comment: http://stackoverflow.com/comment/41139376

http://stackoverflow.com/comment/41490851
type: Comment
comment on: http://stackoverflow.com/a/26319955
has text: @mitch, see http://api.jquery.com/jQuery.extend/ The second version which takes a boolean as its first parameter will perform a deep copy(*the merging of the objects is recursive*). This is required when copying objects because the default behaviour for JS is to create references to objects. (*so `var a = {}, b=a;` then `b['key'] = 'value'` will show in both `a` and `b` since they reference the same object.*)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41350462
has text: I suggest you take a look at [Sails.js](http://sailsjs.org).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26343765
type: QuestionComment

http://stackoverflow.com/q/26239049
has comment: http://stackoverflow.com/comment/41157113
has comment: http://stackoverflow.com/comment/41157399
tagged with: jquery
has comment: http://stackoverflow.com/comment/41157228
has comment: http://stackoverflow.com/comment/41157525
has comment: http://stackoverflow.com/comment/41157196
has body: The else condition of my if/else is not firing. The condition is for the li.catparent, so that if it is clicked, I can have certain code fired. If one of the other items without 'li.catparent' is clicked, then different code will be fired. Perhaps someone could tell me what I'm missing? My if/else statement is very simple, and I'm not sure why it isn't firing. I definitely missing something. HTML: All Category 1 Category 2 Category Parent Subcategory 1 Subcategory 2 Subcategory 3 Category 1 and 2 jQuery $('ul.categorylist > li').on('click', function(){ if($(this).hasClass('catparent')){ console.log('category parent clicked'); } else{ console.log('category without parent clicked'); } }); or $('ul.categorylist > li').on('click', function(){ if($(this).hasClass('catparent')){ console.log('category parent clicked'); } else if(!$(this).hasClass('catparent')){ console.log('category without parent clicked'); } }); Here's a Fiddle that seems to be working with the simple code. Here's a fiddle with my entire project code included that shows it isn't working.
has title: Why does my if/else condition with hasClass only fire first condition?
has comment: http://stackoverflow.com/comment/41157172
has comment: http://stackoverflow.com/comment/41157209
has comment: http://stackoverflow.com/comment/41157641
has answer: http://stackoverflow.com/a/26240103
has comment: http://stackoverflow.com/comment/41157387
accepted answer: http://stackoverflow.com/a/26240103
has comment: http://stackoverflow.com/comment/41157471
has comment: http://stackoverflow.com/comment/41157933
has comment: http://stackoverflow.com/comment/41157505
possible better answer: http://stackoverflow.com/a/26240067
has comment: http://stackoverflow.com/comment/41157293
has comment: http://stackoverflow.com/comment/41157659
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41157246
type: Question
has comment: http://stackoverflow.com/comment/41157412
score: 0
has answer: http://stackoverflow.com/a/26240067
answer count: 2

http://stackoverflow.com/comment/41244898
comment on: http://stackoverflow.com/a/26265729
score: 0
type: AnswerComment
type: Comment
has text: I thought about that too, but is there another way? I don't like to crate another function which calls the function I need; a way wothout this new 'middle' function.

http://stackoverflow.com/a/26292352
type: Answer
answers question: http://stackoverflow.com/q/26292009
score: 1
upvote count: 1
has body: Your jquery should look like : $(document).ready(function() { $('.toggle-div').click(function(){ $('.djseform_field').slideToggle( "slow", function() { }); }); Your Html should : 111 222 333 toggle
downvote count: 0

http://stackoverflow.com/comment/41226564
type: Comment
comment on: http://stackoverflow.com/q/26276945
score: 0
type: QuestionComment
has text: @bboybeatle Are the `barclays` ... `numis` variables defined anywhere? Are we missing a bit of the code?

http://stackoverflow.com/q/26293332
answer count: 2
upvote count: 1
has title: How to check what was clicked in jquery?
tagged with: jquery
favorite count: 0
has body: I want to check what was clicked on whole document and save this information to target variable. I want to make some logic with knowledge about clicked target. Here is sample code: $(document).ready(function(){ console.log("Document is Ready"); event = ""; previousEvent = ""; function init() { event = ""; target = ""; } init(); function loop() { if(event==previousEvent) {event="EVENT_NOTHING"; } if(event!=previousEvent&amp;&amp;event!="EVENT_NOTHING") { console.log("EVENT: " + event); // (...) some logic (...) } previousEvent = event; } loop = setInterval(loop,100); //EVENTS $(document).keydown(function(e){ var key = e.which; if(key == "37") event = "EVENT_KEYPRESS_LEFTARROW"; else if(key == "38") event = "EVENT_KEYPRESS_UPARROW"; else if(key == "39") event = "EVENT_KEYPRESS_RIGHTARROW"; else if(key == "40") event = "EVENT_KEYPRESS_DOWNARROW"; else {event = "EVENT_KEYPRESS_UNBINDED";} }); $(document).click(function(){ event = "EVENT_KEYPRESS_CLICK"; target = ???????; //for example element in canvas, or any tag in html }); });
has answer: http://stackoverflow.com/a/26293373
accepted answer: http://stackoverflow.com/a/26293373
possible better answer: http://stackoverflow.com/a/26293385
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26293385
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41346862
type: Comment
type: QuestionComment
has text: Well when adding break points, the error occurred before creating the router or even running the router script :/ It basically throws the error as it loads the Marrionette file which is why i thought it had to be something I did wrong in the main or app file. I cant find any working marionette v2 boilerplates to cross reference with or even just use to get started with.
score: 0
comment on: http://stackoverflow.com/q/26325955

http://stackoverflow.com/a/26239673
type: Answer
has body: You can do this by using container with negative margins for both left and right #container { margin-left: -1%; margin-right: -1%; }
upvote count: 4
answers question: http://stackoverflow.com/q/26239497
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26239497
score: 4
type: AcceptedAnswer

http://stackoverflow.com/a/26207375
has comment: http://stackoverflow.com/comment/41098601
has comment: http://stackoverflow.com/comment/41098513
has body: OK, as I expected, this is another of those "99 out of 100 answers". As a rule of thumb, remember that if you're thinking of responsive design, chances of using absolute position are really slim, close to 0, because it's the absolute opposite to responsiveness, unless you're planning to deal with LOTS of media queries. So, in your case and your sample, here you have: body { background: #ccc; } .flip { -webkit-perspective: 800; width: 20vw; height: 20vh; position: relative; margin: 50px auto; display:inline-block; } .flip .card.flipped { -webkit-transform: rotatex(-180deg); } .flip .card { width: 100%; height: 100%; -webkit-transform-style: preserve-3d; -webkit-transition: 0.5s; } .flip .card .face { width: 100%; height: 100%; position: absolute; -webkit-backface-visibility: hidden; z-index: 2; font-family: Georgia; font-size: 3em; text-align: center; line-height: 200px; } .flip .card .front { position: absolute; z-index: 1; background: black; color: white; cursor: pointer; } .flip .card .back { -webkit-transform: rotatex(-180deg); background: blue; background: white; color: black; cursor: pointer; } You can add some min-width or max-width in pixels or add a media-query to change the vh/vw behavior at some point, but there you go, fully responsive behavior with (obviously) no absolute position. Always remember: if you want to use position:absolute, it should be inside a container with position:relative. While there are exceptions to this, it's an easy rule that will save you a lot of trouble at the time of positioning elements. See fiddle here
score: 0
has comment: http://stackoverflow.com/comment/41098570
answers question: http://stackoverflow.com/q/26206999
type: Answer

http://stackoverflow.com/a/26297287
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26297254
answers question: http://stackoverflow.com/q/26297254
type: AcceptedAnswer
upvote count: 2
has body: I think RainbowVis-JS is what you are looking for: $(function() { var cur = 0; var rainbow = new Rainbow(); rainbow.setNumberRange(0, 1000); // number of colors in the gradient rainbow.setSpectrum('999999', 'd40d12'); setInterval(function() { var color = rainbow.colourAt(cur); console.log(color); $('#color').css('background', '#' + color); cur++; }, 1); }); #color { width: 500px; height: 500px; } https://github.com/anomal/RainbowVis-JS
type: Answer

http://stackoverflow.com/a/26258849
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26258632
downvote count: 0
has body: You could create a function within an object that will let you overwrite the item object. &lt;script&gt; var myJSONArray = { addItem: function(itemName, cost, quantity) { this.item = {"name": itemName, "cost": cost, "quantity": quantity} return true; }, item: {name: "", cost: 0, quantity: 0} } // Usage: myJSONArray.addItem("Milk", 3.00, 1); console.log(myJSONArray.item); // returns {name: "Milk", cost: 3.00, quantity: 1} &lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/41224367
comment on: http://stackoverflow.com/a/26275702
has text: I was not trying to fix your form, just the specific issue you mentioned. If you post a JSFiddle I will correct the other issues for you. :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26406474
has comment: http://stackoverflow.com/comment/41502153
score: 0
has body: The problem is not that chrome not fires the event. It is just that the event does not exist. var oXml = document.createElement("XML"); console.log( typeof oXml.onreadystatechange ); // this prints "undefined"
has comment: http://stackoverflow.com/comment/41503282
type: Answer
has comment: http://stackoverflow.com/comment/41464092
has comment: http://stackoverflow.com/comment/41489592
answers question: http://stackoverflow.com/q/26345005

http://stackoverflow.com/q/26259753
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41194940
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41195070
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41197312
has comment: http://stackoverflow.com/comment/41195149
has body: I have a select like: 1 2 3 4 I can make angular choose 2 as the default by having the following in my controller: $scope.formData.num = 2; But how do I make it automatically select the option element with the selected attribute, rather than hard coding 2 in my controller?
has title: AngularJS - make the dropdown option with selected attribute the default

http://stackoverflow.com/a/26253911
upvote count: 1
answers question: http://stackoverflow.com/q/26253397
has comment: http://stackoverflow.com/comment/41184452
has comment: http://stackoverflow.com/comment/41184299
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26253397
score: 0
type: AcceptedAnswer
has body: Just change the click events for the buttons as below and try $(document).on("click","#allocate-parts",function() { alert("Parts Allocated"); }); $(document).on("click","#issue-parts",function() { alert("Parts Issued"); }); If still it doesn't works then update your code as //alert("tabs "+issued); switch(issued) { case "allocate": var buttonText = " Allocate Selected Parts "; break; case "not-issued": var buttonText = " Issue Selected Parts "; break; case "issued": var buttonText = " Return Selected Parts "; } //End of switch $('#button-container').empty(); $('#button-container').html(buttonText); This will definitely work. Hope this helps :)
type: Answer

http://stackoverflow.com/comment/41342072
comment on: http://stackoverflow.com/a/26335259
type: Comment
has text: Thanks very much my friend. The fact that the script takes a bit of time to download just haven't crossed my mind. Using RequireJS solved the problem. Thanks.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26216925
answers question: http://stackoverflow.com/q/26216602
has comment: http://stackoverflow.com/comment/41141054
has comment: http://stackoverflow.com/comment/41140672
score: 2
has body: ElasticSearch script engine does not support javascript, Read:why not javascript. To add an item to a array, use the add() function and not += curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{ "script":"ctx._source.tags.add(tag)", "params":{"tag":"blue"} }'
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41142249
type: Answer
accepted answer of: http://stackoverflow.com/q/26216602
upvote count: 2

http://stackoverflow.com/a/26236464
has comment: http://stackoverflow.com/comment/41152143
score: -1
downvote count: 1
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/41152171
has body: How about you use it in your HTML like this: {{show}}
answers question: http://stackoverflow.com/q/26236426

http://stackoverflow.com/q/26281617
has title: Javascript 32 bit numbers and the operators & and >>>
has body: I am trying to understand Javascript logical operators and came across 2 statements with seeminlgy similar functionality and trying to understand the difference. So, What's the difference between these 2 lines of code in Javascript? For a number x, x &gt;&gt;&gt;= 0; x &amp;= 0x7fffffff; If I understand it correctly, they both should give unsigned 32 bit output. However, for same negative value of x (i.e. most significant bit always 1 in both case), I get different outputs, what am I missing? Thanks
has comment: http://stackoverflow.com/comment/41235579
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/1822350
has comment: http://stackoverflow.com/comment/43762906
has comment: http://stackoverflow.com/comment/41236025
has answer: http://stackoverflow.com/a/28290695
type: AnsweredQuestion
tagged with: numbers
has comment: http://stackoverflow.com/comment/41235834
type: Question
accepted answer: http://stackoverflow.com/a/28290695
score: 0

http://stackoverflow.com/q/26273575
tagged with: javascript
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
has title: Simple click event google map
answer count: 1
type: AnsweredQuestion
has body: I'm trying to include this click event to my existing google map (see code below). I need it to zoom the map when a click event has happened on a marker. It currently zooms but to a different part of the map? Maybe because I have multiple markers on the same map? Edit: I've made a codepen to demonstrate here var locations = [ ['Aberdar / Aberdare', 51.710501, -3.442823, 1], ['Bangor', 53.208431, -4.185703, 2], ['Caerdydd', 51.464783, -3.163191, 3], ['Llangefni', 53.290704, -4.503386, 4], ['Caerfyrddin', 51.858370, -4.328699, 5], ['Dinbych / Denbigh', 53.193235, -3.414290, 6], ['Llanuwchllyn', 52.871170, -3.662876, 7], ['Llangrannog', 52.162539, -4.447742, 8], ['Y Drenewydd / Newtown', 52.512730, -3.312657, 9], ['Abertawe / Swansea', 51.651185, -3.959457, 10], ['Pentre Ifan', 52.008379, -4.779861, 11], ['Yr Wyddgrug/ Mold', 53.178779, -3.118454, 12] ]; function initialize() { var latlng = new google.maps.LatLng(52.407118, -2.929305); var styles = [ { "featureType": "water", "elementType": "geometry", "stylers": [ { "color": "#a2daf2" } ] }, { "featureType": "landscape.man_made", "elementType": "geometry", "stylers": [ { "color": "#f7f1df" } ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ { "color": "#d0e3b4" } ] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "color": "#bde6ab" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry", "stylers": [ { "color": "#fbd3da" } ] }, { "featureType": "poi.business", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry.fi…
has answer: http://stackoverflow.com/a/26274468
type: Question
accepted answer: http://stackoverflow.com/a/26274468

http://stackoverflow.com/q/26335356
has answer: http://stackoverflow.com/a/26335970
score: 6
accepted answer: http://stackoverflow.com/a/26336794
tagged with: mongodb
has answer: http://stackoverflow.com/a/49260450
downvote count: 0
tagged with: javascript
favorite count: 0
has title: mongodb insert a new field into an array
answer count: 5
upvote count: 6
tagged with: node.js
has answer: http://stackoverflow.com/a/26336794
linked to: http://stackoverflow.com/q/67162950
type: Question
tagged with: nosql
type: AnsweredQuestion
has body: I am trying to insert a new field to an array of objects { "_id": "543356fe0c9af6066e68970c", "createdDate": "2014-10-06 07:59 pm", "cancle": false, "eventDate": "2014/12/12", "eventstatus": true, "location": "chennai", "userId": "54310801e2659ecc3650100b", "createdBy": "one", "eventName": "tea ", "__v": 0, "friends": [ { "userId": "54310814e2659ecc3650100c", "userName": "two", "phoneNumber": "22222222" }, { "userId": "54310945e2659ecc3650100d", "userName": "three", "phoneNumber": "33333333" }, { "userId": "54334def7e85de48638d1069", "userName": "four", "phoneNumber": "44444444" } ] } I want to add "status" : 0 to all the objects inside friends array I tried using addtoset, push and multiple ways, its adding as a new object in friends array. db.events.update({},{$push:{ "friends" : {"status" : 0} }},false,true) db.events.update({},{$addToSet : {'friends' : $each: [{ 'status':0}]}},false,true) Please let me know what i am doing wrong. Thanks for your help
possible better answer: http://stackoverflow.com/a/26336619
has answer: http://stackoverflow.com/a/75226230
has answer: http://stackoverflow.com/a/26336619

http://stackoverflow.com/a/26202708
score: 0
answers question: http://stackoverflow.com/q/26202597
type: Answer
has body: First, all the delete buttons should be disabled when you first load the HTML. You can add the disabled='disabled' attribute to each delete button in your PHP code. Then in JavaScript you look for a change event on the checkbox: $("input[type='checkbox']").change(function() { var thisRow = $(this).parents("tr"); if(this.checked) { thisRow.find("a.btn-danger").attr("disabled", false); } else { thisRow.find("a.btn-danger").attr("disabled", "disabled"); } });
accepted answer of: http://stackoverflow.com/q/26202597
type: AcceptedAnswer

http://stackoverflow.com/q/26242007
has comment: http://stackoverflow.com/comment/41162787
accepted answer: http://stackoverflow.com/a/26242030
tagged with: redundancy
has title: Javascript variable redundance
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26242030
has body: I have a simple javascript function like this: function wrapVar (passVar) { var option = { varValue: passVar, hide: true, params: { ..otherparams.. } }; return option; } Eclipse and Aptana validation says that the local variable 'option' is redundant. But the meaning of "redundancy" in this case is not clear to me, what should i do to avoid it?
type: Question
tagged with: function
tagged with: javascript
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/41162767
tagged with: variables
favorite count: 0

http://stackoverflow.com/q/26282549
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
has body: I want to view all xml content, but I get only 3 element from each array , and I want to view all arrays contents. <?xml version="1.0" encoding="utf-8"?> <pma_xml_export version="1.0" xmlns:pma="http://www.phpmyadmin.net/some_doc_url/"> <pma:structure_schemas> <pma:database name="makes_data" collation="latin1_swedish_ci" charset="latin1"> <pma:table name="Sept2014"> CREATE TABLE `Sept2014` ( `Year` int(4) DEFAULT NULL, `Make` varchar(13) DEFAULT NULL, `Model` varchar(32) DEFAULT NULL, `Trim` varchar(73) DEFAULT NULL, `Engine Size` varchar(17) DEFAULT NULL, `Engine Cylinder` varchar(17) DEFAULT NULL, `Engine Compressor Type` varchar(21) DEFAULT NULL, `Transmission` varchar(17) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; </pma:table> </pma:database> </pma:structure_schemas> 2001 Acura RL 3.5 4dr Sedan 3.5L 6cyl AUTOMATIC 2001 Acura RL 3.5 4dr Sedan 3.5L 6cyl AUTOMATIC 1254 Acurattttt RL 3.5 4dr Sedan 3.5L 6cyl AUTOMATIC </pma_xml_export> html file : I get this and I don't know why it shows only 3 element of every array. 2001 Acura RL 2001 Acura RL 1254 Acurattttt RL Thank you for you help
accepted answer: http://stackoverflow.com/a/26282763
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: http://stackoverflow.com/tag/xml
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/26282763
has title: View xml with html javascript

http://stackoverflow.com/q/26293473
has title: How to dynamically check if an element has mulitple class using jquery or javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41256799
possible better answer: http://stackoverflow.com/a/26293707
has answer: http://stackoverflow.com/a/26293997
has comment: http://stackoverflow.com/comment/41259710
has comment: http://stackoverflow.com/comment/41259922
has answer: http://stackoverflow.com/a/26294504
accepted answer: http://stackoverflow.com/a/26297385
has answer: http://stackoverflow.com/a/26293707
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/26297385
has answer: http://stackoverflow.com/a/26296055
has body: How do I know a DOM element has more than one class? For instance, knowing that the element may have one or both of test and b classes, I would check if it both classes are present in the following manner: if(jQuery(a).hasClass('test') &amp;&amp; jQuery(a).hasClass('b'){ //Do something` } But I need to cover the case whereby I don't know what classes may be present.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26293701
has comment: http://stackoverflow.com/comment/41256820
score: 0
has answer: http://stackoverflow.com/a/26293659
has comment: http://stackoverflow.com/comment/41259790
has comment: http://stackoverflow.com/comment/41256938
has comment: http://stackoverflow.com/comment/41261231
has answer: http://stackoverflow.com/a/26294558
has comment: http://stackoverflow.com/comment/41257085

http://stackoverflow.com/comment/41099858
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26208475
has text: that makes sense, but how should my code look if I wanted a user to be able to click the 'sticky' image and have another one appear over it? can anyone give an example of a workaround for what I'm trying to do?
score: 0

http://stackoverflow.com/a/26228539
score: 0
has body: Okay this answers everything satisfactorily for me: http://jsfiddle.net/geoyws/4ebv4pbv/ var x = function () { alert(1); // alerts 1 x.wtf = 2; x.ftw = 3; return x.ftw; } alert(x()); // alerts 3
type: Answer
answers question: http://stackoverflow.com/q/26223615

http://stackoverflow.com/q/26323776
has comment: http://stackoverflow.com/comment/41312219
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/4170978
has answer: http://stackoverflow.com/a/26323806
tagged with: javascript
linked to: http://stackoverflow.com/q/7202157
has comment: http://stackoverflow.com/comment/41312169
score: 0
answer count: 1
duplicate of: http://stackoverflow.com/q/7202157
has comment: http://stackoverflow.com/comment/41312167
accepted answer: http://stackoverflow.com/a/26323806
favorite count: 0
has body: console.log(++[[]][+[]]+[+[]]); Why in the world does this print out 10 and not something else...? Its been driving me crazy for too long. I found this while reading the following article: http://tutorialzine.com/2013/12/the-10-weirdest-programming-languages/ Perhaps someone can provide a definitive solution. I look forward to your swift responses everyone.
has title: Why does this print out 10?
type: AnsweredQuestion

http://stackoverflow.com/comment/41159069
comment on: http://stackoverflow.com/q/26239982
has text: You have lots of typoes as well... http://plnkr.co/edit/zwbgdY?p=preview
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41261782
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26296198
score: 0
has text: Could you make a jsFiddle please?

http://stackoverflow.com/comment/41341612
type: Comment
type: QuestionComment
has text: If you change source of iframe, load will trigger automatically. Some more info here http://stackoverflow.com/questions/4249809/reload-an-iframe-with-jquery
comment on: http://stackoverflow.com/q/26339484
score: 0

http://stackoverflow.com/q/26248001
has title: Creating Playing Cards
type: Question
tagged with: object
has body: Having an issue creating objects in JavaScript. Trying to create a deck of playing cards which I can then display however I want. I am good with the HTML stuff to display them, just having an issue understanding what I am doing wrong in the JavaScript which is only creating undefined cards for me. (function () { function Card (rank, suit) { this.rank = rank; this.suit = suit; }; function Deck() { this.deck = new Array(); this.makeDeck = makeDeck; this.shuffle = shuffle; this.deal = deal; } function makeDeck() { var ranks = new Array("A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"); var suits = new Array("Clubs", "Diamonds", "Hears", "Spades"); this.deck = new Array(52); var i, j; for (i = 0; i &lt; suits.length; i++) { for (j = 0; j &lt; ranks.length; j++) { this.deck[i*ranks.length + j] = new Card(ranks[j], suits[i]); document.write("Card made \n"); } } }; function shuffle() { var i, n, j, temp; for (i = 0; i &lt; n; i++) { for (j = 0; j &lt; this.deck.length; j++) { k = Math.floor(Math.random() * this.deck.length); temp = this.deck[j]; this.deck[j] = this.deck[k]; this.deck[k] = temp; } } document.write("Cards Shuffled"); }; function deal() { if (this.deck.length &gt; 0) { return this.deck.shift(); } else return null; }; var deck = new Deck(); deck.makeDeck(); deck.shuffle(); for (i = 0; i &lt; 2; i++) { for (j = 0; j &lt; 5; j++) { var Card = new Card(deck.deal); var c = JSON.stringify(Card); document.write(this.deck[j]); } } } ());
upvote count: 5
has answer: http://stackoverflow.com/a/26248442
has answer: http://stackoverflow.com/a/26248471
has comment: http://stackoverflow.com/comment/41174145
score: 5
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26248569
accepted answer: http://stackoverflow.com/a/26248442
possible better answer: http://stackoverflow.com/a/26248569
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41174240

http://stackoverflow.com/comment/41105260
has text: That's fine, I'm just used to it because the pattern is extremely common, it saves me the `.spread` and it's also a bit faster.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26207437

do-while
tags question: http://stackoverflow.com/q/26250117
tags question: http://stackoverflow.com/q/26212287
type: Tag
tag name: do-while

http://stackoverflow.com/q/26269330
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/26265139
tagged with: javascript
has comment: http://stackoverflow.com/comment/41213090
has title: How use variable php in javascript for 2 fuction?
score: 0
has body: So i want use 2 function java Script for automatically add the new column when the contents and autosuggestion, this for example coding automatically add the new column when the contents http://jsfiddle.net/3jLbm9sp/1/ so when i try input in first column, he will be give auto suggestion for first column and add new column(second column) and give autosuggestion too. but i cant This is all my coding : Admin var data = <?php echo json_encode($code1); ?>; $txt=new Array(); $(function(){ $('#go').on('click',function(){ console.log($('form').serialize()); }) $('body').on('keydown','.last',function(){ $('.last').removeClass('last'); $('#go','body').before( ' '); }) }) <?php $code1=""; if($_GET) { $code1 = isset($_POST['code']) ? $_POST['code1'] : ''; $descrip = isset($_POST['descrip1']) ? $_POST['descrip1'] : ''; } ?> Code Description <input class="last" type="text" id="code1" name='code1' value="<?php echo $code1;?>"> if i only use autosuggestion it's work but cant add new column, and if i use add new column, I can not get auto suggestion, when i check the fail Function is in here type="text" id="code1" name="code'+(Number($(this).attr('name').match(/[0-9]+/g))+1)+'" value=""> if value is empty ="" its work for add new column,and where for autosuggestion variable (PHP) is $code1, so i try write in value=""> does anybody know how to write php variable inside a javascript function? can use another like ajax, but i don't know how.
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41213055

http://stackoverflow.com/comment/41192883
type: QuestionComment
comment on: http://stackoverflow.com/q/26258807
has text: Instead of `img` tag use a fixed-size `div` with css property `background-image` pointing to your image.
score: 3
type: Comment

http://stackoverflow.com/comment/41298637
type: QuestionComment
comment on: http://stackoverflow.com/q/26316294
score: 0
has text: On first call the length of the table = 0 so table.destroy isn't called. Then it create the datatable instance. But on the second call, when length >0, it can't destroy it.
type: Comment

http://stackoverflow.com/comment/41344407
comment on: http://stackoverflow.com/q/26341124
score: 0
has text: but what is your problem? I mean ') is for closing your ('
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41361322
type: Comment
comment on: http://stackoverflow.com/q/26350345
has text: Is it calling the original `onreadystatechange` function instead of your replacement?
score: 0
type: QuestionComment

http://stackoverflow.com/q/26195127
possible better answer: http://stackoverflow.com/a/34331334
has answer: http://stackoverflow.com/a/34331334
tagged with: css
has comment: http://stackoverflow.com/comment/41075700
has answer: http://stackoverflow.com/a/26195905
has comment: http://stackoverflow.com/comment/41075704
type: AnsweredQuestion
type: Question
has body: I have a strange problem . I wanted to build me a sticky head . On the internet I have found some instances also run, now I have so far implemented in my site. Now it is so that when I come through the peak , where the " fixed" position is set then the content jumps. This is my javascript: $(window).scroll(function() { // This is the value from which the content (gridViewTop) should be sticked var objectheight = $('header').height(); if( $(window).scrollTop() &gt; objectheight ) { $('#gridViewTop').css({position: 'fixed'}); $('#gridViewTopPH').css({display: 'block'}); } else { $('#gridViewTop').css({position: 'static', top: '0'}); $('#gridViewTopPH').css({display: 'none'}); } }); One thing: i take the value (objectheight) because i want that on mobile devices too, and there it is possible that the user expand the menu and then the value is bigger then default. (It is possible to use this on mobile devices?) Here a fiddle: http://jsfiddle.net/vjb1ag27/ But i want a smove scrolling. Any suggestions? Thanks
has title: Sticky Header jumps on scroll down
accepted answer: http://stackoverflow.com/a/26195905
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41075634
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26227574
score: 0
has body: I am trying to calculate certain numbers in an array of numbers in a pre tag. Such as count how many of the numbers are 7 or higher. For example, I have this 2 7 3 1 2 6 6 2 5 3 8 2 5 9 9 5 10 5 6 10 2 10 3 I've figured out how to get to the numbers in a general way: document.getElementsByTagName ('PRE')[0].firstChild.data = document.getElementsByTagName ('PRE')[0].firstChild.data.replace (/\t+$/, '') But I do not know how to get at the individual numbers. Is it an array? Or a list of numbers that I need to parse by space? I've looked at this thread: Using tag to display data in columns? and tried to use a for loop grabbing $entry[i], but I am not able to read individual numbers.
answer count: 4
tagged with: javascript
tagged with: pre
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26227634
has answer: http://stackoverflow.com/a/26227646
has title: Read numbers from
has answer: http://stackoverflow.com/a/26227661
has answer: http://stackoverflow.com/a/26227634
has comment: http://stackoverflow.com/comment/41136211
has answer: http://stackoverflow.com/a/26227614
accepted answer: http://stackoverflow.com/a/26227661

http://stackoverflow.com/comment/49674790
comment on: http://stackoverflow.com/a/29723019
type: AnswerComment
score: 0
type: Comment
has text: yep with Angular's jqlite !

http://stackoverflow.com/comment/41352994
type: AnswerComment
comment on: http://stackoverflow.com/a/26344134
type: Comment
has text: Cant seem to get it running. Might stick with drop down select boxes
score: 0

http://stackoverflow.com/a/26304688
has body: I understand your problem and i try to solve your problems. You can use this code. It is working. Live Working Demo HTML Code CSS Code: #main { height:410px; width:450px; border:5px solid black; } #one { height:150px; width:150px; background-color:red; border:5px solid black; position:relative; margin-left:20px; margin-top:20px; } #two { height:150px; width:150px; background-color:green; border:5px solid black; margin-top:20px; position:relative; float:left; margin-left:20px; margin-top:20px; } #three { height:60px; width:200px; background-color:blue; border:5px solid black; margin-left:20px; margin-top:10px; position:relative; float:left; display:table-cell; margin-top:-160px; } #four { height:60px; width:200px; background-color:gold; border:5px solid black; margin-left:20px; margin-top:10px; position:relative; float:left; display:table-cell; margin-top:-60px; } #five { height:60px; width:200px; background-color:purple; border:5px solid black; position:relative; float:left; display:table-cell; margin-top:40px; margin-left:-210px; } #six { height:60px; width:200px; background-color:gray; border:5px solid black; margin-left:-210px; margin-top:140px; position:relative; float:left; display:table-cell; } Result:
score: -1
answers question: http://stackoverflow.com/q/26303744
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41277961
upvote count: 0

http://stackoverflow.com/q/26213936
has title: What is the difference between the selectors #id and [id$='id']?
tagged with: javascript
tagged with: jquery
has body: What is the difference between two statements: $("span[id$='id']").text(var); // And $("#id").text(var); HTML code is :
has answer: http://stackoverflow.com/a/26213952
favorite count: 0
has comment: http://stackoverflow.com/comment/41109861
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26214487
possible better answer: http://stackoverflow.com/a/26214117
has comment: http://stackoverflow.com/comment/41110422
score: -4
has answer: http://stackoverflow.com/a/26214117
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26213952
type: Question
has comment: http://stackoverflow.com/comment/41109903
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/41109844

http://stackoverflow.com/comment/41367317
type: QuestionComment
type: Comment
has text: There is nothing wrong for 302. May I see your demo page to help further?
score: 1
comment on: http://stackoverflow.com/q/26353749

http://stackoverflow.com/q/26235922
tagged with: javascript
has answer: http://stackoverflow.com/a/26235992
has title: scope an eventhandler by reference in javascript
score: 0
has answer: http://stackoverflow.com/a/26236030
has body: I want to call a class function from within a class, which I previously attached to a button-object that resides within the class (the following code works but the scope in callMyClassFunction is on button and I want it to be the Carousel): //Examplecode 1 Carousel.prototype.addEventListeners = function(){ this.button.on('click', this.callMyClassFunction); } Carousel.prototype.callMyClassFunction = function(){ console.log(this); } If I bind the function like that it works (the scope of this is the class instance): //Examplecode 2 Carousel.prototype.addEventListeners = function(){ this.button.on('click', function(){ this.callMyClassFunction() }).bind(this); } But I'd rather want to add the click-eventlistener with a reference (like in Examplecode 1) since I want to call removeListener in yet another function: //Examplecode 3 Carousel.prototype.removeEventListeners = function(condition){ if(condition){ this.button.removeListener('click', this.callMyClassFunction); } } Any help is much appreciated!
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26236030
answer count: 2
possible better answer: http://stackoverflow.com/a/26235992

http://stackoverflow.com/comment/41260380
score: 0
type: Comment
has text: As I said It's an open issue :(
comment on: http://stackoverflow.com/a/26294688
type: AnswerComment

http://stackoverflow.com/comment/41313044
has text: the best answer is to simply read the documentation for specific your question: [#responsive-utilities](http://getbootstrap.com/css/#responsive-utilities), it cannot be explained better.
comment on: http://stackoverflow.com/q/26268044
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26240859
tagged with: javascript
linked to: http://stackoverflow.com/q/7486085
has body: I've got a 2 dimensional array (I'll call it myArray). myArray is full of 10 child arrays, each with 10 "-"s. function mapInit () { max_size = 10; board = []; map_width = Math.floor((Math.random() * max_size + max_size) / 2); map_height = Math.floor((Math.random() * max_size + max_size) / 2); boardsize = { x : map_width, y : map_height } } function generateBoard () { var columns = []; for (var i = 0; i &lt; map_height; i++) { columns.push("---"); }; for (var i = 0; i &lt; map_width; i++) { board.push(columns); }; } When I select myArray[x][y], it returns the value of the single object in that array: "-". This makes sense because I asked for that individual value. When I set myArray[x][y] = 1, it sets all [y] in the second-level arrays to 1. It should set the individual value in that specific child array to 1, because the individual value is what was just returned when I selected myArray[x][y]. What am I doing wrong / not understanding?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26241133
has title: Selecting object in 2 dimensional arrays js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26241133
type: Question
tagged with: arrays

http://stackoverflow.com/comment/41188579
type: Comment
has text: I think with `Object.keys` you don't need to use `hasOwnProperty` either.
type: AnswerComment
comment on: http://stackoverflow.com/a/26256037
score: 0

http://stackoverflow.com/comment/41295099
score: 0
comment on: http://stackoverflow.com/q/26309382
type: QuestionComment
has text: Hi kingspeech, I'm actually using the Parse API, I updated my question accordingly.
type: Comment

http://stackoverflow.com/q/26312116
accepted answer: http://stackoverflow.com/a/26312421
answer count: 2
score: 2
downvote count: 0
favorite count: 0
has body: I plan to develop a web application. In a part of the application, the user selects a text from a paragraph, and then click a save button. For example, the user selects "apple" (shown in bold) from the following text: An apple is the pomaceous fruit of the Malus domestica tree of the rose family (Rosaceae). It is one of the most widely cultivated tree fruits, and the most widely known of the many members of genus Malus that are used by humans. Malus domestica tree is often simple called as an apple tree. When the user clicks the save button, JS should add it to an object as a key-value pair. The value should be the selected text (apple in this case) while the key should be something which indicates which instance of the selected text it is. The reason is that "apple" occurs again as the second last word in the given paragraph. Something like: var object = new Object(); var textString = window.getSelection().toString(); object.indicator = textString; I'd like to keep track of which instance of "apple" (i.e. the selected text) did the user select. So is it possible to keep tract of it? The next steps are to store this object, so that when the user launches this page again or comes back here, we tell him what he had already selected.
has title: Javascript: How to find which instance of a particular text (e.g. a word which occurs more than once in a paragraph) was selected in a long paragraph?
tagged with: selectedtext
has answer: http://stackoverflow.com/a/26312421
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41291510
linked to: http://stackoverflow.com/q/3446170
upvote count: 2
possible better answer: http://stackoverflow.com/a/26312610
tagged with: local-storage
has answer: http://stackoverflow.com/a/26312610
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41372110
type: Comment
has text: I was retarded/blind yesterday, couldn't find any way of storing an external URL in the API docs. Mondays. THANK YOU!
comment on: http://stackoverflow.com/a/26355632
type: AnswerComment
score: 0

http://stackoverflow.com/q/26351951
has comment: http://stackoverflow.com/comment/41364521
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26352030
tagged with: jquery
has comment: http://stackoverflow.com/comment/41365022
has body: How do I get jQuery(document).ready(function() to fire again when an overlay div is activated? I'm using this function to hide the a.button: jQuery(function($) { jQuery(document).ready(function() { jQuery( '.theme-actions a.button.button-primary.customize.load-customize.hide-if-no-customize' ).css("display","none"); }); }); The same button with the same class exists in a "overlay" called .theme-wrap, and within .theme-wrap, the a.button CSS looks like this (the difference being .active-theme ): .theme-actions .active-theme a.button.button-primary.customize.load-customize.hide-if-no-customize If I reload the page with the .theme-wrap overlay open, the button disappears, because the jQuery document ready function fires again. I tried adding both CSS rules to the one function jQuery( '.theme-actions a.button.button-primary.customize.load-customize.hide-if-no-customize, .theme-actions .active-theme a.button.button-primary.customize.load-customize.hide-if-no-customize ').css("display","none"); but it doesn't work. How do I get document ready to fire again when the overlay opens? Update 10/14/14 As was pointed out in the answer below: there is no need for jQuery in this instance. The CSS I'm using is the same for each div - the original and the overlay - so a simple {display:none} rule added to the admin stylesheet will suffice.
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26352030
has answer: http://stackoverflow.com/a/26352489
has comment: http://stackoverflow.com/comment/41364496
accepted answer: http://stackoverflow.com/a/26352489
has comment: http://stackoverflow.com/comment/41363989
has comment: http://stackoverflow.com/comment/41363982
type: Question
has comment: http://stackoverflow.com/comment/41364015
has comment: http://stackoverflow.com/comment/41364084
has title: Make jQuery(document).ready(function() fire again when a div opens
tagged with: javascript

http://stackoverflow.com/q/26241526
has comment: http://stackoverflow.com/comment/41161786
type: AnsweredQuestion
has body: I have a bunch of Wordpress blogs that pull html from reference pages using a PHP DOM 'scraper .' It generates the path to the logo based on the url of the site and a fixed file path all the logos are known to be in. Problem is, we just implemented a CDN. The logo paths, on the blogs, went from to , the latter being obviously incorrect. I need the src to be changed to: I am familiar with .indexOf() and things like .substring(), .split(), and .pop(), but attempts to reference multiple characters, in this case remove the string before "//," failed.
possible better answer: http://stackoverflow.com/a/26241780
has answer: http://stackoverflow.com/a/26241780
type: Question
has answer: http://stackoverflow.com/a/26241583
has comment: http://stackoverflow.com/comment/41161784
tagged with: substring
has comment: http://stackoverflow.com/comment/41161921
score: 0
answer count: 2
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/41161961
accepted answer: http://stackoverflow.com/a/26241583
has title: Extract string from malformed URL using Javascript, based on multiple characters
tagged with: regex

http://stackoverflow.com/a/26306541
accepted answer of: http://stackoverflow.com/q/26259943
has body: This is what worked for me through a little trial and error. Although I am not sure if this is the most efficient solution. $('#leermat1 .pag-next').on('click',function(){ $('#leermat1').addClass('hide'); $('#leermat1').removeClass('show'); $('#leermat3').addClass('hide'); $('#leermat3').remove('show'); $('#leermat2').addClass('show'); }); $('#leermat2 .pag-next').on('click',function(){ $('#leermat1').removeClass('show'); $('#leermat2').addClass('hide'); $('#leermat2').removeClass('show'); $('#leermat3').addClass('show'); }); $('#leermat2 .pag-prev').on('click',function(){ $('#leermat2').addClass('hide'); $('#leermat2').removeClass('show'); $('#leermat1').addClass('show'); $('#leermat3').removeClass('show'); }); $('#leermat3 .pag-prev').on('click',function(){ $('#leermat3').addClass('hide'); $('#leermat2').addClass('show'); $('#leermat1').addClass('hide'); $('#leermat3').removeClass('show'); $('#leermat1').removeClass('show'); });
answers question: http://stackoverflow.com/q/26259943
type: AcceptedAnswer
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41280974

http://stackoverflow.com/a/26322907
answers question: http://stackoverflow.com/q/26322563
has comment: http://stackoverflow.com/comment/41330993
has comment: http://stackoverflow.com/comment/41331302
has comment: http://stackoverflow.com/comment/41331095
has body: if you need to update one event ( better because faster ) : .fullCalendar( 'updateEvent' , event ) else I think it's .fullCalendar( 'refetchEvents' )
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41334913

http://stackoverflow.com/comment/41295264
type: QuestionComment
comment on: http://stackoverflow.com/q/26314585
has text: Take a look at this http://www.staticshin.com/minimal-nginx-configuration-for-front-end-development/
score: 0
type: Comment

http://stackoverflow.com/q/26335435
has comment: http://stackoverflow.com/comment/41334089
tagged with: node.js
tagged with: mysql
has comment: http://stackoverflow.com/comment/41334941
has answer: http://stackoverflow.com/a/26341929
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41336463
has comment: http://stackoverflow.com/comment/41334163
has comment: http://stackoverflow.com/comment/41334071
score: 0
has comment: http://stackoverflow.com/comment/41335478
answer count: 1
has title: Node.js + MySQL doesn't get results or respond to Console.log
has body: I am new to Node.js. I wrote this code: db.query("SELECT * FROM messages", function (error, results, fields){ if(error){ console.log("test"); } if(results.length &gt; 0) { console.log(results); } }); But it doesn't work, it doesn't print anything to console. Running on Linux.
has comment: http://stackoverflow.com/comment/41335149
has comment: http://stackoverflow.com/comment/41334109
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41334203
has comment: http://stackoverflow.com/comment/41334190

http://stackoverflow.com/a/26254086
upvote count: 995
has comment: http://stackoverflow.com/comment/70264167
has comment: http://stackoverflow.com/comment/93333942
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/48477001
accepted answer of: http://stackoverflow.com/q/26253351
has comment: http://stackoverflow.com/comment/85067884
has comment: http://stackoverflow.com/comment/98864149
downvote count: 3
score: 992
type: Answer
has comment: http://stackoverflow.com/comment/50324042
has comment: http://stackoverflow.com/comment/108113020
has comment: http://stackoverflow.com/comment/50273492
has comment: http://stackoverflow.com/comment/71452627
has comment: http://stackoverflow.com/comment/72301318
has comment: http://stackoverflow.com/comment/71395122
has comment: http://stackoverflow.com/comment/59182691
has comment: http://stackoverflow.com/comment/45220248
has body: The React docs says: Treat this.state as if it were immutable. Your push will mutate the state directly and that could potentially lead to error prone code, even if you are "resetting" the state again afterwards. For example, it could lead to that some lifecycle methods like componentDidUpdate won’t trigger. The recommended approach in later React versions is to use an updater function when modifying states to prevent race conditions: this.setState(prevState => ({ arrayvar: [...prevState.arrayvar, newelement] })) The memory "waste" is not an issue compared to the errors you might face using non-standard state modifications. Alternative syntax for earlier React versions You can use concat to get a clean syntax since it returns a new array: this.setState({ arrayvar: this.state.arrayvar.concat([newelement]) }) In ES6 you can use the Spread Operator: this.setState({ arrayvar: [...this.state.arrayvar, newelement] })
has comment: http://stackoverflow.com/comment/72301408
has comment: http://stackoverflow.com/comment/69727576
has comment: http://stackoverflow.com/comment/48462613
answers question: http://stackoverflow.com/q/26253351

http://stackoverflow.com/a/26218964
has comment: http://stackoverflow.com/comment/41120748
has body: Sometimes .for loop is quite enough! Why don't you try this one inside for loop month_array[++i]; Or simply and better i += 2 at the .for statement: Demo 1: var month_array = new Array(); var cList = $('ul.mylist') month_array[0] = "January"; month_array[1] = "February"; month_array[2] = "March"; month_array[3] = "April"; month_array[4] = "May"; month_array[5] = "June"; month_array[6] = "July"; month_array[7] = "August"; month_array[8] = "September"; month_array[9] = "October"; month_array[10] = "November"; month_array[11] = "December"; for (var i = 0, l = month_array.length; i &lt; l; i+=2) { var final = month_array[i] + " &amp; " + month_array[i + 1]; var li = $('&lt;li/&gt;').html(final).appendTo(cList); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;ul class="mylist"&gt; &lt;/ul&gt; Demo 2 - Choose demo 1 is better!: var month_array = new Array(); var cList = $('ul.mylist') month_array[0] = "January"; month_array[1] = "February"; month_array[2] = "March"; month_array[3] = "April"; month_array[4] = "May"; month_array[5] = "June"; month_array[6] = "July"; month_array[7] = "August"; month_array[8] = "September"; month_array[9] = "October"; month_array[10] = "November"; month_array[11] = "December"; for (var i = 0, l = month_array.length; i &lt; l; i++) { var final = month_array[i] + " &amp; " + month_array[++i]; var li = $('&lt;li/&gt;').html(final).appendTo(cList); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;ul class="mylist"&gt; &lt;/ul&gt;
has comment: http://stackoverflow.com/comment/41119894
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/41119863
has comment: http://stackoverflow.com/comment/41120791
answers question: http://stackoverflow.com/q/26218603
has comment: http://stackoverflow.com/comment/41120434
upvote count: 4
has comment: http://stackoverflow.com/comment/41119744
downvote count: 0

http://stackoverflow.com/comment/41212326
has text: I'm curious to know what data you have to begin with. Are you passing the entire result set of this table to your view?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26268513
score: 0

http://stackoverflow.com/a/26235769
answers question: http://stackoverflow.com/q/26235398
downvote count: 0
score: 1
has body: Just to give you an idea, I didn't really test this code. You can store all countries in an object, iterate that (for (var key in countries)) and use the country key to access the right element (countries[selectedCountry]). var countries = { uk: [2, 4, 6, 8, 10, 12], fr: [30, 32, 34, 36, 38, 40] // ... }; var selectedSize = $('#size').val(); //This function changes text in all the sites text elements named #uk, #fr, #de etc.. $('#size').change(function (e) { for (var key in countries) { $("#" + key).text(countries[key][size.selectedIndex]); } }); $('#country').change(function (e) { $("#size").empty(); var countrySize; var selectedCountry = $('#country').val(); countrySize = countries[selectedCountry]; $.each(countrySize, function (val, text) { $('#size').append($('&lt;option&gt;&lt;/option&gt;').val(text).html(text)) }); e.preventDefault(); });
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41588670
has text: Hey that worked!! :) Does it always has to be called 'src'? I thought it depended on your folder name. Thanks a bunch!
comment on: http://stackoverflow.com/a/26288607
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26225222
linked to: http://stackoverflow.com/q/9479046
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26225913
linked to: http://stackoverflow.com/q/750486
linked to: http://stackoverflow.com/q/21243790
has body: Well the title is a mouthful but I couldn't come up with a better one, ideas welcome. Anyhow, I have a javascript object containing classes as properties. I want to create another object which is in every aspect equal to the first one by subclassing it. I'm gonna try to sum it up: var L1 = {}; L1.Foo = function() {/*...*/}; L1.Bar = function() {/*...*/}; //... L1.Baz = function() {/*...*/}; var L2 = {}; L2.Foo = function() { L1.Foo.call(this); /*possibily some other code here*/ }; L2.Foo.prototype = Object.create(L1.Foo.prototype); L2.Foo.prototype.constructor = L2.Foo; L2.Bar = function() { L1.Bar.call(this); /*possibily some other code here*/ }; L2.Bar.prototype = Object.create(L1.Bar.prototype); L2.Bar.prototype.constructor = L2.Bar; //... L2.Baz = function() { L1.Baz.call(this); /*possibily some other code here*/ }; L2.Baz.prototype = Object.create(L1.Baz.prototype); L2.Baz.prototype.constructor = L2.Baz; var foo = new L2.Foo(); console.log(foo); //L2.Foo var bar = new L2.Bar(); console.log(bar); //L2.Bar var baz = new L2.Baz(); console.log(baz); //L2.Baz First, working version. I told myself: "huh, looks like there a pattern here" so I went and modified my code as follows: //first 10 lines unaltered for(prop in L1) { L2[prop] = function() { L1[prop].call(this); /*Call super method by default, unless overriden below*/ }; L2[prop].prototype = Object.create(L1[prop].prototype); L2[prop].prototype.constructor = L2[prop]; } //Here I decide that I want to override only the constructor //for Foo, so naturally: L2.Foo.prototype.constructor = function() { L1.Foo.call(this); this.someOtherProperty = "foo"; }; var foo = new L2.Foo(); console.log(foo); //L2.(anonymous function)? console.log(foo.someOtherProperty); //undefined? var bar = new L2.Bar(); console.log(bar); //L2.(anonymous function)? var baz = new L2.Baz(); console.log(baz); //L2.(anonymous function)? Second, not-so-working version. What I am getting wrong?
tagged with: oop
possible better answer: http://stackoverflow.com/a/26225348
has answer: http://stackoverflow.com/a/26225348
tagged with: subclassing
type: AnsweredQuestion
tagged with: javascript
tagged with: inheritance
has answer: http://stackoverflow.com/a/26225913
linked to: http://stackoverflow.com/q/1646698
has title: Issue when trying to inherit all classes referenced by name in a for loop
type: Question
linked to: http://stackoverflow.com/q/3384504

http://stackoverflow.com/a/26281596
has comment: http://stackoverflow.com/comment/41235244
type: Answer
score: 2
has body: You can make it global by prefixing it with window. and removing it from the variable declaration at the top. The below line did the trick window.distance_bottom = calculatedistance_bottom($element_bottom , mY); DEMO
upvote count: 2
answers question: http://stackoverflow.com/q/26281548
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26281548
has comment: http://stackoverflow.com/comment/41235178

http://stackoverflow.com/comment/41260312
has text: It is indeed the solution. Thank you very much my friend!
comment on: http://stackoverflow.com/q/26284532
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41193891
comment on: http://stackoverflow.com/a/26259248
type: Comment
has text: Yes. Aelieo answered also correctly, Andrew´s fiddle worked more precisely as i wanted. Thank you both!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41214234
comment on: http://stackoverflow.com/a/26269914
type: AnswerComment
score: 0
type: Comment
has text: Iterating with prompt is still a bad idea. Like others have said if we click cancel it's undefined. If we write hello, well we don't have an multiple arrays. So your code will consistently fail. Your best bet is to use a dummy form. Each time you click `submit` add's that info. Though use some conditional statements to check against the inputs.

http://stackoverflow.com/comment/41124582
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26221438
has text: i've tried Chrome and Safari. Works fine in development on both

http://stackoverflow.com/q/26224761
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26224849
accepted answer: http://stackoverflow.com/a/26224849
has comment: http://stackoverflow.com/comment/41130920
possible better answer: http://stackoverflow.com/a/26224851
tagged with: javascript
score: 0
answer count: 3
tagged with: validation
has title: Changing Border Color When Incorrect Input With Javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I'm working on a form that is supposed to validate the input in several textboxes when the user clicks the "submit" button. If any of the required boxes are left blank or have an incorrect type of input or format, the border of those textboxes is supposed to turn red and return to the normal color when the requirements are met. For example, a phone number is either supposed to be 7 or 10 digits long, if the user enters a six digit number like (123456), the border around this field should turn red, when the user enters one more number, like (1234567), the border should go back to it's regular color immediately, without the user having to click the "submit" button again. How my code is written, the border does turn red when the user enters too few numbers, however, the submit button must be clicked for the border to go back to its original color. Is there a way to change the color back without the button being clicked a second time? Here is my code: Project 4 Phone Number:
has answer: http://stackoverflow.com/a/26224851
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/26224829
has comment: http://stackoverflow.com/comment/41130966
has comment: http://stackoverflow.com/comment/41130925
type: AnsweredQuestion

http://stackoverflow.com/a/26278244
upvote count: 1
has comment: http://stackoverflow.com/comment/41257405
answers question: http://stackoverflow.com/q/26278141
has body: 2 things: Your'e restricting the directive to E, saying it should be defined as an element, but you're using it an an attribute. Either change restrict: "E" to A or EA, or use it like: Directives need to be camel cased when used in html, that is: datepickerLocal is wrong, should be : datepicker-local
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26278141

http://stackoverflow.com/comment/41254552
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26292178
has text: `(table.rows.item(i).cells[5]).find('input').val("45");`

http://stackoverflow.com/comment/41136532
has text: True enough. Leftover from tinkering with the regexp, fixed.
score: 0
comment on: http://stackoverflow.com/a/26227661
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26254366
has comment: http://stackoverflow.com/comment/41214437
answers question: http://stackoverflow.com/q/26253779
score: 0
has body: try adding the flag --no-browser to get the logs. The configuration file seem to not work, which file did you edit (.ipython/profile_default/ipython_notebook_config.py instead of .ipython/profile_nbserver/ipython_notebook_config.py?) ? What you see is just an in-terminal browser like links. Your IPython notebook has been started correctly, just open firefox or whatever to http(s)://:port/
type: Answer

http://stackoverflow.com/q/26243758
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: innerhtml
answer count: 3
upvote count: 1
has title: value lost on keyup / .innerHTML call
has answer: http://stackoverflow.com/a/26243882
has answer: http://stackoverflow.com/a/26243860
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26243882
score: 1
possible better answer: http://stackoverflow.com/a/26243860
has body: I'm working on a project which imitates a console window. When the user presses enter, a new &lt;input&gt; text field is added to the screen and focused upon. The only problem is that the values of the previous &lt;input&gt; fields are lost in the process. Here is my code: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link rel='stylesheet' href='style.css'/&gt; &lt;script src='script.js'&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" class="console_window"/&gt; &lt;/body&gt; &lt;/html&gt; var input; function init() { function keyup(e) { switch(e.which) { case 13: document.body.innerHTML += "&lt;input type='text' class='console_window'/&gt;" input = document.getElementsByClassName("console_window")[document.getElementsByClassName("console_window").length-1]; input.focus(); break; } } document.addEventListener("keyup", keyup, false); } document.addEventListener("DOMContentLoaded", init, false); And the Fiddle. Also, I prefer not to use plugins. Thanks!
type: Question
has answer: http://stackoverflow.com/a/26244024
type: AnsweredQuestion

http://stackoverflow.com/a/26202366
answers question: http://stackoverflow.com/q/26202309
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41088404
downvote count: 0
has body: try this $(document).ready(function(){ $(document).on("click", "#clickme", function() { alert("click!"); }); });
type: Answer

http://stackoverflow.com/a/26209800
has body: I'm guessing it's because the static files aren't around. In Django 1.7, LiveServerTestCase no longer supported serving up the static files. It was moved into testing.StaticLiveServerTestCase Try changing your test classes to subclass StaticLiveServerTestCase.
upvote count: 1
answers question: http://stackoverflow.com/q/26208959
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26295462
answers question: http://stackoverflow.com/q/26294345
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41262171
type: Answer
has body: You can use fillPatternScale(scale) to scale the image, for example: $(img).load(function() { blueCircle.fillPatternImage(img); blueCircle.fillPatternOffset({x:150, y:105}); blueCircle.fillPatternScale({ x: 0.4, y: 0.4 }); layer.draw(); }); JS Fiddle
accepted answer of: http://stackoverflow.com/q/26294345
has comment: http://stackoverflow.com/comment/41262303

http://stackoverflow.com/a/26351363
answers question: http://stackoverflow.com/q/26351330
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41362884
has comment: http://stackoverflow.com/comment/41362918
has body: You can try a session or a cookie but if you're doing it client side in Javascript there is no guarantee it will not change, or they won't use another browser. If Flash is available, Flash cookies can be a possible cross-browser method. See How do I uniquely identify computers visiting my web site?

http://stackoverflow.com/q/26279157
has answer: http://stackoverflow.com/a/26279241
has answer: http://stackoverflow.com/a/26279323
tagged with: javascript
linked to: http://stackoverflow.com/q/1043957
score: 0
tagged with: file-io
answer count: 3
has comment: http://stackoverflow.com/comment/41230859
tagged with: jquery
has body: I have a file type input button that I am needing to clear completely if the user chooses to and the only safe solution I have found is to completely destroy the input and rebuild it. What I have right now works but it is a "Harp Gun" solution in that it only works once. Basically, the user has a file input like so: &lt;input type="file" name="filesToUpload" id="filesToUpload" onChange="makeFileList();" /&gt; &lt;ul id="fileList"&gt;&lt;li&gt;No Files Selected&lt;/li&gt;&lt;/ul&gt; And when they select a file, they may need to clear that completely. So I have this being built up via appending it on to the filelist: function makeFileList() { var input = document.getElementById("filesToUpload"); var ul = document.getElementById("fileList"); while (ul.hasChildNodes()) { ul.removeChild(ul.firstChild); } for (var i = 0; i &lt; input.files.length; i++) { var li = document.createElement("li"); var fileSize = input.files[i].size; li.innerHTML = input.files[i].name +"&amp;nbsp;"+ "&lt;span id=\"lblSize\"&gt;&lt;/span&gt;&lt;input onclick=\"clearFileInput()\" type=\"button\" value=\"Clear\" \/&gt;"; ul.appendChild(li); } if(!ul.hasChildNodes()) { var li = document.createElement("li"); li.innerHTML = 'No Files Selected'; ul.appendChild(li); } }; And to completely destroy the file, the function rebuilds the input like so: function clearFileInput(){ var oldInput = document.getElementById("filesToUpload"); var newInput = document.createElement("input"); newInput.type = "file"; newInput.id = oldInput.id; newInput.name = oldInput.name; newInput.className = oldInput.className; newInput.style.cssText = oldInput.style.cssText; // copy any other relevant attributes oldInput.parentNode.replaceChild(newInput, oldInput); }; So I can create the element, add the file type, and use the old input ID, class and name. But I need it to have the same onChange="makeFileList(); behavior as well. Here is a FIDDLE. Any help is appreciated.
possible better answer: http://stackoverflow.com/a/26279323
type: AnsweredQuestion
has title: Add onClick to an input being built by JavaScript
accepted answer: http://stackoverflow.com/a/26279241
has answer: http://stackoverflow.com/a/26279200
type: Question

http://stackoverflow.com/comment/41319236
type: AnswerComment
type: Comment
has text: yeah you can use a `while` if you prefer
comment on: http://stackoverflow.com/a/26327480
score: 0

http://stackoverflow.com/a/26202020
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26200800
score: 4
accepted answer of: http://stackoverflow.com/q/26200800
type: Answer
has comment: http://stackoverflow.com/comment/41096275
has body: • If you look at the canvas'context2D specification about the default blending mode ('source-over'): http://dev.w3.org/fxtf/compositing-1/#simplealphacompositing You'll see the formula used is ( i renamed the variables for clarity) : colorOut = prevColor x prevAlpha + newColor x newAlpha x (1 - prevAlpha) And for resulting alpha : αlphaOut = prevAlpha + newAlpha x (1 - prevAlpha) Notice that, a) unexpectedly, the formula is not linear (due to : newAlpha x (1 - prevAlpha) factor ). b) a point has both smaller r,g,b values and reduced alpha. So when re-using it, it will contribute for square(0.6)==0.36 to the final image. (...completely counter-intuitive...) • So what does happen for your 60% / 40% draws ? 1) image A is drawn with alpha = 60%. The formula above gives : colorOut = color_A * 0.6 ; alphaOut = 0.6 ; 2) image B is drawn with alpha = 40% colorOut = color_A * 0.6 * 0.6 + color_B x 0.4 x (0.4); alphaOut = 0.6 + 0.4 * 0.4; So final formula is ==> colorOut = 0.36 * color_A + 0.16 * color_B ; alphaOut = 0.76 ; You see that's not at all the 60/40 mix you expected. • How to fix ? 1) You can do it by hand using getImageData / putImageData. Be aware of the Cross-Origin issue : if your images don't come from your domain, their imageData will be empty. For performances, bet on a 50+ slow-down factor compared to the canvas (= the GPU) doing the job. 'real time' (=60fps) might not be possible depending on image size/computing power/browser. But you have full control. 2) But if you now look at the 'ligther' composite mode, it seems we have our guy : http://dev.w3.org/fxtf/compositing-1/#porterduffcompositingoperators_plus Formula is now : colorOut = prevColor x prevAlpha + newColor x newAlpha And for resulting alpha : αlphaOut = prevAlpha + newAlpha You see that this is a simple 'plus' operator, perfect for your requirement. So solution is : - save ctx. - set lighter composite mode. - draw first image at 60% alpha. - draw second image at 40% alpha. - restore ctx. Last wo…

http://stackoverflow.com/comment/41138330
type: Comment
comment on: http://stackoverflow.com/a/26213930
type: AnswerComment
has text: Did you fix the issue ?
score: 0

http://stackoverflow.com/comment/41551360
type: Comment
comment on: http://stackoverflow.com/a/26449178
has text: Went through the demo...I get the logic now..but the demo isn't highlighting the table row properly. It's completely white in color. And I face this exact same problem in my application too! :-(
score: 0
type: AnswerComment

http://stackoverflow.com/q/26203725
has comment: http://stackoverflow.com/comment/41090789
tagged with: reactjs
upvote count: 120
downvote count: 0
accepted answer: http://stackoverflow.com/a/26218192
favorite count: 0
answer count: 9
has answer: http://stackoverflow.com/a/49503265
has answer: http://stackoverflow.com/a/39422662
has answer: http://stackoverflow.com/a/44790041
has title: How to allow for webpack-dev-server to allow entry points from react-router
has body: I'm creating an app that uses webpack-dev-server in development alongside react-router. It seems that webpack-dev-server is built around the assumption that you will have a public entry point at one place (i.e. "/"), whereas react-router allows for an unlimited amount of entry points. I want the benefits of the webpack-dev-server, especially the hot reloading feature that is great for productivity, but I still want to be able to load routes set in react-router. How could one implement it such that they work together? Could you run an express server in front of webpack-dev-server in such a way to allow this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/44244027
has answer: http://stackoverflow.com/a/46847832
type: Question
has answer: http://stackoverflow.com/a/26218192
has answer: http://stackoverflow.com/a/46771063
has answer: http://stackoverflow.com/a/30326254
possible better answer: http://stackoverflow.com/a/28623662
tagged with: webpack
tagged with: react-router
tagged with: javascript
has answer: http://stackoverflow.com/a/28623662
linked to: http://stackoverflow.com/q/31091702
score: 120

http://stackoverflow.com/comment/41312079
has text: That's what I'm saying: why can't you use it: `.then(displayData)` where `displayData` is a function that has signature needed for the callback? It's suppose to be firing it and passing any arguments that returned with the promise, right?
score: 0
comment on: http://stackoverflow.com/a/26323682
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41556568
type: Comment
type: QuestionComment
has text: I would create a new issue on the hammer.js repo for this type of error.
comment on: http://stackoverflow.com/q/26223522
score: 0

http://stackoverflow.com/a/26278512
score: -1
upvote count: 0
has body: You could use stylized form elements to accomplish that without having to script.
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/26278427

http://stackoverflow.com/comment/41343449
comment on: http://stackoverflow.com/q/26340344
score: 0
has text: @Quentin Actually my problem i need to upload some file. so i set contenttype="multipart/form-data"
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41237944
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26280080
type: AnswerComment
has text: @RobertoGentili replace text will be `$1<something>$2` and what is the error

http://stackoverflow.com/comment/41427551
type: AnswerComment
comment on: http://stackoverflow.com/a/26328992
type: Comment
has text: @bodacydo Done. Updated the fiddle and code in the answer. If `body` has a margin, or not, `bodyMargin` will be set to that value.
score: 0

http://stackoverflow.com/a/26200911
type: Answer
has body: Generaly you'd run PHP via web server - if you put it in public folder inside www folder (let's say "test") of the web-server you can run it like - http://localhost/test/DBInit.php. But you can also run it directly via php command in the terminal: php -f DBInit.php Is this what you wanted to achieve? You can also run it via wget for example or via cron job ...
answers question: http://stackoverflow.com/q/26200858
score: 0

http://stackoverflow.com/comment/41179305
comment on: http://stackoverflow.com/a/26242311
has text: Yes you were right, promises is still empty. Cheers.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41323856
comment on: http://stackoverflow.com/a/26328483
score: 0
type: AnswerComment
type: Comment
has text: Correct. That is why I had mentioned to get the scope. The code is to illustrate using @Codel96 's existing code which seems to be using global scope.

http://stackoverflow.com/comment/41282474
score: 1
type: AnswerComment
has text: @voithos: but what if the data contains a comma? or if a number is/isnt quoted?
type: Comment
comment on: http://stackoverflow.com/a/26306963

http://stackoverflow.com/comment/41361773
score: 2
has text: It is `document.getElementsByName('uname')[0].focus()` I think.
comment on: http://stackoverflow.com/q/26350663
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26250269
has comment: http://stackoverflow.com/comment/93563357
answers question: http://stackoverflow.com/q/26244059
has comment: http://stackoverflow.com/comment/93602399
has comment: http://stackoverflow.com/comment/93602406
downvote count: 0
has body: there is a setting "Access data sources across domains" in IE 11, make sure if it is disabled:
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/93582771
score: 1

http://stackoverflow.com/q/26285118
tagged with: javascript
has answer: http://stackoverflow.com/a/26287306
answer count: 2
has body: I want to select the apply button in the following code. There are two buttons and only one button is visible. //input[@value='Apply' and @id='btn' and @name='btn' and not(ancestor::td[contains(@style,'display:none')])] I have written above XPath to select the visible one but in web driver it says unable to access the element. (browser - IE8) My question is there anyway other work around for this issue. I think there are plenty of ways to write the above xpath am i right?
downvote count: 0
favorite count: 0
has title: How to select visible element using XPath or CSS?
tagged with: css
has answer: http://stackoverflow.com/a/26292905
tagged with: selenium-webdriver
score: 2
tagged with: xpath
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: internet-explorer-8
linked to: http://stackoverflow.com/q/20355393

http://stackoverflow.com/comment/41243999
comment on: http://stackoverflow.com/q/26284681
score: 0
type: Comment
type: QuestionComment
has text: ...so `response` **is** a string not an object. Careful how you interpret `console.log` output. In Chrome, you can very easily see the difference as an object would have been output as *`Object { id: 138, ... }`* and a string as simply `{ id: 138, ... }`.

http://stackoverflow.com/q/26220223
accepted answer: http://stackoverflow.com/a/26235182
downvote count: 0
answer count: 1
tagged with: intern
favorite count: 0
tagged with: angularjs
tagged with: sinon
has comment: http://stackoverflow.com/comment/41141571
has body: I can get tests to run in Intern, but I am struggling with getting spies to work. I'm trying to integrate sinon so I can get spies. Here is a sample test file: define([ 'intern!bdd', //'intern/chai!expect', //'intern/order!node_modules/intern/chai', // 'intern/order!node_modules/chai/lib/chai', // 'intern/order!node_modules/sinon/lib/sinon', // 'intern/order!node_modules/sinon-chai/lib/sinon-chai', 'intern/order!node_modules/sinon/lib/sinon', 'intern/order!node_modules/sinon/lib/sinon/spy', 'intern/order!node_modules/sinon/lib/sinon/call', 'intern/order!node_modules/sinon/lib/sinon/behavior', 'intern/order!node_modules/sinon/lib/sinon/stub', 'intern/order!node_modules/sinon/lib/sinon/mock', 'intern/order!node_modules/sinon/lib/sinon/collection', 'intern/order!node_modules/sinon/lib/sinon/assert', 'intern/order!node_modules/sinon/lib/sinon/sandbox', 'intern/order!node_modules/sinon/lib/sinon/test', 'intern/order!node_modules/sinon/lib/sinon/test_case', 'intern/order!node_modules/sinon/lib/sinon/match', 'intern/order!vendor/src/angular/angular', 'intern/order!vendor/src/angular-mocks/angular-mocks', 'intern/order!src/common/modules/error_handling/error_handling' ], function (bdd, sinon, spy, call, behavior, stub, mock, collection, assert, sandbox, test, test_case, match) { with (bdd) { sinon.spy = spy; sinon.call = call; sinon.behavior = behavior; sinon.stub = stub; sinon.mock = mock; sinon.collection = collection; sinon.assert = assert; sinon.sandbox = sandbox; sinon.test = test; sinon.test_case = test_case; sinon.match = match; describe('Error handler module', function () { var test, scope, ctrl, error_handler, log; function inject (fn) { return function() { angular.injector(['ng', 'ngMock', 'error_handling']).invoke(fn); } } beforeEach(inject(function($log){ log = $log; })); it('should be an object', function(){ //expect(log).to.be.an('object'); }); it('should call console.trace with the string test', function(){ var spy = sinon.spy(console.trace); //expect(sinon.s…
has comment: http://stackoverflow.com/comment/41125950
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26235182
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41129388
has title: Integrating sinonjs with intern testing
has comment: http://stackoverflow.com/comment/41122137
tagged with: javascript
has comment: http://stackoverflow.com/comment/41131786

http://stackoverflow.com/comment/41179793
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26251288
has text: Think about media queries!

checkbox
tags question: http://stackoverflow.com/q/26250291
tag name: checkbox
tags question: http://stackoverflow.com/q/26282695
tags question: http://stackoverflow.com/q/26328843
tags question: http://stackoverflow.com/q/26298868
tags question: http://stackoverflow.com/q/26242817
tags question: http://stackoverflow.com/q/26343557
tags question: http://stackoverflow.com/q/26281448
tags question: http://stackoverflow.com/q/26210774
tags question: http://stackoverflow.com/q/26202962
tags question: http://stackoverflow.com/q/26344651
tags question: http://stackoverflow.com/q/26314938
tags question: http://stackoverflow.com/q/26213721
tags question: http://stackoverflow.com/q/26262020
tags question: http://stackoverflow.com/q/26232912
tags question: http://stackoverflow.com/q/26225764
tags question: http://stackoverflow.com/q/26342832
tags question: http://stackoverflow.com/q/26215091
tags question: http://stackoverflow.com/q/26270804
tags question: http://stackoverflow.com/q/26291910
tags question: http://stackoverflow.com/q/26195958
tags question: http://stackoverflow.com/q/26220352
tags question: http://stackoverflow.com/q/26337124
tags question: http://stackoverflow.com/q/26213082
tags question: http://stackoverflow.com/q/26206703
tags question: http://stackoverflow.com/q/26244033
tags question: http://stackoverflow.com/q/26282488
type: Tag
tags question: http://stackoverflow.com/q/26351979
tags question: http://stackoverflow.com/q/26220412
tags question: http://stackoverflow.com/q/26341117
tags question: http://stackoverflow.com/q/26343327

http://stackoverflow.com/comment/41300712
type: QuestionComment
has text: What do you mean, "there is no difference"? Did you read the drawn pixels back in, and their alpha channel byte is the same?
comment on: http://stackoverflow.com/q/26316418
score: 0
type: Comment

http://stackoverflow.com/comment/41344253
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26341011
type: AnswerComment
has text: Thanks! IMHO, using `hasOwnProperty` is better than the solution given by @Tip-Sy

http://stackoverflow.com/comment/41162378
type: AnswerComment
comment on: http://stackoverflow.com/a/26241733
score: 0
type: Comment
has text: where do I add that? can you paste the original code with that in there? Thanks

http://stackoverflow.com/q/26253410
accepted answer: http://stackoverflow.com/a/26253547
has title: Subtract 2 strings result decimal
type: AnsweredQuestion
type: Question
tagged with: math
tagged with: javascript
has body: I have 2 fields that have a string value, and I would like to have the result of subtraction a decimal number. Those 2 fields might have following value: 2.43 and 1.13; I know I could split the strings then do the math and then concatenate the result but I am thinking that if there isn't an easier option. I don't know why parseFloat() wouldn't work. It might be because instead of 2.43 I have 2,43 ( romanian decimal "style" ) ?
has answer: http://stackoverflow.com/a/26253547
tagged with: decimal
score: 0
answer count: 2
tagged with: string
possible better answer: http://stackoverflow.com/a/26253516
has answer: http://stackoverflow.com/a/26253516

http://stackoverflow.com/a/26241079
has body: put it in a file ie myfile.js and bind it to your html like: and make sure that you add the jquery lib before the script full code First Second Third Fourth Fifth First Second Third Fourth Fifth or just do this First Second Third Fourth Fifth First Second Third Fourth Fifth
score: 0
answers question: http://stackoverflow.com/q/26240989
type: Answer

http://stackoverflow.com/q/26319905
upvote count: 1
accepted answer: http://stackoverflow.com/a/26319955
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
has title: jQuery plug-in set options inside an option
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26319955
tagged with: plugins
type: AnsweredQuestion
has body: Not sure if my Title is the right way to ask how to do this but... Here i have a plug-in called func which sets default options: (function($){ $.fn.func= function(options){ var settings = $.extend({ color:'white', hoverColor: 'black' },options); return this.each(function(){ if(settings.color){ $(this).css('color',settings.color); } if(settings.hoverColor){ $(this).css('color',settings.hoverColor); } } Now here is where the user can change the color of the text to what they want: $('#selector').func({ color:'blue', hoverColor: 'green' }); Now here is what i want to accomplish: I want to be able to break up the hover and link options to look like the following: $('#selector').func({ link: color: 'blue' ,hover: color: 'green' }); Similar to jQuery validation plug-in HERE where they break up the rules and the message options. Let me know if you need additional information. Thanks for any and all help.
score: 1

http://stackoverflow.com/comment/41182329
score: 0
has text: apologies, I have fixed the missing details.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26252587

http://stackoverflow.com/q/26264366
has comment: http://stackoverflow.com/comment/41203694
has answer: http://stackoverflow.com/a/26264559
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41203860
accepted answer: http://stackoverflow.com/a/26264559
has title: Json submiting same data until refresh
score: 0
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26264560
has answer: http://stackoverflow.com/a/26264560
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41204377
type: AnsweredQuestion
has body: I have a problem with submiting my "form" with json. Its not form in traditional way, i will post a code now: $('#select').on('change', function() { document.getElementById("info").setAttribute("data-info", this.value); }) $('#info').on('click', function() { var id = $(this).data('info'); add(info); }); function add(info) { $.ajax({ type: 'get', cache: false, contentType: content_type, beforeSend: function(xhr) {xhr.overrideMimeType(content_type);}, data: {'action': 'info_add', 'info': info }, url: sitepath + 'info/all', success: function() { update(); } }); } data1 data2 data3 data4 Button So as you see, when select is changed it adds "data-info" attribute to div. And when div is pressed it send data-info to php script. And the problem is that it always send the same value. But after refresh it sends fine only once and than again the same value as first. Its hard to explain but here is example:lets say that i change select to "data2" and press on div. It sends "2". But then when i change it to "data3", and press on div, it still sends "2", not "3". There is no cache set or something. Sorry for bad english and thanks in advance :)
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/63857022
comment on: http://stackoverflow.com/a/37438887
has text: I have created a donut chart which shows a text value in the center hole.Is it possible to track the click of that text?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/69590808
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: When you have a rule wildcard string and a text string to match: function wcMatch(rule, text) { return (new RegExp('^' + rule.replaceAll(/([.+?^=!:${}()|\[\]\/\\])/g, "\\$1").replaceAll('*', '(.*)') + '$')).test(text) } First replaceAll escapes special characters, second one replaces * with (.*) (an expression means "any zero or more characters") For example, a string *&utm_* will be turned into an expression /^(.*)\&utm_(.*)$/
answers question: http://stackoverflow.com/q/26246601

http://stackoverflow.com/comment/41237672
has text: No, that is incorrect. You are loading jQuery Mobile in before you set `ajaxEnabled = false`. You need to set the variable *before* loading jQuery mobile.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26281855

http://stackoverflow.com/a/26319634
score: 0
answers question: http://stackoverflow.com/q/26319504
type: Answer
has body: A function defined by a function expression inherits the current scope. That is, the function forms a closure. On the other hand, a function defined by a Function constructor does not inherit any scope other than the global scope (which all functions inherit). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions Which means because you are not making an assignment as $(function(){ startPause = function(){ //var was skipped purposely alert("A"); }; }); In case you still need to use it in $(function() {}); make a global object with a namespace var stackoverflow = {}; $(function(){ stackoverflow.startPause = function(){ //var was skipped purposely alert("A"); }; }); Start but best practice would be to use $(element).on('click', function() {});

http://stackoverflow.com/a/26351949
has comment: http://stackoverflow.com/comment/41393025
accepted answer of: http://stackoverflow.com/q/26351892
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26351892
has comment: http://stackoverflow.com/comment/41363956
has comment: http://stackoverflow.com/comment/41393470
score: 0
has body: When you ask about an array of arguments, I'm assuming you're talking about arguments that are all of the same type (or similar type). It really depends upon the situation and it's a bit of a compromise between convenience for the caller and convenience for the function implementation. That means a lot of it depends upon what you most want to optimize for. There are no hard and fast rules, but you can use this sort of thinking as guidance: Use separate arguments if: The number of arguments is relatively small and usually fixed The code in the receiving function is much cleaner by having named arguments The typical way the function call is made is not by building argument lists programatically Use an array if: The number of arguments is relatively large or usually variable (caller probably wants to build an array and pass that) The receiving function is cleaner by processing a variable list of arguments in a loop (this can be done with the arguments object too, but is sometimes simpler with an actual array) A common way that the function call is made is from a list of arguments that is built programmatically (more convenient for the caller to just be able to pass the array). The called function wants to be able to easily pass the list of arguments to some other function call. While this can be done without the array by processing the arguments object, it takes more code to do if the args aren't passed in an array to start with. The caller can generally work-around either issue by using .apply() if the function isn't built to take an array, but the caller has arguments in an array. FYI (though I don't think this was the main subject of your question), another option is to pass an object with a variable number of properties. The options object is particularly useful when there are a number of different arguments and most or all are optional. The called function can contain default values for all options and the caller can just pass the arguments they want to override t…
has comment: http://stackoverflow.com/comment/41382735
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/41364406
type: Answer

http://stackoverflow.com/a/26215626
accepted answer of: http://stackoverflow.com/q/26215363
has comment: http://stackoverflow.com/comment/41113157
has comment: http://stackoverflow.com/comment/41113109
type: AcceptedAnswer
type: Answer
score: 1
upvote count: 1
has body: I think you're looking at the problem from the wrong angle. You just need to inject a content script into the iframe itself to access its contents. For that, you will need "all_frames" : true property of the content script.
answers question: http://stackoverflow.com/q/26215363
downvote count: 0

http://stackoverflow.com/comment/41091475
has text: Can you tell us what is not working?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26204107

http://stackoverflow.com/a/47683092
type: Answer
answers question: http://stackoverflow.com/q/26280356
has body: Dave, Make sure that lat, long are decimal values as such: var center = { lat: -25.363, lng: 131.044 };
score: 0

http://stackoverflow.com/comment/41221171
score: 0
type: Comment
type: QuestionComment
has text: For completeness it is located here: https://drive.google.com/file/d/0BxuZdgzIoYJCZmFRb1lRMzdMNzQ/view?usp=sharing
comment on: http://stackoverflow.com/q/26261499

http://stackoverflow.com/comment/41354338
type: QuestionComment
has text: You misspelled undefined.
comment on: http://stackoverflow.com/q/26346503
score: 1
type: Comment

http://stackoverflow.com/q/26211249
tagged with: extends
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41105302
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41105274
has answer: http://stackoverflow.com/a/26211321
has body: The above code is not alerting, and erroring out saying that undefined is not a function. Any idea why?
score: 0
answer count: 1
has title: Javascript extends does not work

http://stackoverflow.com/q/26286210
has comment: http://stackoverflow.com/comment/41260270
has comment: http://stackoverflow.com/comment/41246938
tagged with: parsing
tagged with: curl
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41247187
has comment: http://stackoverflow.com/comment/41246415
has title: Getting cURL server response and printing it in PHP
type: Question
tagged with: javascript
score: 0
has body: I have a script which uploads a file to server using cURL in PHP and I need to print or save to file the response for testing purposes (in final, I'll parse the output, but that's not what I want to say). I have the following code: <?php include 'simple_html_dom.php'; $html = file_get_html('http://uloz.to/upload'); $form = $html->find('form[id=form_upload_nginx]', 0); $adress = $form->getAttribute('action'); //echo 'Successfully parsed adress'; echo $adress; $ch = curl_init(); $file = 'C:\some-file.jpg'; $data = array('upfile_0' => "@$file"); curl_setopt($ch, CURLOPT_URL, $adress); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $out = curl_exec($ch); curl_close($ch); echo ' '; echo strip_tags($out); echo ' '; ?> And server response should look like: Redirect Now I want to get the server response and use it in the script, but the first problem is that I can't really check if the file has beeen uploaded, as the server usually can't find file I uploaded by name (but the file was almost every time uploaded successfully and found on the server, so let's say the upload works). And the second thing is that output of cURL is empty. I'm newbie in using cURL in PHP and all those things are little bit confusing for me, can someone point me to the right way?

http://stackoverflow.com/comment/41351210
comment on: http://stackoverflow.com/a/26342164
score: 0
has text: That won't work because you are trying to get the model id in C#, where @ was meant as Razor syntax (in the view context, where you have access to the model)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41282802
type: Comment
comment on: http://stackoverflow.com/a/26307320
has text: Ah perfect! I think that should do it. Still a little curious if it's available anywhere in the 'select' function, and how the plugin itself keeps track of the value so you can select it again. But this should be good enough for my purposes.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26319589
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26319468
has body: window.onload is executed when DOM tree is ready and all resources are loaded (image, script, stylesheet ...). If you load your script in body without this callback, your div width can be wrong if you load image or stylesheet into this bloc ...

http://stackoverflow.com/a/26329141
type: Answer
has comment: http://stackoverflow.com/comment/41324150
has comment: http://stackoverflow.com/comment/41322919
has comment: http://stackoverflow.com/comment/41323473
answers question: http://stackoverflow.com/q/26329019
has comment: http://stackoverflow.com/comment/41323689
accepted answer of: http://stackoverflow.com/q/26329019
has comment: http://stackoverflow.com/comment/41323327
score: 0
has comment: http://stackoverflow.com/comment/41323550
has comment: http://stackoverflow.com/comment/41324311
type: AcceptedAnswer
has body: I just edited your function. You can try it. const HIGH_AGE = 70, MAX_AGE = 120, BABIE_AGE=0, CHILDREN_AGE=4, TEEN_AGE=16; function main () { var age; while(/^(?:[1-9]+(?:[0-9]+)?|0)$/.test((age = prompt('Enter your age:'))) == false) { alert("You must enter number!"); } age = Number(age); if (age &lt; BABIE_AGE || age &gt; MAX_AGE)//if user's age are below "0" or above "120" alert('Please enter age within the range between 0-120!');//output: must enter age in valid age range else if ((age &gt;= HIGH_AGE) || (age &gt;= BABIE_AGE &amp;&amp; age &lt;= CHILDREN_AGE))//if age between 0-4 or above 70 alert('You may travel for free');//output: they can travel for free else if (age &gt;= CHILDREN_AGE &amp;&amp; age &lt;= TEEN_AGE )//if user's age are under 16 alert('You may travel with a half price ticket');//output they can travel for half-price else alert('You must travel with a full price ticket'); //others all travel with full price } Look at this code: while(/^(?:[1-9]+(?:[0-9]+)?|0)$/.test((age = prompt('Enter your age:'))) == false) { alert("You must enter number!"); } Here is working jsfiddle: http://jsfiddle.net/zono/varrwx32/14/
has comment: http://stackoverflow.com/comment/41322511
has comment: http://stackoverflow.com/comment/41323602
has comment: http://stackoverflow.com/comment/41323422
has comment: http://stackoverflow.com/comment/41323176

http://stackoverflow.com/q/26196820
accepted answer: http://stackoverflow.com/a/26209655
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have created a json webservice in ASP.NET. URL http://mydomain:21130/JSONdata.aspx?Option=GetListRootMenus Data return: {"NumberOfMenu":"2", "Menus":[{"MenuKey":"menu_home", "MenuLevel":"1" },{"MenuKey":"menu_info", "MenuLevel":"1" }]} After that, i parsed via JSONP jQuery.getJSON demo this is a param but wrong. i don't know why :(
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41078596
tagged with: asp.net
has answer: http://stackoverflow.com/a/26209655
linked to: http://stackoverflow.com/q/2067472
has title: "Uncaught SyntaxError: Unexpected token" when parse jsonp
favorite count: 0
linked to: http://stackoverflow.com/q/2887209
upvote count: 1
type: Question

http://stackoverflow.com/comment/41392262
comment on: http://stackoverflow.com/a/26351001
score: 0
type: AnswerComment
type: Comment
has text: Updated the answer with `event.preventDefault()`, also inside your pages must to be `div#main-content`. Can you link to your code?

http://stackoverflow.com/a/26227908
has body: I think parameter is not required for function. You can get the value using 'this' attribute. You can try one of the following: Using pure JavaScript: this.children[0].innerText; Using JQuery: $('.testClass', this).text();
answers question: http://stackoverflow.com/q/26227763
score: 0
type: Answer

http://stackoverflow.com/a/26765104
answers question: http://stackoverflow.com/q/26300549
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: Try the new version: http://dixso.github.io/custombox/ Regards.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26300549

http://stackoverflow.com/q/26207490
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/41098118
has title: Javascript & PHP function error
has answer: http://stackoverflow.com/a/26207577
has comment: http://stackoverflow.com/comment/41098010
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: php
score: -5
has body: I have some problem with one of the functions from my code after I decided to mix my javascript code with PHP website, most of it works I just have problem with one function after I figured out which one was that. Making the story short, can someone help me to fix this function that it will work on my PHP: function Fix(what) { var str=''; what=Math.floor(what); what=(what+'').split('').reverse(); for (var i in what) { if (i%3==0 && i>0) str=','+str; str=what[i]+str; } return str; } This function normally is working, but after I started using it on PHP instead of doing anything it shows me this: function (a){this.push.apply(this,a);return this;}function (d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent"; }var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}function (b){if(this.length!=3){return null; }var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")";}function (){for(var b=0,a=this.length;b The point of that function is to beautify the output for example instead of 1000 it shows 1,000 etc. but it looks like on PHP the code is lost somewhere in between. For example I want to use it this way: "document.getElementById("add").innerHTML=Fix(a);". The code I have in .js file, I just include it in my other .php files
has comment: http://stackoverflow.com/comment/41098232
type: Question

http://stackoverflow.com/comment/42674670
type: Comment
comment on: http://stackoverflow.com/a/26267432
has text: I have the same problem. The Session service persist all the infos until you refresh the page. So i think a way to go is using the SessionStorage to store the users data. But then you need some secure way to verify that the local user data exist on the server side, something like a Token validation. ( excuse me for typo ).
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41220111
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26273315
type: AnswerComment
has text: yup, you are right in that sense, however his code clearly shows something else in the regex :-)

http://stackoverflow.com/q/26306220
tagged with: window.open
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41281727
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/41281616
type: AnsweredQuestion
has title: Creating new windows when using backbone.js and jQuery
accepted answer: http://stackoverflow.com/a/26307390
has body: Currently I create a dialog box using jQuery and populate it using backbone like this: $("#" + dialogID ).html(new MyView({model: MyModels}).el); $( "#" + dialogID ).dialog({ width: 950, height: 500, autoOpen: true, dialogClass: dialogID, position: { my: "center", at: "center", of: window }, close: function( event, ui ){ $(this).remove(); }, title: "My dialog" }); All I want to do is make this a new window so users can move it around more liberally, so I tried: var w = window.open(); var html = $("#" + dialogID).html(); $(w.document.body).html(new MyView({model: MyModels}).el); This almost works. I lose my styles and some functionality is lost. Can someone suggest how to fix this snippet so that my styles and functionality is restored? (e.g. my data table styles are gone and some interaction with the elements in the original window). Thanks!
linked to: http://stackoverflow.com/q/18758288
type: Question
has answer: http://stackoverflow.com/a/26307390
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26234342
has comment: http://stackoverflow.com/comment/41147893
accepted answer: http://stackoverflow.com/a/26234383
tagged with: javascript
tagged with: jquery
score: -1
linked to: http://stackoverflow.com/q/499405
possible better answer: http://stackoverflow.com/a/26234362
downvote count: 2
has answer: http://stackoverflow.com/a/26234383
upvote count: 1
has answer: http://stackoverflow.com/a/26234444
favorite count: 0
has comment: http://stackoverflow.com/comment/41147913
has answer: http://stackoverflow.com/a/26234380
tagged with: http://stackoverflow.com/tag/html
has title: Changing the selected option with jQuery
has comment: http://stackoverflow.com/comment/41147866
answer count: 4
has body: I'd like to change the selected option with jQuery. Text0 Text1 TextSelected1 I'm trying with $("#idSelect").val(); or similar, but it doesn't work. Regards
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26234362
duplicate of: http://stackoverflow.com/q/499405
type: Question

http://stackoverflow.com/comment/41111849
comment on: http://stackoverflow.com/q/26215058
type: Comment
type: QuestionComment
has text: `requirement for at least three lowercase letters`. Can you please explain this part more?
score: 1

http://stackoverflow.com/q/26289566
has answer: http://stackoverflow.com/a/26310981
has comment: http://stackoverflow.com/comment/41285975
score: 0
has comment: http://stackoverflow.com/comment/41252507
answer count: 1
tagged with: excel
has body: I do not know a lot for HTML and I'm trying to log in this website through vba: www.gambolao.net That is the code I am using: Sub Login() Dim IEexp As InternetExplorer Set IEexp = New InternetExplorer IEexp.Visible = True IEexp.navigate "http://www.gambolao.net" Do While IEexp.readyState &lt;&gt; 4: DoEvents: Loop Dim userName As HTMLInputElement Set userName = IEexp.document.getElementByName("username") Dim userPW As HTMLInputElement Set userPW = IEexp.document.getElementById("password") userName.innerText = "myUsername" userPW.innerText = "myPassword" IEexp.document.getElementById("submit").Click IEexp.Quit Set IEexp = Nothing End Sub However, It looks like I am missing something. Can anybody guide me, please? Thanks!
has title: Login into a website Javascript
tagged with: javascript
type: UnansweredQuestion
tagged with: vba
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26207671
answers question: http://stackoverflow.com/q/26207410
downvote count: 0
score: 1
upvote count: 1
has body: Your code shows that you're struggling with the concept of prototypes in JS. The issue is that each student you are creating is empty. But each student refers to a single object for their actual data (the prototype). When you "change" a student, all you're doing is changing the prototype which every instance of a student shares. Instead of changing a student you change what a student inherits from. The solution is to include all the data inside the function that makes a student. There each student is given data when you use the this keyword. Whenever JS cannot find a property on an object, it searches another object (if it exists). If it cannot find the property on that object it searches another. Inheritance works in JS, because there's a way to specify what object JS will use if it cannot find a property. You can create 10 instances of a person, that all share 1 object. Although the 10 share the properties on the one, they do not each have there own data, which is your error above. Technically speaking, any function object which sets a prototype property on an object will allow all objects created from the function to share the object's properties. Hope that helps.
type: Answer

http://stackoverflow.com/a/26258232
score: 1
has body: You are treating prdElement as an array by issuing a call to push on it, but that is actually an object passed from the view: This line is what's failing. prdElement.push({ I would create a separate array to track the items being clicked var items = []; $scope.newPrdItem = function (prdElement, $event) { counter++; alert(prdElement.name); items.push({ name: prdElement.name, itemId: prdElement.itemId, shipmentId: prdElement.shipmentId, itemCode: prdElement.itemCode, description: prdElement.description, quantity: prdElement.quantity, handlingUnit: prdElement.handlingUnit, weight: prdElement.weight -10, class: prdElement.class, lenght: prdElement.lenght, width: prdElement.width, height: prdElement.height, flag: prdElement.flag, }); }
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26258112
accepted answer of: http://stackoverflow.com/q/26258112
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41266093
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26298474
has text: [`localStorage`@MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage#localStorage).

http://stackoverflow.com/comment/41199210
has text: @hindmost I tried some stuff with scrollLeft but it didnt work. Maybe I was doing it wrong. Would love to listen more about it.
comment on: http://stackoverflow.com/q/26259486
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26350153
has answer: http://stackoverflow.com/a/26350376
upvote count: 3
downvote count: 1
score: 2
tagged with: phantomjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41360787
has comment: http://stackoverflow.com/comment/41360962
type: Question
accepted answer: http://stackoverflow.com/a/26350376
has comment: http://stackoverflow.com/comment/41360897
has comment: http://stackoverflow.com/comment/41360878
has comment: http://stackoverflow.com/comment/41360937
has body: I'm running a Karma spec to test the functionality of an Angular BaseClass for my models that is outlined in an Egghead.io tutorial. The behavior seems to be working, but I'm running into a weird error: PhantomJS 1.9.7 (Mac OS X) BCCache adds a cache to the model FAILED Expected { } to equal { }. Error: Expected { } to equal { }. What I could find of this error (it's hard to search, given the characters -- suggests that toEqual should be able to recognize the two objects' equivalence -- so I'm a little stumped. Here's the spec code (coffeescript) : describe 'BCCache', -&gt; it "adds a cache to the model", -&gt; expect(Post.cached).toEqual({}) And here's what it's testing: base.coffee angular.module("BaseClass") .factory "BCBase", ['BCCache', (Cache) -&gt; Base = (attributes) -&gt; _constructor = this _prototype = _constructor.prototype _constructor.cached = new Cache() return Base ] cache.coffee angular.module('BaseClass') .factory 'BCCache', -&gt; Cache = -&gt; return Cache The spec is basically asserting that the cached method (currently) returns a new empty object, which the cache.coffee file seems to successfully do. But somehow, Karma doesn't see the two empty objects as equivalent. Any idea why? I'm a little stumped.
has comment: http://stackoverflow.com/comment/41361066
tagged with: javascript
has comment: http://stackoverflow.com/comment/41361002
favorite count: 0
linked to: http://stackoverflow.com/q/16401237
has title: Karma/Jasmine spec -- Expected { } to equal { }
tagged with: karma-jasmine
has comment: http://stackoverflow.com/comment/41361045
has comment: http://stackoverflow.com/comment/41361093
answer count: 1
has comment: http://stackoverflow.com/comment/41360861
has comment: http://stackoverflow.com/comment/41361107
tagged with: karma-runner
has comment: http://stackoverflow.com/comment/41361102
tagged with: angularjs

http://stackoverflow.com/comment/41257762
comment on: http://stackoverflow.com/q/26292697
has text: @MichalCharemza: Sorry... You 're right! Thanks for the advice
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26271890
tagged with: node.js
answer count: 2
tagged with: mysql
upvote count: 1
has answer: http://stackoverflow.com/a/26272029
possible better answer: http://stackoverflow.com/a/30985663
tagged with: sails.js
has answer: http://stackoverflow.com/a/30985663
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26272029
favorite count: 0
type: Question
has body: I have a problem where GetName is undefined in template file. The code: http://hastebin.com/wixomerapi.js But if i write console.log(results[0].name); instead of GetName = results[0].name its working fine! So whats wrong here? :/
has title: Sails.js model, select a specific column from mysql database

http://stackoverflow.com/comment/41081724
type: AnswerComment
comment on: http://stackoverflow.com/a/26195012
type: Comment
has text: Thanks for all the input. I've updated it to reflect what I originally had (same as your second fiddle). I'll keep thinking about it, but it's probably impossible to get the prototype and private instance member to work together directly.
score: 0

http://stackoverflow.com/comment/41118275
has text: Ah, passing the assimilator method is clever! I'm now using a similar initialization scheme, but asking for the 'main library object', then making case distinctions based on the API. But with the assimilator method, I can pretty much go anywhere. Thanks!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26217109
score: 1

http://stackoverflow.com/q/26331462
has comment: http://stackoverflow.com/comment/41326754
has body: I'm trying to make custom HTML5 audio event buttons. I know I can use the controls but I want to make my own my code is below: Play Pause When I load the page the audio starts but the controls won't work, I click them and nothing happens. What am I doing incorrectly? Update: I was able to figure out that had some z-index atribute issues that was pushing the buttons to the background and making them unusable. After some CSS trickery I was able to get it to work using the code below: Play Pause
type: Question
has comment: http://stackoverflow.com/comment/41326701
has comment: http://stackoverflow.com/comment/41326708
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41326721
score: 0
has comment: http://stackoverflow.com/comment/41326841
has comment: http://stackoverflow.com/comment/41326782
tagged with: http://stackoverflow.com/tag/html
tagged with: html5-audio
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41326772
has title: Custom HTML5 Audio Controls won't work
tagged with: audio
has answer: http://stackoverflow.com/a/26332227
has comment: http://stackoverflow.com/comment/41327022
has comment: http://stackoverflow.com/comment/41326773

http://stackoverflow.com/comment/41134891
comment on: http://stackoverflow.com/q/26226843
score: 0
type: Comment
type: QuestionComment
has text: Well couldn't figure out why my method wouldn't work, but instead of inserting in order I ended up just using the native Array.sort at the end that compared a.SetIndex and b.SetIndex EDIT: I wrote this at the same time intothev01d answered, that is what I ended up doing. But if anyone knows why the original didn't work it would be appreciated

http://stackoverflow.com/q/26288818
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25880331
accepted answer: http://stackoverflow.com/a/26289686
tagged with: java-stream
tagged with: java
linked to: http://stackoverflow.com/q/26290716
type: Question
has body: Firstly, I'm a JavaScript programmer, and fairly new to Java8 and trying the new functional feature. Since I expertise JS coding, I implemented my own JS lazy-functional library for proof of concept. https://github.com/kenokabe/spacetime Using the library, I could write Infinite sequence of Natural numbers and Fibonacci as below: JavaScript var spacetime = require('./spacetime'); var _ = spacetime.lazy(); var natural = _(function(n) //memoized automatically { return n; // Natural numbers is defined as the `n`th number becomes `n` }); var natural10 = _(natural) .take(10) .compute(function(x) { console.log(x); }); //wrap a recursive function to memoize // must be at the definition in the same scope var fib = _(function(n) { if (n &lt;= 1) return 1; // as the Fib definition in Math else return fib(n - 2) + fib(n - 1); // as the Fib definition in Math }); var fib10 = _(fib) .take(10) .compute(function(x) { console.log(x); }); Clear enough. The point is that I can define Natural/Fibonacci infinite sequence as the math definition as it is, then later compute the required part of the infinite sequence with lazy-evaluation. So, now I wonder if I can do the same manner with Java8. For natural sequence, I had post another Question here. Infinite sequence of Natural numbers with Java8 generator One of the way to define Natural sequence is to use iterator of Java8: Java8 IntStream natural = IntStream.iterate(0, i -&gt; i + 1); natural .limit(10) .forEach(System.out::println); I observe IntStream natural = IntStream.iterate(0, i -&gt; i + 1); is a fair definition of natural numbers in math sense. However, I wonder if it's possible to define it as I did before, that is, JavaScript var natural = _(function(n) //memoized automatically { return n; // Natural numbers is defined as the `n`th number becomes `n` }); because this looks more concise. Unfortunately, the answers suggest it's probably not possible even we use generate. In addition, IntStream.iterate does not fit for Fibonacc…
score: 5
upvote count: 5
has title: Infinite Fibonacci Sequence with Memoized in Java 8
tagged with: javascript
has answer: http://stackoverflow.com/a/26289686
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/26277330
favorite count: 0
linked to: http://stackoverflow.com/q/21650155
has comment: http://stackoverflow.com/comment/43532582
tagged with: lambda
tagged with: java-8

http://stackoverflow.com/q/26249278
downvote count: 0
has answer: http://stackoverflow.com/a/26249327
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Ajax Jquery and php: How to control feedback?
has comment: http://stackoverflow.com/comment/41176511
type: Question
possible better answer: http://stackoverflow.com/a/26249327
has comment: http://stackoverflow.com/comment/41176426
score: 1
has answer: http://stackoverflow.com/a/26249925
has comment: http://stackoverflow.com/comment/41176370
tagged with: feedback
has comment: http://stackoverflow.com/comment/41178687
answer count: 2
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/41241408
has comment: http://stackoverflow.com/comment/41176557
accepted answer: http://stackoverflow.com/a/26249925
has comment: http://stackoverflow.com/comment/41176742
has comment: http://stackoverflow.com/comment/41176399
has body: Let's suppose you're sending data through ajax. The server will process it (PHP) and sends a feedback that you can grab using Complete: function(data) { //WRITE HTML TO DIV $('#somehing').html(data) } The question is: is there a way to modify data (edit, delete) before passing it to an html element? Here's a simple example of what I mean : //php side echo 'Invalid email'; echo 'Enter your username'; echo 'fine'; echo 1; echo 2; // Jquery and Ajax $.ajax({ type: 'POST', url: 'render.php', data:values, complete: function(data) { $('#something').html(data) /* all those messages in php will be printed into #something including the numbers. how to delete or edit those numbers from appearing in #something? */ } });
type: AnsweredQuestion

http://stackoverflow.com/comment/41107814
type: Comment
has text: @ranger19 search on existing or create a new question and show what you tried and it didnt work
comment on: http://stackoverflow.com/a/26203223
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41199330
type: QuestionComment
comment on: http://stackoverflow.com/q/26261852
score: 1
has text: Based on the information you've provided here, I don't think it is possible to answer your question, because no one can reproduce your problem. If you [Edit] your question to include answers to Joe Enos's questions and it might be possible to answer.
type: Comment

http://stackoverflow.com/q/26328123
tagged with: adobe-indesign
tagged with: javascript
has title: InDesign Target XML Structure element by partial name
possible better answer: http://stackoverflow.com/a/26356253
has answer: http://stackoverflow.com/a/26356253
has answer: http://stackoverflow.com/a/26341491
score: 0
type: AnsweredQuestion
has body: In my Structure pane there are some elements that their partial name is identical, eg. image01, image03, image03 etc. I want to know if there is a way to access them via scripting using the itemByName() method, but by providing a partial name, like in CSS i can use h1[rel*="external"] Is there a similar way to do this in: var items2 = items.xmlElements.itemByName("image");
accepted answer: http://stackoverflow.com/a/26341491
type: Question
answer count: 2

http://stackoverflow.com/a/26236390
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41181217
has comment: http://stackoverflow.com/comment/41181076
type: Answer
upvote count: 4
has body: This will work for http://something.com/fizz/buzz and also for something.com/fizz/buzz function getRelativeURL(the_url) { // remove the :// and split the string by '/' var the_arr = the_url.replace('://','').split('/'); // remove the first element (the domain part) the_arr.shift(); // join again the splitted parts and return them with a '/' preceding return( '/'+the_arr.join('/') ); } See it in action here: http://jsfiddle.net/3s15sbun/
downvote count: 0
has comment: http://stackoverflow.com/comment/41166389
accepted answer of: http://stackoverflow.com/q/26236223
answers question: http://stackoverflow.com/q/26236223
score: 4
has comment: http://stackoverflow.com/comment/41152720

http://stackoverflow.com/q/26238328
downvote count: 2
upvote count: 1
has title: php get link herf and text if they contain set text
accepted answer: http://stackoverflow.com/a/26238678
type: Question
has body: How do i get the herf link and the text from a link like so boom i need the google.com part and the boom text only ? also how do i filter out the links to make sure i only get the herf for the link with the text boom because the page has links like this boom boom1 boom2 boom3
has comment: http://stackoverflow.com/comment/41155867
score: -1
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41155569
tagged with: jquery
has comment: http://stackoverflow.com/comment/41155878
has comment: http://stackoverflow.com/comment/41155643
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26238678
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26238370
has answer: http://stackoverflow.com/a/26238370

http://stackoverflow.com/q/26273550
tagged with: url-routing
tagged with: node.js
type: AnsweredQuestion
tagged with: dynamic
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: express
has title: Dynamic routing with express framework in node
has body: I'm using express framework 4.0 for my node js server . I was wondering if there was any way to remove routes dynamically at runtime var express = require('express'); var router = express.Router(/*Options */); router.get('/', function (req, res) { res.render('index', {title: "Home"}); }); router.get('/features', function (req, res) { res.render('features', {title: "Features"}); }); //Hook into the routing system module.exports = function(app,rootPath) { app.use(rootPath, router); }; This is a trivial example, but how could I remove the /features path from the routing table?Additionally is it possible to overwrite this routing path with another should I wish to update the features routing path at a later date ?
accepted answer: http://stackoverflow.com/a/26273953
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26273953

http://stackoverflow.com/comment/41269576
comment on: http://stackoverflow.com/q/26300394
has text: You do `$("#divToBeClicked").on('click', otherFunction);`. And I think you need a selector after the event.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41089409
score: 0
type: AnswerComment
has text: >This is a bad practice Why so? It's a code reuse. DRY principle.
comment on: http://stackoverflow.com/a/26202779
type: Comment

http://stackoverflow.com/a/26270236
has comment: http://stackoverflow.com/comment/41214847
answers question: http://stackoverflow.com/q/26270092
score: 1
upvote count: 1
has body: I am assuming that you are talking about loops, and a comparing variable in it. If so, If you want to compare a variable in a loop of millions of iteration, I would like you to prefer this. if ( moreThanZero &gt; 0 ) { // Your code goes here....... } Because, if ( !moreThanZero ) { //Do something } says Do something if moreThanZero is not zero. It doesn't mean that moreThanZero is Greater than zero, it might be Less than zero too.. if ( moreThanZero != 0 ) { ... } will also be discarded for the same reason. So, if ( moreThanZero > 0 ){.....} might be the answer you were expecting.
has comment: http://stackoverflow.com/comment/41214632
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41343291
has text: From what I can see here, you're using different libraries to get different responses (JQuery vs Angular). You ought to factor that into your assessment.
score: 0
comment on: http://stackoverflow.com/q/26303940
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41324544
has text: google "css tutorial" ...
score: 1
comment on: http://stackoverflow.com/q/26330323
type: Comment
type: QuestionComment

http://stackoverflow.com/a/56437935
score: 0
type: Answer
has body: There's a new WebComponent to integrate Phaser with any other Framework https://github.com/proyecto26/ion-phaser
answers question: http://stackoverflow.com/q/26349588

http://stackoverflow.com/q/26220890
tagged with: jquery
has comment: http://stackoverflow.com/comment/41124108
has answer: http://stackoverflow.com/a/26240224
type: Question
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/41136264
has comment: http://stackoverflow.com/comment/41123362
has comment: http://stackoverflow.com/comment/41123436
score: 0
answer count: 1
has title: How to load data from mysql with fadein one by one loop?
has comment: http://stackoverflow.com/comment/41126268
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41124268
has comment: http://stackoverflow.com/comment/41123542
has body: How to load data from mysql with fadein one by one loop ? OK, i will load image from mysql total 40 image Then i want to display <img src="<?PHP echo $img_products[0]; ?>"/> with fadein and delay 0.5 sec. And then display <img src="<?PHP echo $img_products[1]; ?>"/> with fadein and delay 0.5 sec. And then display <img src="<?PHP echo $img_products[2]; ?>"/> with fadein and delay 0.5 sec. And then display <img src="<?PHP echo $img_products[3]; ?>"/> until display to <img src="<?PHP echo $img_products[39]; ?>"/> i try to using loop for PHP to do that , but not work, How an i do that ? <?PHP for($i=0;$i<40;$i++) { $strSQL = "SELECT * FROM products WHERE data_type = '$strID' order by id desc Limit $i,1 "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $objResult = mysql_fetch_array($objQuery); $img_products[$i] = $objResult["img_path"]; } for($i=0;$i<40;$i++) { <img src="<?PHP echo $img_products[$i]; ?>"/> } ?>

http://stackoverflow.com/comment/41120020
type: Comment
has text: I think it's because `querySelectorAll`returns a `NodeList`. You may try with `document.getElementsByClassName('stopover icon img')[0]`
comment on: http://stackoverflow.com/a/26214107
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41161436
type: AnswerComment
comment on: http://stackoverflow.com/a/26241160
type: Comment
has text: name is defined... and this code don't help me class not added yet
score: 0

http://stackoverflow.com/comment/41172592
score: 0
type: Comment
has text: The Problem with Regex is that have is that in the real world scenario the content of the array will be hyperlinks and I will compare them to (document.URL). Let's say the string/url in the array is http://bird1.com If the documentUrl is http://bird1.com I need to return that, but if it is http://bird1.com?param=letsfly that needs to be returned, too. How do I solve that the most efficient way? :/
comment on: http://stackoverflow.com/a/26246903
type: AnswerComment

slick.js
tag name: slick.js
tags question: http://stackoverflow.com/q/26346205
type: Tag

http://stackoverflow.com/comment/41257315
comment on: http://stackoverflow.com/q/26293617
has text: @LearningNeverStops tried that, that plugin will validate the whole form in once while I only at that time need that page to be validated.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41081164
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26198157
has text: Which version of express? My understanding is that this works differently in Express 3 vs. Express 4.
type: Comment

http://stackoverflow.com/a/26279340
answers question: http://stackoverflow.com/q/26279309
score: 1
has body: var weblayout = { data : { rows : function() { return 1; } } }; weblayout.data.rows();// call the function row() DEMO or var weblayout = { data : { rows : function() { return 1; } } }; var fctRow = weblayout.data.rows();// call the function row() alert(fctRow); DEMO
type: Answer
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/26310863
type: Question
tagged with: api
answer count: 1
tagged with: javascript
has title: Using Customer.io how to send 2 different emails simultaneously to two different users at the same time.
score: 0
accepted answer: http://stackoverflow.com/a/26333924
tagged with: email
type: AnsweredQuestion
has body: As the title states, I want to send two different emails, simultaneously to two different users. I am using JavaScript for the API. I also would like to know how can I send delayed emails, on custom dates. Currently we can do that from the dashboard, but that allows to fix days / weeks. But what I'm looking for is to calculate the dates and add a custom date delay that can't be predefined as given in the dashboard. Thank you.
has answer: http://stackoverflow.com/a/26333924

http://stackoverflow.com/a/26233365
answers question: http://stackoverflow.com/q/26233271
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41146193
has body: Your params string is invalid because you don't encode each of the values. All of them, including the base64 value should be wrapped in encodeURIComponent(). For example: base64Img = encodeURIComponent(base64Img); Base64 values include an = character, which is breaking the key pair string.
type: Answer
accepted answer of: http://stackoverflow.com/q/26233271
upvote count: 1
has comment: http://stackoverflow.com/comment/41146242
score: 1

http://stackoverflow.com/comment/41281296
type: Comment
type: QuestionComment
has text: On style.css you have assign a 960px width to main class.you have to make it auto for tablet view.
score: 0
comment on: http://stackoverflow.com/q/26306521

http://stackoverflow.com/comment/41207930
comment on: http://stackoverflow.com/a/26266273
score: 0
has text: I see the fiddle works. But I can't get it to work in Shopify?
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41323971
type: QuestionComment
has text: yes I know.... There are too much code so I have to pick up important part. So `emptyImgEml` is temporary img which is going to be replaced by img dom which is copied into `'#cached_image'`. `cachedElm` is actually the img dom...
score: 0
comment on: http://stackoverflow.com/q/26329807
type: Comment

http://stackoverflow.com/comment/41210807
has text: the html and images are easy, the css not so much, what with the sheet-relative paths and all...
comment on: http://stackoverflow.com/q/26267960
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26350068
type: AnsweredQuestion
score: 1
tagged with: image
type: Question
has answer: http://stackoverflow.com/a/26368949
has answer: http://stackoverflow.com/a/26368841
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26350210
has title: Corrupt files when uploading from Node
answer count: 3
has answer: http://stackoverflow.com/a/26350210
tagged with: file-upload
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26368949
has body: I'm converting powerpoint files to individual images, and the images that are produced end up corrupted when I upload from Node. The npm modules I'm using are request and node-form-data. I upload a file from my Node app like this: var request = require('request'); var FormData = require('form-data'); function processPresentation(fileName,fileLoc,userId,customerId){ var data = new FormData(); data.append('my_file',fs.createReadStream(fileLoc)); var options = { url: config.getConverter()+"?tenant="+customerId+"&amp;author="+userId+"&amp;name="+fileName+"&amp;ext=ppt", method: 'POST', form:data, headers:{'x-auth-token':token,'Content-Type':'application/vnd.openxmlformats-officedocument.presentationml.presentation'} }; request.post(options,function(error,response,body){ console.log(body); if(error){ console.log('error',error); } if(!response){ } if(response.statusCode === 200){ addPresentation(JSON.parse(body),userId); } }); } And it goes through my conversion process, I get a file like this as output: Here's what all this actually says, if you open the powerpoint file and look at the text: http://pastebin.com/Dbh0JPKA When I use Postman and upload the same file like this: POST HTTP/1.1 Host: xxxx.xxxxxxxxxx.net?name=00a94ec9-8f70-4279-8972-f49935cda295&amp;ext=ppt&amp;tenant=543840f80019abda4937a9e2&amp;author=543bef549f8d54a53a02f6d9 Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation x-auth-token: 772a5c0c023a447f68a9ac4fb2bb4bd39bafeb16b753df2222ffc835750cbbe6a4ef9ee82fab0902f39bc26851016a873d44c91a64f67de5e10044ef0787cebe Cache-Control: no-cache Postman-Token: 74aff430-f6b8-c7cd-d477-b9cc35897bb7 undefined I get output like this: Which is what I want.
tagged with: corruption
upvote count: 1

http://stackoverflow.com/comment/41147433
comment on: http://stackoverflow.com/q/26233364
has text: $(document).ready() removed. Now back to the issue at hand... Is it possible to make the div.square visibility hidden again, when the second slide is about to appear? By the way, here is an URL to see what we are talking about... http://freehand.nl/hamptonbay/index2.php
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29602309
has body: First of all, thanks to @saimeunt for his answer, which makes some difficult concepts clear. However I had the problem of wanting a classic async callback(err, result) showing both the error and the result back on the client, so that I can give informative messages in the browser. I solved it this way: Server code: var Stripe = StripeAPI(STRIPE_SECRET_KEY); Meteor.methods({ createCust: Meteor.wrapAsync(Stripe.charges.create, Stripe.charges) }); Client code: var stripeCallOptions = { description: 'Woot! A new customer!', card: ccToken, plan: pricingPlan }; Meteor.call('createCust', stripeCallOptions, function(error, result){ console.log('client error', error); console.log('client result', result); }); Looks neat. However unfortunately wrapAsync has an open bug, (see https://github.com/meteor/meteor/issues/2774) because it doesn't restore the proper error to the caller. A genius called Faceyspacey has written a replacement called Meteor.makeAsync() which you will find on the bug page I mentioned, which however returns either the result OR the error to the 'result' variable, leaving the 'error' variable undefined. That's fine by me for now, at least I've got a hook on the proper error object. If you use makeAsync() you will need to import Futures like this: Meteor.startup(function () { //this is so that our makeAsync function works Future = Npm.require('fibers/future'); });
type: Answer
upvote count: 7
score: 7
answers question: http://stackoverflow.com/q/26226583
downvote count: 0

http://stackoverflow.com/comment/41155059
type: Comment
comment on: http://stackoverflow.com/q/26237700
has text: @myfunkyside That' the same as the OP uses
score: 0
type: QuestionComment

http://stackoverflow.com/a/26282806
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26281686
has comment: http://stackoverflow.com/comment/41237358
accepted answer of: http://stackoverflow.com/q/26281686
has comment: http://stackoverflow.com/comment/41237304
has body: There are two problems in your code. First in the data function of the chapterPage route, you do not return the object containing your data. // no return here in your question, need to do : return { chapter: chapter, book: book, chapters: chapters }; Then in your event handler, you can access the data context using this, so the correct syntax to access the chapter or book id is this.chapter._id or this.book._id. EDIT : Inside templates route helpers and event handlers, this refers to the current data context assigned to the template. There are several ways to assign a data context to a template. You can use attribute="value" syntax along with template inclusion syntax. {{&gt; myTemplate param1="value1" param2="value2"}} Template.myTemplate.helpers({ paramsJoined:function(){ return [this.param1,this.param2].join(","); } }); You may also use a helper value coming from the parent template data context : &lt;template name="parent"&gt; {{&gt; myTemplate someHelper}} &lt;/template&gt; Template.parent.helpers({ someHelper:function(){ return { param1:"value1", param2:"value2" }; } }); If you don't specify a data context when using the template inclusion syntax, it is assumed to be inherited from the parent data context. You can also use {{UI.dynamic}} (http://docs.meteor.com/#ui_dynamic) to specify a dynamic template name along with a dynamic data context. {{&gt; UI.dynamic template=Router.template data=Router.data}} This is this kind of approach that iron:router is using to set dynamically the route data context of the route template (implementation is slightly more complex though). Meteor provides utilities to access current data contexts as well as parent data contexts, which can be useful : http://docs.meteor.com/#template_currentdata http://docs.meteor.com/#template_parentdata
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41237273

http://stackoverflow.com/comment/41184141
comment on: http://stackoverflow.com/q/26253730
type: Comment
type: QuestionComment
score: 0
has text: Can you please add a picture of what you want to achieve? is it the box with code or the box with text `attention`?

http://stackoverflow.com/comment/41085609
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26200750
score: 1
has text: Check out [Datatables](http://datatables.net). It provides pagination but you can switch it off.

http://stackoverflow.com/a/26302851
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/41346399
has body: You need to add a click event for buttons on the first table and assign the TD text to the input on the same row of the button. $(document).ready(function(){ $('#1, #2').on('click', function(){ $("#table_dialog_1").dialog(); var id = $(this).attr('id'); $('#table_dialog_1 td').unbind('click').on('click', function(){ console.log('#input_'+id); $('#input_'+id).attr('value', $(this).html()); $('#table_dialog_1').dialog('close'); }); }); }); I unbind the click event inside on the first click event to remove previous events. See the complete working example If you need to work with popup instead of dialog, follow this simple tutorial UPDATE In order to use window.open(), in the parent window put this javascript code: $('.clickMe').click(function(){ clickedButton = this; $( "#table_dialog_1" ).dialog(); window.button_clicked_id = $(this).attr('id'); }); And this code in the child window. var the_button = window.opener.button_clicked_id; var clickedButton = $('#'+the_button, window.opener.document); $( '#table_dialog_1 tr').click(function(){ var tds = $(this).children(); $(clickedButton).parent().prev().find('input').val(tds.eq(0).html()); $(clickedButton).next('a').text(tds.eq(2).html()+','+tds.eq(1).html()); $( "#table_dialog_1" ).dialog('close'); });
answers question: http://stackoverflow.com/q/26291425
upvote count: 1
has comment: http://stackoverflow.com/comment/41327311
has comment: http://stackoverflow.com/comment/41402519

http://stackoverflow.com/q/26337941
has answer: http://stackoverflow.com/a/26338194
has comment: http://stackoverflow.com/comment/52519116
linked to: http://stackoverflow.com/q/17169198
type: Question
tagged with: browser
answer count: 2
duplicate of: http://stackoverflow.com/q/17169198
tagged with: javascript
tagged with: jquery
has title: How to disable the option: Open in new tab
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: How to disable the option: Open in new tab I asynchronously loading content is responsible for what the code below: jQuery: $(document).ready(function() { init(); $(window).resize(init); $('#floatMenu,#smallMenu').find('>a').click(function() { var t = this; $('#wynik').animate({opacity:0}, 'fast', function() { $(this).load(t.href, function() { $(this).animate({opacity:1}, 'fast'); }) }); //$('#wynik').load(this.href); $(this).addClass('active').siblings().removeClass('active'); }).first().click(); }); HTML: TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT {* Here is content loading. *} I tried swapping to (jQuery code as well) and href to data-href - does not work.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26338197
has comment: http://stackoverflow.com/comment/41338585
has comment: http://stackoverflow.com/comment/41343377

http://stackoverflow.com/comment/41263354
type: QuestionComment
comment on: http://stackoverflow.com/q/26297037
has text: I was thinking of https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$applyAsync otherwise I need to implement a custom $apply using the $evalAsync, which can be done as well. I am asking what would be the recommended way to do it.
score: 0
type: Comment

http://stackoverflow.com/a/26350915
accepted answer of: http://stackoverflow.com/q/26248167
type: Answer
answers question: http://stackoverflow.com/q/26248167
score: 0
type: AcceptedAnswer
has body: I reached out to Stripe and they gave me couple recommendations, here's a solution to the problem hopefully it benefits someone else. I am able to pass a variable amount for stripe payment. Below is my charge.php file, I am not handling errors yet but I will include it later. <?php require_once(dirname(__FILE__) . '/config.php'); require_once("../auth/config.class.php"); require_once("../auth/auth.class.php"); $config = new Config; $dbh = new PDO("mysql:host={$config->dbhost};dbname={$config->dbname}", $config->dbuser, $config->dbpass); $auth = new Auth($dbh, $config); $id= $_GET['rid']; $query = $dbh->prepare("SELECT hours, cid FROM svcrequest WHERE id=? "); $query->execute(array($id)); $rslt = $query->fetch(PDO::FETCH_ASSOC); $cost = ($rslt['hours'] * 23)*100; echo $cost; $cid = $rslt['cid']; $query = $dbh->prepare("SELECT email, fname, lname FROM client JOIN users ON client.uid = users.id WHERE uid =(SELECT uid FROM client WHERE id=?)"); $query->execute(array($cid)); $user =$query->fetch(PDO::FETCH_ASSOC); $email = ($user['email']); echo $email; $token = $_POST['stripeToken']; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => $cost, 'currency' => 'usd' )); echo ' Charge today: ' . $cost; ?>

http://stackoverflow.com/q/26209343
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41471106
has body: I've noticed some odd activity in my MongoDB collection and I believe that some events I've received back to back are sharing global variables. For instance, I had a document that I removed prematurely from the collection, then I received an event that referenced this document. What seems to have happened is the id from the previous event was used for this removed event. So the event caused my code to store data in the document that was previously called. My question is, how should I be cleaning up global variables after each event? It seems difficult to pinpoint how this could even be done since all of the event calls are being done async and the end event is called before I'm done using the global variables. Sometimes I might even have many events that come in before the others are completed. Do I have to go back to using only local variables? (ones stored using var variable_name = data;)?
tagged with: eventemitter
type: Question
tagged with: mongodb
has title: I think I have a memory leak in Event Emitter, how should I be cleaning up global variables?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41101724
score: 0
has comment: http://stackoverflow.com/comment/41174905

http://stackoverflow.com/a/26245224
answers question: http://stackoverflow.com/q/26244876
has comment: http://stackoverflow.com/comment/41191421
score: 0
type: Answer
has body: Instead of having your classes as #desk_box and #station_info which are being recognized by specific object ids, define them as class names as .desk_box and .station_info. And change your javascript part as follows... &lt;script type="text/javascript"&gt; $(document).ready(function () { $(".desk_box").click(function () { myIdNbr = $(this).attr('id');//Getting the active desk_box id myIdNbr = myIdNbr .substr(myIdNbr.lastIndexOf('_')+1);//Triming the id to get last nbr $("#station_info_"+myIdNbr).toggle();//append the last nbr from Id to toggle appropriate station_info }); }); &lt;/script&gt;

http://stackoverflow.com/comment/41381429
type: AnswerComment
comment on: http://stackoverflow.com/a/26313486
type: Comment
has text: In this case then you should just remove the clicked bar and rearrange other bars, without calling drawChart every time.
score: 0

http://stackoverflow.com/a/26307285
score: 0
has body: I would say wrap the php in a function and echo the json. Also its good to check if there was POSTed data, and if not return an error message. This is not tested, but will hopefully point you in the right direction. &lt;?php function getJSON() { if (isset($_POST["data"] &amp;&amp; !empty($_POST['data']) ) { $week = $_POST["data"]; $json = json_decode($week); echo $json; } else { echo "There was a problem returning your data"; } } getJSON(); ?&gt; Actually as I write this, I realized you could try these headers in your AJAX POST: accepts: 'application/json', contentType: 'application/json', dataType: 'json' Hope that helps.
type: Answer
answers question: http://stackoverflow.com/q/26306551

http://stackoverflow.com/a/26327235
has body: Maybe this is the one that you are trying to achieve: HTML: Tear Sheets 2. Javascript: $(function(){ $("img").hide(); $("img").first().show(); }); $("img").click(function () { $(this).hide(); debugger; if( $(this).next().length === 0) { $("img").first().show(); } else { $(this).next().show(); } }) Demo: http://jsfiddle.net/zLk430dm/1/ Hope it helps.
answers question: http://stackoverflow.com/q/26327082
score: 0
type: Answer

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/26244604
type: Tag

http://stackoverflow.com/comment/41195701
score: 1
has text: What exactly do you mean by *"does not display the information to be displayed by selecting the correct option from the select itself"* ?? What are you actually trying to do?
comment on: http://stackoverflow.com/q/26260284
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41236738
type: Comment
has text: Cheers it's working now, so I should give the datepickers ids and then change the id for each new one added in the on click event?
comment on: http://stackoverflow.com/a/26281035
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41335815
type: Comment
has text: @Stephen Muecke: That will not work for web applications not at the domain root.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26336353

http://stackoverflow.com/comment/41276452
type: Comment
type: QuestionComment
has text: Why is wincontainer using an ordered list (ol) tag?
score: 0
comment on: http://stackoverflow.com/q/26303744

http://stackoverflow.com/q/26295844
has comment: http://stackoverflow.com/comment/41301456
score: 12
linked to: http://stackoverflow.com/q/21259235
has comment: http://stackoverflow.com/comment/41323364
answer count: 1
has title: Set an item from localStorage in a protractor test
favorite count: 0
type: UnansweredQuestion
tagged with: angularjs-e2e
tagged with: selenium-webdriver
upvote count: 12
downvote count: 0
type: Question
tagged with: protractor
has body: describe('The feature', function() { beforeEach(function () { browser.executeScript('localStorage.setItem("key","value");'); }); it('should do this', function() { }); }); but i get this error when the test is run against selenium with chromedriver 2.10 and chrome 37 Executing: [execute script: window.localStorage.setItem("key","value");, []]) 15:31:29.747 WARN - Exception thrown org.openqa.selenium.WebDriverException: &lt;unknown&gt;: Failed to read the 'localStorage' property from 'Window': Storage is disabled inside 'data:' URLs. (Session info: chrome=37.0.2062.120) (Driver info: chromedriver=2.10.267518,platform=Linux 3.11.0-26-generic x86_64) (WARNING: The server did not provide any stacktrace information) Any idea where the problem cam from ?
has answer: http://stackoverflow.com/a/26541270
tagged with: javascript

http://stackoverflow.com/comment/41197391
comment on: http://stackoverflow.com/a/26260272
score: 0
type: AnswerComment
has text: The only issue I am having with this is when a user adds a break/enter there is not a way for me to show that. I used `white-space: pre-wrap;` to resolve this.
type: Comment

http://stackoverflow.com/q/26268762
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has title: MVC controller's string[] parameter is null when posting JSON data
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: I post data with jQuery but I have a problem with array data. The values supplied to the MVC controller are always null. This is my JavaScript code: var FilterCategory = $('input:checkbox:checked').map(function () { return this.value; }).get(); var posting = $.post(url, { cursorid: lastid, CatFilter: FilterCategory }); The form data from the network: cursorid:5434cdc84ba4dd0c40396851 Filter[]:1 Filter[]:3 Filter[]:4 Here's the C# side: public ActionResult GetDataTweets(string cursorid,string[] CatFilter) { bla bla } cursorid has a value, but CatFilter is null. What do I need to do to have the correct value supplied to CatFilter?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26268818
type: Question

http://stackoverflow.com/a/26271009
type: Answer
score: 3
upvote count: 3
has body: JSFiddle - DEMO $(function () { $('html').addClass('fuelux'); //------ Toggle Sucursal Field $('#sucursal').on('click', function () { $("#rifEmpresa").toggle(!this.checked); $("#rifSucursal").toggle(this.checked); // ------ Turn rifSucursal search input in Select2 element $("#filtro").select2(); }); //------ Toggle Sucursal Field $('#chkRif').on('click', function () { if ($('input#chkRif').is(':checked')) { $("#rifEmpresa").removeAttr('style'); } else { $("#rifEmpresa").attr('style', 'display:none'); } }); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26270804
answers question: http://stackoverflow.com/q/26270804

backbone.js
tags question: http://stackoverflow.com/q/26232374
tags question: http://stackoverflow.com/q/26266036
tags question: http://stackoverflow.com/q/26251322
tags question: http://stackoverflow.com/q/26214501
tags question: http://stackoverflow.com/q/26241045
tags question: http://stackoverflow.com/q/26208901
tags question: http://stackoverflow.com/q/26285089
tags question: http://stackoverflow.com/q/26240735
tags question: http://stackoverflow.com/q/26197039
tags question: http://stackoverflow.com/q/26278245
tags question: http://stackoverflow.com/q/26297607
tags question: http://stackoverflow.com/q/26202350
tags question: http://stackoverflow.com/q/26351911
tags question: http://stackoverflow.com/q/26334191
tags question: http://stackoverflow.com/q/26268984
tags question: http://stackoverflow.com/q/26266784
tags question: http://stackoverflow.com/q/26248496
tags question: http://stackoverflow.com/q/26319502
tags question: http://stackoverflow.com/q/26349402
tags question: http://stackoverflow.com/q/26254205
tags question: http://stackoverflow.com/q/26218584
tags question: http://stackoverflow.com/q/26347442
tags question: http://stackoverflow.com/q/26294457
tags question: http://stackoverflow.com/q/26269201
tags question: http://stackoverflow.com/q/26325955
tags question: http://stackoverflow.com/q/26255923
tags question: http://stackoverflow.com/q/26351169
tags question: http://stackoverflow.com/q/26353210
tags question: http://stackoverflow.com/q/26250266
tags question: http://stackoverflow.com/q/26246786
tags question: http://stackoverflow.com/q/26231797
tags question: http://stackoverflow.com/q/26226706
tags question: http://stackoverflow.com/q/26349958
tags question: http://stackoverflow.com/q/26198912
tags question: http://stackoverflow.com/q/26197952
tags question: http://stackoverflow.com/q/26306220
tags question: http://stackoverflow.com/q/26298119
tags question: http://stackoverflow.com/q/26198985
tags question: http://stackoverflow.com/q/26241963
tags question: http://stackoverflow.com/q/26221925
tags question: http://stackoverflow.com/q/26320765
tags question: http://stackoverflow.com/q/26294941
tags question: http://stackoverflow.com/q/26289600
tags question: http://stackoverflow.com/q/26289702
tags question: http://stackoverflow.com/q/26199513
tags question: http://stackoverflow.com/q/26350131
type: Tag
tags question: http://stackoverflow.com/q/26298347
tags question: http://stackoverflow.com/q/26340633
tags question: http://stackoverflow.com/q/26331945
tags question: http://stackoverflow.com/q/26319434
tags question: http://stackoverflow.com/q/26307596
tags question: http://stackoverflow.com/q/26240946
tag name: backbone.js

http://stackoverflow.com/q/26344442
score: -3
has title: returning a variable javascript
answer count: 1
has answer: http://stackoverflow.com/a/26344455
favorite count: 0
has body: (function(){ createCanvas('someid', 150, 150); ctx.strokeStyle = '#09f'; // ctx is not defined }) (); function createCanvas(canvasid, width, height) { var canvas = document.createElement('canvas'); canvas.id = canvasid; canvas.width = width; canvas.height = height; document.body.appendChild(canvas); var ctx = document.getElementById(canvasid).getContext('2d'); return ctx; } I am trying to return ctx from the function that creates the canvas, however I am getting the error ctx is not defined. Is there a way to return this variable from the createCanvas function? Or should I create the ctx variable in the first function?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41351403
downvote count: 3
accepted answer: http://stackoverflow.com/a/26344455
type: Question
upvote count: 0
tagged with: javascript
tagged with: variables

http://stackoverflow.com/a/26284182
score: 0
has comment: http://stackoverflow.com/comment/41240296
has body: Cookies slow down you web application, so if you to store data into the client browser you might want to use localStorage or sessionStorage. So if you want: a lot of storage space on the client that persists beyond a page refresh and isn’t transmitted to the server Create a value: localStorage.setItem("bar", foo); Get the value: var foo = localStorage["bar"]; Remove values: localStorage.clear(); If you want to create a list, for instance, you can store a JSON value into the localStorage like: localStorage.setItem("list", "[{"name":"Adriano"},{"name":"Vic"},{"name":"Test"}]"); Then you retrieve it and assemble in your page with JS. This link is PERFECT: http://diveintohtml5.info/storage.html By the way: It doesn't have expiration date like cookies =)
type: Answer
answers question: http://stackoverflow.com/q/26283542
has comment: http://stackoverflow.com/comment/41240248

http://stackoverflow.com/comment/41245121
type: QuestionComment
comment on: http://stackoverflow.com/q/26281895
score: 1
has text: Yes. Compute the number of populated fields when you compute the record in the map/reduce and store it in the record.
type: Comment

http://stackoverflow.com/q/26200800
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: alphablending
type: Question
has answer: http://stackoverflow.com/a/26202020
has body: I need to draw 2 variations of the same image on top of each other, whose alpha values add up to 1. For example : - imageA has an alpha of 0.4, while imageB has an alpha of 0.6. - The desired result is a completely opaque image (alpha of 1.0 for each pixel), which appears as a 60% blend of imageB, and a 40% blend of imageA. However, I believe that the html5 canvas by default uses a blend mode other than add on alpha blended images, so two things drawn with alphas below 1 will not add up to 1. I've tried all the different compositing modes, along with the Adobe blend modes, but none of them have the desired result. A simple test case is to draw a magenta rect twice, both with alpha of 0.5. My desire is for the resulting pixels to be rgb(255, 0, 255). However, the result is slightly transparent. Does anyone know some way of achieving this result?
accepted answer: http://stackoverflow.com/a/26202020
tagged with: canvas
tagged with: javascript
upvote count: 2
has title: Blending two images with html5 canvas
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/41127486
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26222753
has text: Sorry about that, i'm still new to javascript. So basically i need to define my variables in my function ? I'm going try it right now.
score: 0

http://stackoverflow.com/comment/41272319
score: 1
comment on: http://stackoverflow.com/q/26301251
has text: @A.Wolff I'm curious how [`toggleClass()`](http://api.jquery.com/toggleclass/) could be used to improve this piece of code...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41391830
score: 0
type: Comment
type: QuestionComment
has text: Problem was solved when I changed `$('#content-body').trigger('create')`, which was referring to the BODY tag of the whole page, to the ID of the actual list that needed to be refreshed. Thanks guys for all your input!
comment on: http://stackoverflow.com/q/26299359

http://stackoverflow.com/comment/41193379
has text: Sad, have you tried updating using $scope.dtOptions.withDataProp(newToFrom)?
comment on: http://stackoverflow.com/a/26258470
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41092180
type: AnswerComment
type: Comment
has text: @halfer — Pretty much, and it's now more secure.
comment on: http://stackoverflow.com/a/26204173
score: 0

http://stackoverflow.com/q/26219357
has answer: http://stackoverflow.com/a/26219653
type: Question
possible better answer: http://stackoverflow.com/a/26219608
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26219690
has body: I'm new to Angular and i'm currently trying to get the id of a project from the url and pass it as a var inside a service. My current code is as follows: app.config( ['$routeProvider', function($routeProvider) { ... $routeProvider.when('/project/:ProjectId', { templateUrl: 'project.html', controller: 'ProjectController', activePage: 'Portfolio' }); ... } ]) ... .controller('ProjectController', function($scope, ProjectFactory) { $scope.content = ProjectFactory.async(); }) ... .factory('ProjectFactory', function($http) { var factoryProject = { async: function(page) { var projectID = 'XXXXXX'; var apiKey = 'XXXXXX'; var url = 'http://behance.net/v2/projects/' + projectId + '?api_key=' + apiKey + '&amp;callback=JSON_CALLBACK'; var promise = $http.jsonp(url).error(function(response, status) { alert(status); }).success(function(response, status) { console.log(response.project); }).then(function(response, status) { return response.data; }); return promise; } }; return factoryProject; }); I know i'm missing something, how can i store :ProjectId, from $routeProvider, in the variable projectID? Thanks!
accepted answer: http://stackoverflow.com/a/26219690
tagged with: javascript
has title: AngularJS Store $routeParam in var in factory service
tagged with: routes
score: 0
answer count: 3
tagged with: url
has answer: http://stackoverflow.com/a/26219608
tagged with: angularjs
linked to: http://stackoverflow.com/q/21938163
tagged with: config

http://stackoverflow.com/comment/41137491
score: 0
type: QuestionComment
type: Comment
has text: You realise you're attaching the event handler to your ` ` element, right?
comment on: http://stackoverflow.com/q/26228180

http://stackoverflow.com/comment/41319124
type: AnswerComment
comment on: http://stackoverflow.com/a/26327447
score: 0
type: Comment
has text: although I dig `querySelector` it's worth mention that the performance is lower than the `getElementsByClassName` solution.

http://stackoverflow.com/q/26304057
tagged with: ajax
type: UnansweredQuestion
has title: Ajax in loop for html output - Bootstrap Tabs
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26304318
tagged with: twitter-bootstrap
score: 1
upvote count: 1
has body: I would like to retrieve multiple json files and place each file's data into Bootstrap 3 Tabs. I realize that the getJSON call is not done before the data is appended at the end of the function, but I don't understand callbacks that well. How can I set up a callback when I am adding html to a variable like in the example below? function loadTabs(p){ var htmlTabs = ' '; var htmlContent = ' '; for (var i = 1; i <= p; i++) { if (i == 0){ htmlTabs += ' '+i+' '; htmlContent += ' '; } else { htmlTabs += ' '+i+' '; htmlContent += ' '; } (function(i) { $.getJSON('sampleFile_0' + i + '.json', function(data) {}) .done(function(data){ htmlContentnt += ' ' for (j = 0; j < data.length; j++) { if (ttid == data[j].tid){ htmlContent += ' ' + data[j].cl + ' '; } else if (otid == data[j].tid){ htmlContent += ' ' + data[j].cl + ' '; } } htmlContent += ' '; }) })(i); htmlContent += ' '; }; htmlTabs += ' '; htmlContent += ' '; $('#block').append(htmlTabs + htmlContent); }
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: callback
favorite count: 0

apache
tag name: apache
tags question: http://stackoverflow.com/q/26226624
tags question: http://stackoverflow.com/q/26305716
tags question: http://stackoverflow.com/q/26279691
tags question: http://stackoverflow.com/q/26300562
type: Tag

http://stackoverflow.com/q/26287375
answer count: 1
tagged with: css
score: 0
has title: Horizontal scrolling jQuery fixed navigation
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26287549
has comment: http://stackoverflow.com/comment/41246827
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26287549
has body: I am creating a web page that has a horizontal scrolling effect such as this one http://retrousse.co.uk/lookbook, i am currently using this example as a template http://tympanus.net/Tutorials/WebsiteScrolling/ However I cant work out how to keep the navigation and logo div centred on the page whilst you horizontally scroll. Does anyone know how i can achieve this?
type: Question

http://stackoverflow.com/comment/41269611
type: Comment
has text: use css to prevent wrapping
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26300140

http://stackoverflow.com/a/26352330
has body: If you want to set HTML you have to use .html(). From the .text() documentation (emphasis mine): We need to be aware that this method escapes the string provided as necessary so that it will render correctly in HTML.
type: Answer
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26352316
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26352316

http://stackoverflow.com/q/26242334
has answer: http://stackoverflow.com/a/32837694
has answer: http://stackoverflow.com/a/26242403
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41163378
linked to: http://stackoverflow.com/q/3962558
type: AnsweredQuestion
tagged with: scroll
accepted answer: http://stackoverflow.com/a/26242403
type: Question
tagged with: javascript
has body: I know how to detect the document end while scrolling in plain JS, my problem is - how to implement that in AngularJS, I know I should attach the scroll event to both the $window and $document, my question is about where to implement the behavior?, directives?, services?, if anyone can show me what is the right way to implement that kind of detection in AngularJS I'll be very thankful.
score: 0
answer count: 2
has title: Detect scrolled-to-document-end implementation in Angular JS
possible better answer: http://stackoverflow.com/a/32837694

http://stackoverflow.com/q/26249906
score: 1
has answer: http://stackoverflow.com/a/26249984
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Append a string after the QUESTION MARK sign
has body: I have a string URL. i need to append the following string at a given position. http://site:8080/Pic/User/Snap?x=hi How can i append the string id=12&amp; so it looks like follows: http://site:8080/Pic/User/Snap?id=12&amp;x=hi
downvote count: 0

http://stackoverflow.com/a/30385401
has comment: http://stackoverflow.com/comment/48866926
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26230365
has body: Maybe a little late to answer this question, but I've found this to work: document.querySelector("#openSearch").onclick = function(){ editor.execCommand("find"); };
upvote count: 2
has comment: http://stackoverflow.com/comment/48910370
has comment: http://stackoverflow.com/comment/48888692

http://stackoverflow.com/a/26265554
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26257194
has comment: http://stackoverflow.com/comment/41207535
type: Answer
has body: Right now you can't do that without modifying the Kendo UI source. The mobile app gets attached to the router instance and will react to the location changes. You may consider forking the Kendo UI Core repo and implementing the detached mobile application mode - in this way you should be able to use the app.navigate without changing the location.
accepted answer of: http://stackoverflow.com/q/26257194
upvote count: 1
has comment: http://stackoverflow.com/comment/41232513

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26324122
tags question: http://stackoverflow.com/q/26240681
tags question: http://stackoverflow.com/q/26253797
tags question: http://stackoverflow.com/q/26232942
tags question: http://stackoverflow.com/q/26345183
tags question: http://stackoverflow.com/q/26269885
tags question: http://stackoverflow.com/q/26295183
tags question: http://stackoverflow.com/q/26239140
tags question: http://stackoverflow.com/q/26243745
tags question: http://stackoverflow.com/q/26263812
tags question: http://stackoverflow.com/q/26240900
tags question: http://stackoverflow.com/q/26205796
tags question: http://stackoverflow.com/q/26237925
tags question: http://stackoverflow.com/q/26243746
tags question: http://stackoverflow.com/q/26280386
tags question: http://stackoverflow.com/q/26234940
tags question: http://stackoverflow.com/q/26326032
tags question: http://stackoverflow.com/q/26221002
tags question: http://stackoverflow.com/q/26309878
tags question: http://stackoverflow.com/q/26247809
tags question: http://stackoverflow.com/q/26338910
tags question: http://stackoverflow.com/q/26316041
tags question: http://stackoverflow.com/q/26313921
tags question: http://stackoverflow.com/q/26226220
tags question: http://stackoverflow.com/q/26273644
tags question: http://stackoverflow.com/q/26309021
tags question: http://stackoverflow.com/q/26331621
tags question: http://stackoverflow.com/q/26256858
tags question: http://stackoverflow.com/q/26271087
tags question: http://stackoverflow.com/q/26345451
tags question: http://stackoverflow.com/q/26237914
tags question: http://stackoverflow.com/q/26264521
tags question: http://stackoverflow.com/q/26226897
tags question: http://stackoverflow.com/q/26238869
tags question: http://stackoverflow.com/q/26250291
tags question: http://stackoverflow.com/q/26216769
tags question: http://stackoverflow.com/q/26268233
tags question: http://stackoverflow.com/q/26332860
tags question: http://stackoverflow.com/q/26229935
tags question: http://stackoverflow.com/q/26202718
tags question: http://stackoverflow.com/q/26279752
tags question: http://stackoverflow.com/q/26238796
tags question: http://stackoverflow.com/q/26233644
tags question: http://stackoverflow.com/q/26211186
tags question: http://stackoverflow.com/q/26241508
tags question: http://stackoverflow.com/q/26340796
tags question: http://stackoverflow.com/q/26344294
tags question: http://stackoverflow.com/q/26259285
tags question: http://stackoverflow.com/q/26340758
tags question: http://stackoverflow.com/q/26344967
tags question: http://stackoverflow.com/q/26246971
tags question: http://stackoverflow.com/q/26198408
tags question: http://stackoverflow.com/q/26314783
tags question: http://stackoverflow.com/q/26268137
tags question: http://stackoverflow.com/q/26203027
tags question: http://stackoverflow.com/q/26251722
tags question: http://stackoverflow.com/q/26344581
tags question: http://stackoverflow.com/q/26201925
tags question: http://stackoverflow.com/q/26283542
tags question: http://stackoverflow.com/q/26196820
tags question: http://stackoverflow.com/q/26294193
tags question: http://stackoverflow.com/q/26234235
tags question: http://stackoverflow.com/q/26320525
tags question: http://stackoverflow.com/q/26233882
tags question: http://stackoverflow.com/q/26208743
tags question: http://stackoverflow.com/q/26221836
type: Tag
tags question: http://stackoverflow.com/q/26320201
tags question: http://stackoverflow.com/q/26311016
tags question: http://stackoverflow.com/q/26238795
tags question: http://stackoverflow.com/q/26344023
tags question: http://stackoverflow.com/q/26248848
tags question: http://stackoverflow.com/q/26273612
tags question: http://stackoverflow.com/q/26346540
tags question: http://stackoverflow.com/q/26322909
tags question: http://stackoverflow.com/q/26268441
tags question: http://stackoverflow.com/q/26272874
tags question: http://stackoverflow.com/q/26292710
tags question: http://stackoverflow.com/q/26228667
tags question: http://stackoverflow.com/q/26319365

http://stackoverflow.com/q/26235630
tagged with: requirejs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26239233
has title: unable to access an object created using require.js
type: Question
has answer: http://stackoverflow.com/a/26239233
has body: Hello everyone, I have just recently started learning the require.js , but I don't seem to understand as how does the whole mechanism work...and especialy how do I access the variables/objects created using this javascript library. Let me explain it further in the example below.. webroot/page.jsp &lt;html&gt; &lt;script data-main="js/page" src="js/lib/require.js"&gt;&lt;/script&gt; &lt;/html&gt; webroot/js/common.js requirejs.config({ baseUrl: 'js/lib', paths: { app: '../app', } }); webroot/js/app/page.js require(['./common'], function (common) { require(['./app/page/init'], function(page) { page.load(1); }); }); webroot/js/app/page/init.js define(['./load'], function (load) { var LoadPage = new load(); return LoadPage; }); webroot/js/app/page/load.js define(function () { function loadPage() { } loadPage.prototype = { load: function (page_id) { console.log("Opening page "+page_id+" "); } }; return loadPage; }); now when I run the page everything works perfectly, but now I'd like to execute the load method by clicking on a button. &lt;div onclick="page.load(2);"&gt; &lt;/div&gt; but this does not work..So I'd like to know if there is any possibility to bind this action to any button or link...whatever.. (apologies for my bad english) Thanks, Alex
tagged with: javascript
score: 0
tagged with: require
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/26350813
type: Answer
has body: Yes it must have parenthesis to wrap the condition being checked in the if statement. Also you "should" be using semicolons after var declarations and statements such as your function call. var sleepCheck = function(numHours){ if (numHours &gt;= 8) { return "string 1"; }else { return "string 2"; } }; sleepCheck(10);
has comment: http://stackoverflow.com/comment/41362020
answers question: http://stackoverflow.com/q/26349914
score: 0

http://stackoverflow.com/a/26362556
accepted answer of: http://stackoverflow.com/q/26332838
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/26332838
has body: First you need to get a reference to the Keyframe Animation component that you want to control via script. You can use getComponentsByScriptName() to get the Keyframe Animation component(s) attached to an entity: PlayAnimation.prototype.init = function() { var animationsById = this.getEntity().getComponentsByScriptName("Keyframe Animation"); this.animations = []; for (var id in animationsById) { this.animations.push(animationsById[id]); } }; If a single Keyframe Animation component is attached to the entity, then this.animations[0] will refer to it. Next, you can play the animation: this.animations[0].play();
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41170072
comment on: http://stackoverflow.com/q/26245772
score: 0
type: Comment
type: QuestionComment
has text: Are you seeing the output "finished" followed by the hang, or just a hang without output? It looks to me like doStuff isn't calling its callback. Could you post that function?

http://stackoverflow.com/comment/41201050
comment on: http://stackoverflow.com/a/26216833
has text: @Bazinga777 Independent layers can be very powerful, but are pretty complex if you don't need independent stages. Normally I would just use one template format per template, and pass around compiled templates like any other function. For example: http://jsfiddle.net/smwpvngc/3/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26345229
score: 0
has answer: http://stackoverflow.com/a/26345434
possible better answer: http://stackoverflow.com/a/26346182
has title: For statement treats i as a string not a number
has answer: http://stackoverflow.com/a/26346182
accepted answer: http://stackoverflow.com/a/26345434
has body: Can someone tell me why when I run the following code it places my "Syncing" string going into row 11 instead of row 2 (if it was the first option after the header). Basically when I write i+1 it is making "11" and not the number "2"; for (var i in usValues){ var curEmail = usValues[i][0]; if (curEmail == myEmail){ userSheet.getRange(i+1, 2).setValue("Snycing"); // going into column 11 instead of 2 } } It does work if I write it this way, but I get that efficiency bulb telling me to reduce the calls to getValue(). for (var i= 1; i&lt;=userSheet.getMaxRows(); i++){ var curEmail = userSheet.getRange(i, 1).getValue(); if (curEmail == myEmail){ userSheet.getRange(i, 2).setValue("Snycing"); } }
has comment: http://stackoverflow.com/comment/41354257
type: AnsweredQuestion
type: Question
tagged with: google-apps-script
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/26198869
has body: I was testing regex in javascript: var a = prompt("Input: ") var t = /I AM (.*)|MY NAME IS (.*)/ if(t.test(a)) { b = "HI " + t.exec(a)[1] alert(b) } And if you input "I AM BOB" you get "HI BOB", and if you input "MY NAME IS BOB" you get "HI undefined", when I put "I AM (.*)" second in the regex then it would result in undefined as well. So why does this regex work completely in the if statement but only the first half in the exec()? And how could I fix it? Ps(Using exec(a)[0] just returns "HI MY NAME IS BOB")
possible better answer: http://stackoverflow.com/a/26198957
answer count: 2
has answer: http://stackoverflow.com/a/26198957
tagged with: javascript
has title: Why does only the first regex work properly?
accepted answer: http://stackoverflow.com/a/26198907
score: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/41082267
has comment: http://stackoverflow.com/comment/41082225
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26198907

http://stackoverflow.com/q/26282487
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41240541
tagged with: java
has comment: http://stackoverflow.com/comment/41240196
has body: i'm trying to display a CSV file in HTML form, I decided to use CSVToTable jquery but if there's an easier way to do it please let me know. I read that i cannot just ask user to pick their file and then render it, i have to first load the file to the server, so I added a jsp page to get the file and i wrote an Struts Action class to get the file. loadFile.jsp: &lt;form name="myForm" method="POST" action="/importAction.do" enctype="multipart/form-data"&gt; &lt;input id='fileId' type='file' name='attachmentFile' value='' maxlength='255'/&gt; &lt;input type="submit" value="Submit"/&gt; &lt;/form&gt; My importAction Action class: public ActionForward doAction(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { //how do i get the file and output this to the jsp? return mapping.findForward("renderCSV"); } I also have a target JSP with the following: renderCSV.jsp: &lt;div id="CSVTable"&gt;&lt;/div&gt; &lt;script&gt; $(function() { $('#CSVTable').CSVToTable('test.csv'); }); &lt;/script&gt; So the two questions from the above code is: 1) How do I retrieve this file from the JSP in my java class to pass it to the JSP that will render it? 2) In the renderCSV.jsp How do I pass the file I got in my action class into CSVToTable? right now i have 'test.csv' as a placeholder. I'm open to other sugestions too. Thanks in advance for the help.
type: Question
tagged with: jakarta-ee
has answer: http://stackoverflow.com/a/26285372
has title: How to convert CSV to HTML table from java
tagged with: javascript
tagged with: struts
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/26366188
has body: It seems that it is not possible to do from the browser for security reasons. However as per the question I was looking for an alternative for internal client machines on my network. This was achieved with a winforms app: Process.Start("http://www.google.com"); IntPtr handle = new IntPtr(); bool found = false; // Get handle of browser window ready to move / bring to front // Wait for browser process to start before moving on while (!found) { foreach (Process clsProcess in Process.GetProcesses()) { Console.WriteLine(clsProcess.MainWindowTitle); if (clsProcess.MainWindowTitle.Contains("Google")) { found = true; handle = clsProcess.MainWindowHandle; } } Thread.Sleep(500); } Console.WriteLine("Window Found"); // This method gets the users preferred screen (not included in this code snippet) ConnectedScreen PreferredScreen = GetPreferredScreen(GetScreens()); if (handle != null) { MoveWindow(handle, PreferredScreen.workingArea.X, PreferredScreen.workingArea.Y,PreferredScreen.workingArea.Width,PreferredScreen.workingArea.Height, true); SetForegroundWindow(handle); } Thread.Sleep(500); // Need to send space first if on chrome, or it maximises to last known screen SendKeys.Send(" "); SendKeys.Send("{F11}");
accepted answer of: http://stackoverflow.com/q/26274322
answers question: http://stackoverflow.com/q/26274322
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/41353624
type: Comment
type: QuestionComment
score: 1
has text: You should not get an error when doing `myVar == [""]`. What's the error?
comment on: http://stackoverflow.com/q/26345709

http://stackoverflow.com/q/26226344
has body: I use Tiled to make a map. However when rendering the map in Phaser the transparency doesn't seem to work. It works as expected in Tiled: Unfortunately not when rendered with Phaser: main.js: var game = new Phaser.Game(320, 320, Phaser.AUTO, 'mquest', { preload: preload, create: create }); function preload() { game.load.tilemap('test', 'assets/js/maps/test.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('forest_tiles', 'assets/img/forest_tiles.png'); } function create() { game.stage.backgroundColor = '#787878'; map = game.add.tilemap('test'); map.addTilesetImage('Forest', 'forest_tiles'); backgroundLayer = map.createLayer('Background'); foregroundLayer = map.createLayer('Foreground'); topLayer = map.createLayer('Top'); backgroundLayer.resizeWorld(); } And the test.json: { "height":20, "layers":[ { "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
has title: Phaser, Tileset and Tilemap transparency
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26234952
upvote count: 1
type: Question
tagged with: phaser-framework
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: transparency
has answer: http://stackoverflow.com/a/26234952

http://stackoverflow.com/q/26279876
has comment: http://stackoverflow.com/comment/41238246
downvote count: 0
has comment: http://stackoverflow.com/comment/41232391
has body: I was looking for a way to do multi-line strings in javascript. And I used came across this bit of code: var str = <> This string spans multiple lines Doesn't need quoting of single quotes And the same goes for "double quotes". Because of the CDATA, I can also include some html Which can make use of <attributes with="double quotes"/> but at the same time, I can make use of the > and < signs without worrying about xml validity. </>; When using this piece of code in Visual Studio 2012, I get error lines. Also, I've never used CDATA in Javascript or HTML, so I'm not sure how this is supposed to work. So, 1, can this code (with some tweaking) work? 2, what is the antislash? Source 1 Source 2
has comment: http://stackoverflow.com/comment/41231706
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26279990
type: Question
has comment: http://stackoverflow.com/comment/41238487
has comment: http://stackoverflow.com/comment/41232622
upvote count: 1
tagged with: multiline
answer count: 1
has comment: http://stackoverflow.com/comment/41238063
has comment: http://stackoverflow.com/comment/41231822
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/41231895
favorite count: 0
has comment: http://stackoverflow.com/comment/41238278
has title: What is the javascript antislash and how does it work with multi-line strings?

http://stackoverflow.com/comment/41121211
type: Comment
type: QuestionComment
has text: thanks. you mean we can do this - ` `??
comment on: http://stackoverflow.com/q/26219812
score: 0

http://stackoverflow.com/comment/41228193
type: QuestionComment
type: Comment
has text: What does or doesn't it do in IE8?
score: 0
comment on: http://stackoverflow.com/q/26278000

http://stackoverflow.com/q/26277813
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41254281
has comment: http://stackoverflow.com/comment/41229815
has title: Jquery cant recognise div element of an .htc file
answer count: 0
type: Question
has body: I am trying to access a div element of an html element present in a .htc file shown below- from a javascript file which is shown below- $('#memberImage').html(' No Images to Display '); Now, when I am accessing this div element this code is executing without displaying anything in the UI and without any error also. But when I use document.getElementById("memberImage").innerHTML=" No Images to Display "; in the javascript file, the text is getting displayed. I have imported all the relevant Jquery files in the .htc file - Moreover when I am using an html file in place of .htc file both the ways of accessing the div element from javascipt file is giving expected results. HTML file contents - Insert title here My question is why the div element is getting accessed from an html file using JQuery(and also document.getElementById()) but not from .htc file?
linked to: http://stackoverflow.com/q/3162820
tagged with: html-components
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26210093
has body: you give done a callback method, which is called when it's finished, d will likely always be returned before the method passed into done is called. The trick is to have the code that calls kill wait on d to complete (if it's important that it's finished before it continues)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26210054

http://stackoverflow.com/q/26261852
has title: Play an audio in javascript
has comment: http://stackoverflow.com/comment/41199350
downvote count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41199213
has comment: http://stackoverflow.com/comment/41199253
has comment: http://stackoverflow.com/comment/41199269
accepted answer: http://stackoverflow.com/a/26262645
has comment: http://stackoverflow.com/comment/41198802
has body: I want to play a sound effect using javascript. It doesn't work for some reason. Here's my code.
upvote count: 1
has comment: http://stackoverflow.com/comment/41198799
type: Question
has answer: http://stackoverflow.com/a/26262645
has comment: http://stackoverflow.com/comment/41198794
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41199330
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41199234
has comment: http://stackoverflow.com/comment/41199525
favorite count: 0
has comment: http://stackoverflow.com/comment/41199191

http://stackoverflow.com/comment/41240773
comment on: http://stackoverflow.com/q/26226186
type: Comment
type: QuestionComment
has text: and route would only be for angulars internal route system with NgRoute :/
score: 0

http://stackoverflow.com/comment/41144338
comment on: http://stackoverflow.com/q/26232265
has text: Did you consider making an ajax request to the parent page to get the form values?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41185915
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26254915
has text: Seriously, it is not needed
type: AnswerComment

http://stackoverflow.com/q/26330082
tagged with: css
score: 1
has title: Angularjs Table Header keeps getting repeated (using ng-repeat)
has answer: http://stackoverflow.com/a/26330149
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26330149
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: The header 'Speedruns' keeps getting repeated. How can I fix this? Also, if there is a better way to do this please let me know. Speedruns {{chan.channel.display_name}} {{chan.channel.current_viewers}} Attached a plunker with the code in it. Plunker
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41161462
score: 0
has text: Ok I got it scrollspy work but it seems so weird to show active status when actually that content isn't showed.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26241264

http://stackoverflow.com/comment/41353217
type: QuestionComment
type: Comment
has text: For the states of the USA, a I'd use a select.
score: 1
comment on: http://stackoverflow.com/q/26343159

http://stackoverflow.com/a/26312108
has body: a digest cycle will effectively behave like a blocking call that guarantees that the promises are all resolved before the code is allowed to proceed. Yes, although more accurately it would guarantee that the success callbacks of resolved promises would have run. There is a very similar example that shows how the digest cycle is tied to the success callbacks of promises in the docs for $q
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26311232
accepted answer of: http://stackoverflow.com/q/26311232
type: Answer
upvote count: 1

http://stackoverflow.com/q/26305241
has body: Hi can any one help me get all elements in jquery that do not have a class. I have a list and I want to get all of the that do not have a class and delete it Here is the code I have so far var listTableHeaders = $("ROI-List").find("th"); listTableHeaders.not(".sorting").remove(); I realized that there are other classes other than "sorting" as seen in this pic I can just remove the elements that are not "sorting" or "sorting_disabled" but I am not sure if there are other classes so it would be more convenient to remove the th that do not have any class. Thank you
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26305277
has answer: http://stackoverflow.com/a/26305277
has comment: http://stackoverflow.com/comment/41278717
has answer: http://stackoverflow.com/a/26305342
has title: remove jquery elements that do not have a class
favorite count: 0
linked to: http://stackoverflow.com/q/9042289
has answer: http://stackoverflow.com/a/26305272
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26305272
has comment: http://stackoverflow.com/comment/41278613

http://stackoverflow.com/comment/41241653
type: AnswerComment
comment on: http://stackoverflow.com/a/26282030
has text: I have used react router and react router component, but even with those how would I interact with the common sidebar? I would still have to pass a ton of callbacks down to the item being clicked to trigger the opening of the sidebar, right?
type: Comment
score: 0

http://stackoverflow.com/comment/41076526
has text: Yeah, I'm not sure without more input from the OP.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26195589
type: AnswerComment

http://stackoverflow.com/comment/41084788
has text: @CraigFrankham you can get the slide effect with your code, but you have to change the `100%` to some pixel value (you have to estimate it), it will work, but I don't like it `:D`, you can try like `700px` instead of `100%`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26200098
type: Comment

http://stackoverflow.com/comment/41320924
comment on: http://stackoverflow.com/q/26328464
type: Comment
type: QuestionComment
has text: each assignment `results = accountsArray[i];` overwrites previous one
score: 2

http://stackoverflow.com/comment/41242806
score: 0
has text: Did my answer work for you or what happened? If it did work can you mark it as answer? Thanks.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26258621

http://stackoverflow.com/q/26347413
score: 0
has body: I am using Parsely to validate a field that depends on another field. I am also using Bootstrap tooltips to display the errors. I created a custom validator to validate an input that has a value greater than or equal to another input value. I wish to display the error message with the value from the first textbox when the user has made a mistake. var v=""; window.ParsleyValidator.addValidator('gte', function (value, requirement) { v=$(requirement).val(); alert(v); return parseFloat(value) &gt;= parseFloat($(requirement).val()); }, 32) .addMessage('en', 'gte', 'This value should be greater or equal to '+v); In this JSfiddle is a complete example. To test this put the value 2 in the first textbox and 1 in the second. The correct error message should be This value should be greater or equal to 2. If I set the variable 'v' to be equal to something it does append in the error message. If I try to set it to the $(requirement).val() it does not work.
has answer: http://stackoverflow.com/a/26349110
has answer: http://stackoverflow.com/a/26349212
possible better answer: http://stackoverflow.com/a/26349212
type: AnsweredQuestion
has title: How to include values from other fields in error message
accepted answer: http://stackoverflow.com/a/26349110
type: Question
tagged with: parsley.js
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41222407
has text: Are the images and catalog-item divs the same size? Are there items with item-desc too long?
comment on: http://stackoverflow.com/q/26273982
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41258251
comment on: http://stackoverflow.com/q/26294203
has text: You are missing a comma after "Signla Strength" in this code
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26331906
upvote count: 4
answer count: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41327546
linked to: http://stackoverflow.com/q/25325221
has title: What is the difference between getElementById and simply using an element's ID as a variable?
has comment: http://stackoverflow.com/comment/41327512
linked to: http://stackoverflow.com/q/3434278
tagged with: reference
has answer: http://stackoverflow.com/a/26331974
has comment: http://stackoverflow.com/comment/41327729
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41327890
has comment: http://stackoverflow.com/comment/41327799
type: Question
has comment: http://stackoverflow.com/comment/41327690
has comment: http://stackoverflow.com/comment/41327821
tagged with: javascript
has answer: http://stackoverflow.com/a/26331931
has body: Can someone tell me the difference between calling an HTML elment with id="myDomObect"?: var myObj = document.getElementById('myDomObect'); &amp; var myObj = myDomObect;
score: 4
tagged with: dom

http://stackoverflow.com/comment/41300956
score: 0
type: AnswerComment
type: Comment
has text: Perfect. Thanks for answer, but I didn't understood about "redundant array-based syntax". Can you explain more about it ?
comment on: http://stackoverflow.com/a/26314829

http://stackoverflow.com/comment/41183769
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26253248
score: 0
has text: Are you running some other code that does something with your button ?

http://stackoverflow.com/comment/41104722
score: 0
type: Comment
type: QuestionComment
has text: Since you are stringifying your JSONObject, I don't see why you would be unable to do so. Is there a reason you think this is impossible?
comment on: http://stackoverflow.com/q/26210973

http://stackoverflow.com/comment/41170776
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26245974
has text: Oops my mistake, where is the javascript included in the page?

http://stackoverflow.com/q/26319365
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26319560
favorite count: 0
has answer: http://stackoverflow.com/a/26319534
type: UnansweredQuestion
score: -3
downvote count: 4
has comment: http://stackoverflow.com/comment/41304142
has body: Whats the best way to show all items with matching values using JSON? So if I have this sample JSON: { "AllQuotes": [{ "Quote": "Life is Bad", "Attributes": { "StatedYear": 1999, "smart": true, "inspiring": false } }, { "Quote": "Life is Good", "Attributes": { "StatedYear": 1972, "smart": false, "inspiring": true } }, { "Quote": "Let's Party", "Attributes": { "StatedYear": 1999, "smart": false, "inspiring": true } }, { "Quote": "All is a Game", "Attributes": { "StatedYear": 1952, "smart": true, "inspiring": false } }] } Using plain JavaScript, how to pull all quotes from 1999? or all quotes with attribute inspiring = true?
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Use JavaScript to return items that match from JSON
has answer: http://stackoverflow.com/a/26319403
has comment: http://stackoverflow.com/comment/41304185
tagged with: javascript

http://stackoverflow.com/comment/41099450
type: AnswerComment
has text: @ Quentin your answer is not completely satisfactory for me, which is why I can't accept it, but it put me on the right track. So thx for that. Your answer contains some directions but it should get into more details to be useful to someone else. I will write a more complete answer later -- but your answers were useful.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26203468

http://stackoverflow.com/comment/42930637
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26232715
has text: PNG is a more general image compressor than jpeg. Efficiency is very good for 'graphics' and rather poor for 'photographs'. This explains the file size difference between the two ffmpeg examples, at least. Also, video (like animated gif) uses temporal compression, storing the differences between frames. This means that compressed video is invariably more efficient than storing the frames as still images. So, a certain amount of file bloat is inevitable, if you will go with stills. If you could say a little more about the content or the project, we might be able to find other suggestions.

http://stackoverflow.com/q/26291205
tagged with: javascript
has comment: http://stackoverflow.com/comment/41253560
has comment: http://stackoverflow.com/comment/41253458
has comment: http://stackoverflow.com/comment/41253744
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41253319
has body: Im using this script (following a video tutorial) but nothing happens and I have no error: $(document).ready(function () { var scrollTop = $(window).scrollTop(); var windowSize = $(window).height(); var appart = 50; display(scrollTop, windowSize); $(window).resize(function(){ var windowSize = $(window).height(); }); $(window).scroll(function(){ var scrollTop = $(window).scrollTop(); display(scrollTop, windowSize); }); function display(scrollTop, windowSize){ $('.wp-post-image').each(function(){ var elemTop = $(this).offset().top; if($(this).css('opacity') === 0 &amp;&amp; (parseInt(elemTop) &lt;= parseInt(scrollTop + windowSize - appart))){ $(this).fadeTo(2000,1); } }); } }); Its supposed to display my content with transition when scrolling on the page (like lazy loading). Im using wordpress. I really don't understand why it does not work. Thank you.
has comment: http://stackoverflow.com/comment/41253537
score: 2
has comment: http://stackoverflow.com/comment/41522994
has answer: http://stackoverflow.com/a/26552962
upvote count: 2
tagged with: lazy-loading
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41253515
tagged with: jquery-lazyload
type: Question
has title: jQuery script is loaded but nothing happen
has comment: http://stackoverflow.com/comment/41253499

http://stackoverflow.com/comment/41304589
has text: Oh, so one could also do [&?]a=(.+?)[&|$]+ ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26319549
type: Comment

http://stackoverflow.com/q/26310831
possible better answer: http://stackoverflow.com/a/26310901
has body: I built a table with about 20 cells. Next to the table I want to display a with a description, which should be displayed on hover or on click. There are heaps of solutions available on the web, but none really fits. I already know I do need JavaScript, so i have my table cell Content and my Description1 I add a class to the cells because some descriptions are called by more than one cell. So, I need a JavaScript function to show the div "des1" on hover/click of all cells of class "des1", and also hide all other descriptions shown before. And that is my problem. All my descriptions are wrapped in on other div so can I hide all divs in the wrapper and then display the right description. What is the best way to do this (event handling? inline?) Should I use CSS in Addition? I do not have much experience in Javascript so I would appreciate any help or tips.
has title: Display/Hide DIVs on tablecell hover (javascript)
accepted answer: http://stackoverflow.com/a/26310894
has answer: http://stackoverflow.com/a/26310901
type: AnsweredQuestion
score: 1
tagged with: javascript
type: Question
answer count: 2
downvote count: 0
tagged with: show
favorite count: 0
has answer: http://stackoverflow.com/a/26310894
tagged with: hide
upvote count: 1

http://stackoverflow.com/q/26298585
has comment: http://stackoverflow.com/comment/41266565
score: 1
has comment: http://stackoverflow.com/comment/41266153
has answer: http://stackoverflow.com/a/26298920
type: Question
has comment: http://stackoverflow.com/comment/41266077
has answer: http://stackoverflow.com/a/26298926
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/26298926
accepted answer: http://stackoverflow.com/a/26298920
downvote count: 0
has comment: http://stackoverflow.com/comment/41266140
has comment: http://stackoverflow.com/comment/41266047
favorite count: 0
tagged with: angularjs
has title: How to hide certain elements in angular, based on the ng-class?
has body: I have following code: I'm creating the ng-class based on the object and its working fine. I'm getting the expected output. But what I want here is, ng-class whose value is inactive need to be hidden initially. On the click of a say button, it need to be shown. Basically like a toggle button, again if clicked, shows only active fields. I tried this: which is showing only active, but doesnt know how to proceed, if I want to show inactive on the button click. inactive will be inactive always. On click of a button say showall it shows up, on button click active it hides, only active class are shown here. New to angular, is there any easy to do this? Thanks in advance.
linked to: http://stackoverflow.com/q/12599637
upvote count: 1
has comment: http://stackoverflow.com/comment/41266182
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41266106

http://stackoverflow.com/q/26316420
tagged with: javascript
has comment: http://stackoverflow.com/comment/41298779
score: 0
tagged with: regex
tagged with: permutation
has answer: http://stackoverflow.com/a/26316803
has comment: http://stackoverflow.com/comment/41298724
has body: Could somebody tell me how I can make a permutation divided with comma? I have this regular expression: /^(?:([A-L])(?!.*\1)){12}$/g. This permutation finds a line that have [A-L] characters without repetitions For example, var regex = /^(?:([A-L])(?!.*\1)){12}$/g; "ABCDEFGHIJKL".match(regex); // [ "ABCDEFGHIJKL" ] "IFAHBGEJKLCD".match(regex); // [ "IFAHBGEJKLCD" ] But I want to get A,B,C,D,E,F,G,H,I,J,K,L or I,F,A,H,B,G,E,J,K,L,C,D.
type: UnansweredQuestion
type: Question
has title: I have this permutation "/^(?:([A-L])(?!.*\1)){12}$/g" but I want to divide it whith "," a comma, How can I make it
answer count: 1

http://stackoverflow.com/q/26264059
has comment: http://stackoverflow.com/comment/41203075
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26264155
has answer: http://stackoverflow.com/a/26264155
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/41203556
tagged with: javascript
score: -1
tagged with: wildcard
has comment: http://stackoverflow.com/comment/41203373
answer count: 2
tagged with: element
has answer: http://stackoverflow.com/a/26264181
favorite count: 0
has comment: http://stackoverflow.com/comment/41203113
has title: Using Wildcards to Search Arrays in JS
has comment: http://stackoverflow.com/comment/41203309
accepted answer: http://stackoverflow.com/a/26264181
downvote count: 2
has comment: http://stackoverflow.com/comment/41203226
has comment: http://stackoverflow.com/comment/41203203
has body: I'm wondering if it is possible to create an array of elements and then create an event listener using a wildcard that will trigger when any of these elements are interacted with. A sample of what this might look like: var e = new Array(); e[1] = document.getElementById('some-element'); e[2] = document.getElementById('some-other-element'); e.onmouseup = function() { if(e == e[1]) { //Some code here } else if (e == e[2]) { //Some code here } }
upvote count: 1

http://stackoverflow.com/comment/41199709
has text: You can use `.slice()` to get a shallow clone of the `Array` -- `var B = A.slice(0).sort(randOrd);`
score: 1
comment on: http://stackoverflow.com/q/26262318
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41166504
type: Comment
has text: Thanks but woudn't it just append the last value and not append all of them. i have multiple elements with same name on my form to mark attendance
comment on: http://stackoverflow.com/a/26243750
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41379866
comment on: http://stackoverflow.com/q/26349463
type: Comment
type: QuestionComment
has text: Thanks for reporting the issue. I managed to reproduce it and work on fixing it. [**Disclosure:** I am a Crossrider employee]
score: 0

http://stackoverflow.com/q/26266327
tagged with: client
tagged with: css
has answer: http://stackoverflow.com/a/26266701
has comment: http://stackoverflow.com/comment/41207684
type: AnsweredQuestion
has body: I've found this JS fiddle, which does exactly what I'm looking for. However, I can't seem to figure out how to get it to work when I move the navigation to the side. var hoverMenu = $('#HiddenMenu'), hoverSpace = $('#HoverSpace'); hoverSpace.on('mousemove', function(event) { if(35 - event.clientY &lt; 0) { hoverMenu.css({top: 35 - event.clientY}); } else { hoverMenu.css({top: 0}); } }).on('mouseout', function() { hoverMenu.css({top: -35}); }); http://jsfiddle.net/PaZHH/1/ &lt;-- this is working example of the clientX/Y event I'm wanting I can't seem to implement this by using clientX &amp; moving the navigation to the right hand side. This is where I managed to get too http://jsfiddle.net/PaZHH/102/
has title: Show nav dependant on mouse coordinates
type: Question
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26266701
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/26314765
upvote count: 1
has body: Child_process It allows you to create proccess instances. More information can be found on the node.js documentation:
answers question: http://stackoverflow.com/q/26314735
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41295798
has comment: http://stackoverflow.com/comment/41295894
type: Answer
has comment: http://stackoverflow.com/comment/41295680
has comment: http://stackoverflow.com/comment/41299817
has comment: http://stackoverflow.com/comment/41295538
has comment: http://stackoverflow.com/comment/41295628

http://stackoverflow.com/q/26338254
has title: highchart mysql json with dropdown select value for where condition
has comment: http://stackoverflow.com/comment/41343193
tagged with: php
has body: i'm trying to use highcharts using json data from mysql table. i want to set a drop down list with values that are going to be used as WHERE conditions for the mysql_query to fetch selected data and populate them in highchart. the codes are working properly with static conditions (no drowpdown variables). main.html &lt;form method="get" action="" &gt; Chose : &lt;select name="liste" id="liste"&gt; &lt;option value="A" &lt;? if($selected == 'A'){ echo 'selected="Choice A"';}?&gt;Choice A&lt;/option&gt; &lt;option value="B" &lt;? if($selected == 'B'){ echo 'selected="Choice B"';}?&gt;Choice B&lt;/option&gt; &lt;option value="C" &lt;? if($selected == 'C'){ echo 'selected="Choice C"';} ?&gt;Choice C&lt;/option&gt; &lt;option value="D" &lt;? if($selected == 'D'){ echo 'selected="Choice D"';} ?&gt;Choice D&lt;/option&gt; &lt;/select&gt; &lt;input type="submit" value="Go" /&gt; &lt;/form&gt; data.php `&lt;?php $A=$_GET['liste']; $con = mysql_connect("localhost","myuser","mypwd"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydatabase", $con); $test = mysql_query("SELECT name FROM table1 WHERE table2.age LIKE '{$A}'"); $rowss = array(); while($rr = mysql_fetch_array($test)) { $ro[0] = $rr[0]; $ro[1] = $rr[1]; array_push($rowss,$ro); } print json_encode($rowss, JSON_NUMERIC_CHECK); mysql_close($con); ?&gt; on the main.html file i have the highchart script that call the data.php file to get the json data. &lt;script&gt; $(document).ready(function() { //rest of the code $.getJSON("data.php", function(json) { options.series[0].data = json; chart = new Highcharts.Chart(options); }); &lt;/script&gt; testing the data.php give the correct output according to the selected value. so i'm assuming that it is working fine. my problem is when loading the main.html it draws an empty graph and even when changing the value keep drawing empty data graph. NB: i know mysql_* is no longer best practice and planing to switch to mysqli_* later. EDIT: seems like my …
score: 0
answer count: 2
tagged with: mysql
accepted answer: http://stackoverflow.com/a/26354890
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/41339746
possible better answer: http://stackoverflow.com/a/26338530
type: AnsweredQuestion
tagged with: highcharts
has answer: http://stackoverflow.com/a/26338530
has comment: http://stackoverflow.com/comment/41345442
type: Question
has comment: http://stackoverflow.com/comment/41340459
has answer: http://stackoverflow.com/a/26354890

http://stackoverflow.com/q/26290976
possible better answer: http://stackoverflow.com/a/29875274
favorite count: 0
accepted answer: http://stackoverflow.com/a/27404704
has answer: http://stackoverflow.com/a/29875274
tagged with: canjs-model
linked to: http://stackoverflow.com/q/19877422
score: 2
has body: I'm not the first person to ask this... the answers basically say "Well you're doing REST wrong." Fair enough, but development is filled with tradeoffs and I often find myself not in a position to rewrite the API. Moving on to the problem at hand, what's the most elegant way to add a method for some resource to a model? var Issue = can.Model.extend({ findAll: 'GET Issues', findOne: 'GET Issues/{id}', findRelated: can.Model.makeFindAll(function(params) { return can.ajax({ type: 'GET', url: 'Issues/'+params.id+'/' }); }) },{}); jsfiddle
upvote count: 2
linked to: http://stackoverflow.com/q/19591609
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14387020
tagged with: javascript
has title: Canjs - Extending can.Model with additional Methods
tagged with: canjs
answer count: 2
has answer: http://stackoverflow.com/a/27404704
downvote count: 0

http://stackoverflow.com/a/26554897
answers question: http://stackoverflow.com/q/26301406
has body: Add ../../shared to the watched paths in your brunch config paths: watched: ['app', 'vendor', '../../shared']
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42171396
type: Answer
accepted answer of: http://stackoverflow.com/q/26301406
has comment: http://stackoverflow.com/comment/42171894
score: 2

http://stackoverflow.com/q/26322741
tagged with: settimeout
has title: Jquery: Doing an interval, timout, then interval again
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41310261
accepted answer: http://stackoverflow.com/a/26322895
answer count: 1
has comment: http://stackoverflow.com/comment/41310299
tagged with: setinterval
has comment: http://stackoverflow.com/comment/41310288
has comment: http://stackoverflow.com/comment/41310376
has body: I'm trying to do a reveal of a list of elements 1 after another in a setInterval for 5 seconds but after the 7th element, i want to wait for 60 seconds, meaning a timeout and continue the interval. Following is my code, I can get it done but the problem with this code is that it does the timeout repetatively on every 7th element, however, i'm only looking to do it on the 1st 7th occurance and not on all the 7th element. $(document).ready(function(){ var index=0; var firstInterval=setInterval(function(){ if(index==7){ $("#love p:hidden:first").fadeIn(2000); clearInterval(firstInterval); index=0; return; }else{ $("#love p:hidden:first").fadeIn(2000); index++; } var timeout=setTimeout(function(){ $("#love p:hidden:first").fadeIn(2000); var secondInterval=setInterval(function(){ $("#love p.2nd_batch:hidden:first").fadeIn(2000); },5000); clearTimeout(timeout); },60000); },5000); }); Any help would be greatly appreciated. thanks
has answer: http://stackoverflow.com/a/26322895
type: AnsweredQuestion

http://stackoverflow.com/comment/133995309
score: 0
type: AnswerComment
has text: For me on mac this is not working in regualar javascript chrome
type: Comment
comment on: http://stackoverflow.com/a/26297687

keyup
tags question: http://stackoverflow.com/q/26343363
tag name: keyup
tags question: http://stackoverflow.com/q/26299317
type: Tag

http://stackoverflow.com/comment/41279835
type: Comment
type: QuestionComment
score: 3
has text: When comparing values you have to use == or === (in your if statement). Also, in the code block you're setting the source twice to different values?
comment on: http://stackoverflow.com/q/26305891

http://stackoverflow.com/comment/41315226
type: Comment
has text: Hello, thanks for the answer. It is really helpful. Ill work on it now and see what I come up with
type: AnswerComment
comment on: http://stackoverflow.com/a/26322111
score: 0

http://stackoverflow.com/comment/41214673
type: Comment
comment on: http://stackoverflow.com/a/26246406
score: 1
has text: Ah, that makes sense now. I didn't know the difference between JSON and Javascript objects. Everything works as it should be, finally! Thank you so much! You've been helpful!
type: AnswerComment

http://stackoverflow.com/a/26343970
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26343879
type: Answer
has body: IE does not support SMIL (i.e. the animae and animateTransform tags). There is a javascript shim called fakeSmile that can be used to give IE this functionality.
score: 2

http://stackoverflow.com/comment/41256500
comment on: http://stackoverflow.com/q/26293164
type: QuestionComment
type: Comment
has text: without your html and css, its impossible to say or reproduce your problem. keep in mind that by default, border grows outside so if your border width is more than 2.5%, it will add up to 100%.
score: 0

http://stackoverflow.com/comment/41150601
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26226182
has text: I just found out, that the play button does not work when you state "controls=1" or in your case "controls: 1" in the embed parameters; using "controls=0" allows you to click the play button. This seems to be an issue on YouTube's side.
score: 0

http://stackoverflow.com/q/26287197
has answer: http://stackoverflow.com/a/26287305
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/26284848
accepted answer: http://stackoverflow.com/a/26287326
has comment: http://stackoverflow.com/comment/41247112
type: AnsweredQuestion
score: 2
upvote count: 2
has title: Uncaught TypeError: Cannot read property 'success' of undefined
type: Question
has body: Why is options be undefined here? DisplayThisArr is filled from this ajax call but then I go to another function and make another ajax call to another api and use some of that data to add another property to DisplayThisArr and then I want to display the modded DisplayThisArr but for some reason I get Uncaught TypeError: Cannot read property 'success' of undefined. for more indepth go here to the full question dataSource: new kendo.data.DataSource({ schema: { model: { 1: { type: "string" },. 2: { type: "string" }, 3: { type: "string" }, 4: { type: "string" }, 5: { type: "string" }, 6: { type: "string" }, 7: { type: "string" }, propertyImAdding: { type: "number" }, } }, batch: true, transport: { read: function(options) { $.ajax({ url: 'https://localhost:port/api/blah/blah', dataType: 'json', async: false, data: data, success: function(json) { DisplayThisArr = json; vM.getOtherData(); //Get another [] of json objects from another api and mod DisplayThisArr options.success(DisplayThisArr); //Display the modified DisplayThisArr array } });//end ajax }//end function(options) } })//End datasource
tagged with: javascript
has answer: http://stackoverflow.com/a/26287326
tagged with: ajax
answer count: 2
possible better answer: http://stackoverflow.com/a/26287305

http://stackoverflow.com/a/26208223
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26207772
score: 1
has comment: http://stackoverflow.com/comment/41099495
downvote count: 0
has comment: http://stackoverflow.com/comment/41099490
has body: You can make a switch that will evaluate only the true statements, it fill find the first true statement (case) if any, or it will show the default. It will use conditional logic to work. So your code to work just add true instead of myAge var myAge = Number(prompt("Enter your age", 30)); switch (true) { case (myAge &gt;= 0 &amp;&amp; myAge &lt;= 10): document.write("myAge is between 0 and 10"); break; case (!(myAge &gt;= 0 &amp;&amp; myAge &lt;= 10)): document.write("myAge is NOT between 0 and 10 &lt;br /&gt;"); break; case (myAge &gt;= 80 || myAge &lt;= 10): document.write("myAge is 80 or above OR 10 or below &lt;br /&gt;"); break; case (myAge &gt;= 30 &amp;&amp; myAge &lt;= 39 || (myAge &gt;= 80 &amp;&amp; myAge &lt;= 89)): document.write("myAge is between 30 and 39 or myAge is between 80 and 89"); break; default: document.write("You did not enter a number. Please enter a number."); break; } Just a note that using switch like this is a performance overkill. It is better/faster to use if / else statements. You can read more about switch here Switch and at the bottom you can see this method used (Method two).
has comment: http://stackoverflow.com/comment/41099982

http://stackoverflow.com/comment/41110946
comment on: http://stackoverflow.com/a/26213601
type: Comment
has text: @Icepickle see http://www.tutorialspoint.com/javascript/array_foreach.htm..so what this here represents when called with a foreach ??did this points to the array [12, 5, 8, 130, 44] ??
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41131042
type: QuestionComment
has text: @engineersmnky you nailed it! Thank you so much. If you leave your comment as an answer I will select it. Thanks again!
score: 0
comment on: http://stackoverflow.com/q/26224668
type: Comment

http://stackoverflow.com/q/26220080
has answer: http://stackoverflow.com/a/38012650
has answer: http://stackoverflow.com/a/38723609
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/34856788
type: AnsweredQuestion
downvote count: 0
tagged with: html5-video
upvote count: 25
has answer: http://stackoverflow.com/a/26223840
accepted answer: http://stackoverflow.com/a/26223840
type: Question
has body: I have been creating a website for an online game that I play. In the header I have a HTML5 video that plays very briefly (1second). In Internet Explorer there is no issue, however in Chrome as the video is loading there is a very brief flash of black screen. Is there any way that I can remove this flash, or, failing that, make it white to match the background? You can see what I mean here http://testingfortagpro.meximas.com/ . If you try it in IE and the Chrome you will see the difference in how the video loads. Alternatively is there any better way of implementing this? I have tried using a animated GIF however quality is significantly reduced. Thanks!
has title: Remove black load flash on HTML5 video
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has answer: http://stackoverflow.com/a/38742673
linked to: http://stackoverflow.com/q/19974902
tagged with: css
has comment: http://stackoverflow.com/comment/41121851
score: 25
favorite count: 0
has answer: http://stackoverflow.com/a/70981508
has answer: http://stackoverflow.com/a/34856788
has answer: http://stackoverflow.com/a/41398802

http://stackoverflow.com/comment/41240746
has text: I'll work something up later tonight; gotta run. Thank you for your help.
type: AnswerComment
comment on: http://stackoverflow.com/a/26284373
score: 0
type: Comment

http://stackoverflow.com/comment/41361066
type: QuestionComment
comment on: http://stackoverflow.com/q/26350153
score: 0
type: Comment
has text: so @SomeKittens your 3 votes comment is wrong as i told before.. I don't think it is an issue with jasmine as well. It is clearly commented in jasmine codebase `// Objects with different constructors are not equivalent, but `Object`s // from different frames are.`

http://stackoverflow.com/q/26262364
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26262644
has title: Prevent file corruption on exiting node in middle of fs.writeFile
tagged with: node.js
type: AnsweredQuestion
score: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/26262644
has body: I'm reading and writing some txt/json files in Node.js that have become >25mb in file size. If the process is interrupted half way through an fs.writeFile I get an empty file. So basically, I'm wondering if anyone knows of a quick way to prevent file writes from being corrupted if the process is exited. Is there a way to catch the exit and wait until the fs.writeFile callback is called?

http://stackoverflow.com/comment/41084193
comment on: http://stackoverflow.com/a/26199844
score: 0
type: AnswerComment
type: Comment
has text: I have no idea what you're trying to accomplish with that old code, or where your `mouseover` goes... ...the old code is setting itself up to listen for things to happen on the page... so wrapping it would just make it wait for `mouseover` before listening for things to happen... ...maybe that's what you want. I don't know what you're trying to achieve.

http://stackoverflow.com/a/26250567
score: 2
answers question: http://stackoverflow.com/q/26250536
downvote count: 0
upvote count: 2
has body: Use : And remove the onclick from your HTML. GO As a general rule, you shouldn't add inline Javascript code to your HTML, to keep display and functionality separate.
type: Answer

http://stackoverflow.com/q/26295394
has body: On phone view The Navbar works just File in Bootply but it is not expanding in my site. Here is the full page Code- &lt;html lang="en"&gt;&lt;head&gt; &lt;title&gt;Your store&lt;/title&gt; &lt;meta http-equiv="Content-type" content="text/html;charset=UTF-8"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="keywords" content=""&gt; &lt;meta name="generator" content="nopCommerce"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;!-- Latest compiled and minified CSS --&gt; &lt;link href="/themes/ProcoDefault/Content/jquery.datetimepicker.css" rel="stylesheet" type="text/css"&gt; &lt;link href="/themes/ProcoDefault/Content/bootstrap-3.2.0/CSS/bootstrap.min.css" rel="stylesheet" type="text/css"&gt; &lt;link href="/Content/jquery-ui-themes/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css"&gt; &lt;script id="facebook-jssdk" src="//connect.facebook.net/en_US/all.js#xfbml=1"&gt;&lt;/script&gt;&lt;script src="/Scripts/jquery-1.10.2.min.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.validate.min.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.validate.unobtrusive.min.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery-ui-1.10.3.custom.min.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery-migrate-1.2.1.min.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/public.common.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/public.ajaxcart.js"&gt;&lt;/script&gt; &lt;script src="/Scripts/jquery.datetimepicker.js"&gt;&lt;/script&gt; &lt;link rel="shortcut icon" href="http://localhost:38451/favicon.ico"&gt; &lt;!--Powered by nopCommerce - http://www.nopCommerce.com--&gt; &lt;!--Copyright (c) 2008-2013--&gt; &lt;style type="text/css"&gt;.fb_hidden{position:absolute;top:-10000px;z-index:10001}.fb_invisible{display:none}.fb_reset{background:none;border:0;border-spacing:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:norm…
tagged with: css
has comment: http://stackoverflow.com/comment/41260404
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41260948
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26295837
accepted answer: http://stackoverflow.com/a/26295837
downvote count: 2
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41260835
has comment: http://stackoverflow.com/comment/41260806
has comment: http://stackoverflow.com/comment/41260366
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41260353
has title: Navbar collapse is not working in Bootstrap 3.2

http://stackoverflow.com/comment/41279405
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26305265
has text: Well, I'm not sure. I went into that and used: "JSON.stringify(week);" in the javascript and: "$datesOfWeek = json_decode($_POST['jsondata']);" later on in the php, but whenever I try to print any of the array out, there's nothing.
score: 0

http://stackoverflow.com/comment/41081041
comment on: http://stackoverflow.com/a/26196918
has text: if I remove the ..basichtml.js.. menu does not show up properly, just the raw ul stuff shows up...
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26264170
has comment: http://stackoverflow.com/comment/41268789
has body: See updated code and my comments bellow. For more details about Dialog and execDialog function see here. Some of the controls are not documented like: • link_text: a hyper link control • mclv: a multi-column list view (or grid) • slider: a slider • ok_help, ok_cancel_help, ok_other_help, ok_other_cancel_help controls • separator: draw a line horizontal or vertical with optional caption • Heading and Title fonts about 10pt and 12pt respectively • margin_width, margin_height properties for the view control • back_color, gradient_direction, gradient_type for the view control • A Dialog.setForeColorRed() method • A Dialog.visible() method to show/hide controls See for more details from this source var dialogBox = { description: { elements: [{ name: "Link to google", type: "link_text", // add a hyperlink item_id: "lnk1", alignment: "align_center", }, { type: "static_text", name: "Text about the link", }, { type: "button", // add a custom button item_id: "link", name: "Go to Link", alignment: "align_center", }, { type: "static_text", name: "Some more Information", }, { type: "ok", item_id: "okbo" }] }, commit: function(dialog) { app.alert("okbo!"); //executed only for first ok type }, "link": function () // handler of the custom component by id name { xfa.host.gotoURL("http://www.yahoo.com"); }, "lnk1": function () { xfa.host.gotoURL("http://www.google.com"); } }; app.execDialog(dialogBox);
upvote count: 3
has comment: http://stackoverflow.com/comment/41258781
has comment: http://stackoverflow.com/comment/41268120
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26252701
type: Answer
accepted answer of: http://stackoverflow.com/q/26252701
score: 3
downvote count: 0

http://stackoverflow.com/q/26327160
tagged with: javascript
downvote count: 4
upvote count: 0
has body: for some reason my script that has $(document).ready(function() { is not being executed. Looks like at the point the script is executed, the page is being loaded. However, I don't know which script that causing it. Could anyone suggest how to troubleshoot this? regards, ethereal1m More detail: I have a Jssor code attached in the header and it gives me the following error in the console: TypeError: c is undefined I just realized it now that the error existed. I conclude that the page was still loading by stepping in using debugger and that part of the code, $(document).ready(function() {, got skipped, hence the conclusion. By showing my other part of my code is not relevant of this problem, since the problem is not a code that wrongly executed, rather a part that is not executed. Go back to the error, could this be related to the problem? If yes, I would like a help from the jassor team please... If not, need other suggestion... Last updated: The problem is not in jssor, but in my code.
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41319238
has answer: http://stackoverflow.com/a/26327746
has title: Troubleshoot cause of document not ready in javascript
has comment: http://stackoverflow.com/comment/41319244
tagged with: jssor
has comment: http://stackoverflow.com/comment/41318802
has comment: http://stackoverflow.com/comment/41332260
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41319186
score: -4
has comment: http://stackoverflow.com/comment/41319067
has comment: http://stackoverflow.com/comment/41318552
type: Question
has comment: http://stackoverflow.com/comment/41318388
accepted answer: http://stackoverflow.com/a/26327746
has comment: http://stackoverflow.com/comment/41318971
has comment: http://stackoverflow.com/comment/41318427

http://stackoverflow.com/comment/41252908
has text: how are you cloning? see here: http://stackoverflow.com/questions/9549643/jquery-clone-not-cloning-event-bindings-even-with-on
comment on: http://stackoverflow.com/q/26290909
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41115871
type: QuestionComment
has text: Please post the XML data as well. Is `x[0]` undefined, or `x[0].firstChild`, or `x[0].firstChild.nodeValue`?
comment on: http://stackoverflow.com/q/26217099
type: Comment
score: 2

http://stackoverflow.com/a/26309633
has body: onLoad== need to have only one = also click() is jQuery function, are you pre-loading it? This is working example: http://jsfiddle.net/mgc5mqfa/
has comment: http://stackoverflow.com/comment/41286872
answers question: http://stackoverflow.com/q/26309537
accepted answer of: http://stackoverflow.com/q/26309537
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/41286850
type: Answer
has comment: http://stackoverflow.com/comment/41286817
has comment: http://stackoverflow.com/comment/41286974

http://stackoverflow.com/q/26334999
linked to: http://stackoverflow.com/q/24252753
has title: What's the difference between window.onload() and dojo.domReady
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41333446
score: 1
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: dojo
has comment: http://stackoverflow.com/comment/41334458
has body: I have met an issue on dojo v1.8.3 :when I use the CODE_A: require(["dojo/dom", "dojo/domReady!"], function( dom) { textRegion2CountryInfo = com_ibm_bpm_global.coachView.byControlId(["textRegion2CountryInfo" + ""]).context.binding.get("value"); console.log("regionString:" + textRegion2CountryInfo); }); instead of CODE_B: window.onload=function(){ textRegion2CountryInfo = com_ibm_bpm_global.coachView.byControlId(["textRegion2CountryInfo" + ""]).context.binding.get("value"); console.log("regionString:" + textRegion2CountryInfo); } There are 2 different results:CODE_A will display an error message "ReferenceError: com_ibm_bpm_global is not defined" in firebug,but the CODE_B will display the correct value. I think there may be difference between window.onload and dojo/domReady,I googled for solution,but I still have no idea,any help will be appreciatied. BTW:com_ibm_bpm_global.coachView.byControlId(["textRegion2CountryInfo" + ""]).context.binding.get("value") is an IBPM API,I use it to cach server data in an element of page. reference Dojo and the onload event http://dojotoolkit.org/reference-guide/1.8/dojo/addOnLoad.html
has comment: http://stackoverflow.com/comment/41333669

http://stackoverflow.com/comment/41170912
comment on: http://stackoverflow.com/q/26246209
score: 0
type: Comment
type: QuestionComment
has text: @JamesHay Width of the browser/viewport. It's essentially being used for a mobile nav.

http://stackoverflow.com/q/26247384
answer count: 1
tagged with: ruby
tagged with: sinatra
has title: What is the best way to configure Javascript from third-party site's script/include tag?
linked to: http://stackoverflow.com/q/2464966
has body: tl;dr: Is it safe/wise to use dynamic view engine such as Sinatra+ERB to dynamically generate javascript files with custom content for embedding on third party sites? And specifically is it safe/wise to use that server-side view engine to embed those data as variables on the javascript page? Full story: I have javascript/Sinatra application that functions a little like Google Analytics, in that partner sites include our javascript file, and that JS code sends data to our Sinatra app. I want to make it easy for our clients to configure this javascript include, since there is state data (like their customer ID and the user ID that is currently logged in) that they need to communicate to our javascript code. However, the data they need to communicate must be translated via our server-side database before our script can use it. My current method feels a little hacky: Sinatra serves a dynamic javascript file as a "view". The client includes that file with a script tag such as: &lt;script src="/dynamic-js/include.js?client_key=xyz&amp;user_key=abc"&gt; On Sinatra's side, it gets those parameters, uses a database to convert them to internal values and then serves a dynamic (erb) javascript file with code like: window.ourInternalVars = {}; window.ourInternalVars.client_int_key="&lt;%=client_int_key%&gt;"; window.ourInternalVars.user_int_key="&lt;%=user_int_key%&gt;"; My question is whether this is a "bad" solution (one likely to yield undesirable and/or unexpected outcomes) and/or whether there are "better" approaches (broadly used approaches, ones using existing libraries, or following community/industry best practices) to this problem? I could obviously solve this problem with a static javascript file that reads its own URL parameters and makes an ajax call to configure itself, but that is slower (the data aren't present when the script begins) and so less useful for our purposes (it's also less reliable). We could also ask our clients to make ajax/api calls to our server…
linked to: http://stackoverflow.com/q/106481
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41173085
tagged with: dynamic
accepted answer: http://stackoverflow.com/a/29211114
type: Question
has comment: http://stackoverflow.com/comment/41174486
tagged with: javascript
has answer: http://stackoverflow.com/a/29211114
score: 0

http://stackoverflow.com/q/26345543
has comment: http://stackoverflow.com/comment/41353053
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26345708
type: Question
linked to: http://stackoverflow.com/q/6095530
has comment: http://stackoverflow.com/comment/41352637
has comment: http://stackoverflow.com/comment/41352717
has title: No recursive function, still getting a Maximum call stack size exceeded error
tagged with: javascript
has comment: http://stackoverflow.com/comment/41352648
tagged with: express
score: 0
has body: I'm experimenting with Node, Express and Mongoose. Here's part of my model -- book-model.js which exports its schema and methods for use in a controller. I'm implementing the fat model, skinny controller approach: // ... BookSchema.statics.create = function(title, author, category, callback) { var Book = mongoose.model('Book'); Book.create({ title: title, author: author, category: category }, callback); }; // ... module.exports = mongoose.model('Book', BookSchema); And here's part of the controller -- books-controller.js: // ... var Book = require('./book-model'); router.post('/', function(req, res) { var title = req.body.title, author = req.body.author, category = req.body.category; Book.create(title, author, category, function(err) { if (err) { console.log(err); res.redirect('/add-book'); } res.redirect('/books'); }); }); // ... Now, when I attempt to create a new book document, I get the annoying Maximum call stack size exceeded message. I had a look at a similar question here on SO: Maximum call stack size exceeded error and the answer is that "Somewhere in your code, you are calling a function which in turn calls another function and so forth, until you hit the call stack limit. This is almost always because of a recursive function with a base case that isn't being met." I can't see a recursive function in the books-controller.js file that has a base case that isn't being met or what is it that I'm missing? Please advise.
answer count: 1
has answer: http://stackoverflow.com/a/26345708
tagged with: node.js

http://stackoverflow.com/q/26353751
downvote count: 0
score: 1
favorite count: 0
has title: Add, Delete & Clear HTML Elements in a Table
possible better answer: http://stackoverflow.com/a/26353886
has answer: http://stackoverflow.com/a/26353891
has answer: http://stackoverflow.com/a/26353886
has answer: http://stackoverflow.com/a/26353795
type: AnsweredQuestion
has body: In the requirement scenario, i am to add, delete textboxes &amp; select dropdown on a button click. DEMO My Add functionality works well. How to Delete &amp; Clear Rows. For Delete the last Row should get deleted &amp; when new Row is added after deletion the id hierarchy should continue.
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26354216
has answer: http://stackoverflow.com/a/26353800
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/26353969
accepted answer: http://stackoverflow.com/a/26353800

http://stackoverflow.com/comment/41226560
type: QuestionComment
comment on: http://stackoverflow.com/q/26276566
has text: Paragraph doesn't have any attributes.
score: 0
type: Comment

http://stackoverflow.com/comment/41221240
comment on: http://stackoverflow.com/q/26273934
type: Comment
type: QuestionComment
score: 2
has text: I've always handled PDF generation from the "server-side" using Classic ASP then streamed it to the client. I think your going to struggle to use [Data URIs with IE](http://caniuse.com/#feat=datauri) as even in IE11 it is only "partially supported".

http://stackoverflow.com/a/26253213
score: 0
has body: of course it is. It's doable in javascipt although to help you devise something we would need a relationship between categories. However, that's sounds like something that should be done in your data model (a relationship between dept - category, classic reflexive relationship parent - children). angular should be receiving from the back end an array already ordered.
type: Answer
answers question: http://stackoverflow.com/q/26253012
has comment: http://stackoverflow.com/comment/41187215

http://stackoverflow.com/a/26271132
score: 2
has comment: http://stackoverflow.com/comment/41216546
has comment: http://stackoverflow.com/comment/41216529
answers question: http://stackoverflow.com/q/26270842
has comment: http://stackoverflow.com/comment/41216567
has comment: http://stackoverflow.com/comment/41216344
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26270842
upvote count: 2
has comment: http://stackoverflow.com/comment/41216329
type: Answer
has comment: http://stackoverflow.com/comment/41216401
has body: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1312295772 When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers. $('div').each(function(i, element) { element.normalize(); //The normalize() method removes empty Text nodes, and joins adjacent Text nodes. }); Example

http://stackoverflow.com/comment/41330514
comment on: http://stackoverflow.com/a/26323294
type: Comment
has text: i've been trying but no success. When it goes up to some stuff 5, how do i make it go back to 1? so its a continuous loop, thank you
type: AnswerComment
score: 0

http://stackoverflow.com/a/26301125
type: Answer
downvote count: 0
score: 1
has body: Just add your specific style property to make messages look as you want var currentSelectedColor = undefined; $('.colorPicker>div').on('click',function(e){ currentSelectedColor = $(e.currentTarget).attr('class'); $('#typetextbox').css('background-color',currentSelectedColor); }); $('#submit').on('click',function(){ var msg = $.trim($('#typetextbox').val()); if(msg=='') { return; } $(' ').append($(" ", { class: currentSelectedColor? currentSelectedColor: '', text: msg })).appendTo('#messagebox'); }); li { padding-bottom: 3px; list-style:none; } #messagebox>li>div { height:auto; width:auto; font-family: Helvetica, sans-serif; display: inline-block } .colorPicker>div { width: 10px; height:10px; display: inline-block } .red { background-color: red; } .green { background-color: green; } .blue { background-color: blue; } Submit
answers question: http://stackoverflow.com/q/26300640
upvote count: 1

http://stackoverflow.com/q/26326657
possible better answer: http://stackoverflow.com/a/26326789
accepted answer: http://stackoverflow.com/a/26328814
has answer: http://stackoverflow.com/a/26326789
tagged with: css
has comment: http://stackoverflow.com/comment/41317508
type: AnsweredQuestion
type: Question
answer count: 2
has body: I would like to ask for help completing this homework. Now, before you turn away , i am not asking anyone to write anything for me. I just need someone to point me in the right direction. So, i need to create a dice game. My problem is that i am having problems finding a way to connect Javascript code to my Dices in the HTML file. For example: If the code : var dice1 = Math.round(Math.random() * 6); gives me say 4, then i would like for it to show my dice_4.png picture. This is the code for the cube/dice on the html file. And on my css file. .front { background-image: url('Pildid/dice_1.png'); background-size:100%; } .back { background-image: url('Pildid/dice_6.png'); background-size:100%; } .right { background-image: url('Pildid/dice_4.png'); background-size:100%; } .left { background-image: url('Pildid/dice_3.png'); background-size:100%; } .top { background-image: url('Pildid/dice_2.png'); background-size:100%; } .bottom { background-image: url('Pildid/dice_5.png'); background-size:100%; } I used a 3D cube without the rotation. To recap, when random gives me say 4 for the first cube, i want the html to show me the .right part of the css file. Not sure how much sense i am making here, will try to explain better if this is too confusing. Does anyone have any ideas where i should look? (Sorry, the format is a little messed up but its my first time and whatnot). Thank you.
has answer: http://stackoverflow.com/a/26328814
tagged with: javascript
has comment: http://stackoverflow.com/comment/41318099
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Javascript random function changing the picture in the html file

http://stackoverflow.com/comment/104086659
comment on: http://stackoverflow.com/a/49698444
has text: Why would you `JSON.stringify` and `JSON.parse` right one after another? It wouldn't be needed and would waste the resources.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26301758
has comment: http://stackoverflow.com/comment/41273037
answers question: http://stackoverflow.com/q/26301387
downvote count: 0
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/41272930
score: 3
has comment: http://stackoverflow.com/comment/41272603
has comment: http://stackoverflow.com/comment/41273386
has body: The skipToChapter function is not in the global scope, so can't be called from an inline click handler. Instead you should assign the click handler when you build the link, in an unobtrusive way like below. If you assign it like this, then skipToChapter is in scope, and you don't have to make it a global, and you remove the need for undesirable inline event handlers. function buildChapterList() { for(var i=0; i&lt;Object.keys(theChapterCues).length; i++) { chapterListHTML = $("&lt;li&gt;&lt;a class='fun-blue' href='javascript:void(0)'&gt;"+ theChapterCues[i]["title"] +"&lt;/a&gt;&lt;/li&gt;"); (function(i){ chapterListHTML.find('a').click(skipToChapter.bind(this, i)); })(i); chapterListHTML.appendTo("ul#chapter-list"); $("body").bind("DOMNodeInserted", function() { $(this).find('#chapter-list li').first().addClass("active"); }); } }

http://stackoverflow.com/q/26334088
has body: I m new to netsuite ,i have to find difference between two dates in netsuite. How can i get the difference of two dates in netsuite through scripts.help me,Thanks.
tagged with: netsuite
tagged with: javascript
has title: How to get difference between two dates in netsuite?
favorite count: 0
upvote count: 5
answer count: 3
has comment: http://stackoverflow.com/comment/41335592
has comment: http://stackoverflow.com/comment/41332287
has answer: http://stackoverflow.com/a/26351697
downvote count: 0
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/79183388
has comment: http://stackoverflow.com/comment/41357410
score: 5
has answer: http://stackoverflow.com/a/32181633

http://stackoverflow.com/comment/41364355
comment on: http://stackoverflow.com/a/26351862
score: 0
type: AnswerComment
has text: Do you know code for last input of table row where type text or $(input not checks)?
type: Comment

http://stackoverflow.com/comment/41170956
has text: I'm not good with css xD always using bootstrap or other that I find online & It's a list of href so I would like to make a 10 buttons under each other that's why it would look not really good
comment on: http://stackoverflow.com/q/26245937
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26209228
tagged with: javascript
has comment: http://stackoverflow.com/comment/41158277
has title: How to truncate large integers during bitwise operations to mimic JavaScript in Ruby?
has comment: http://stackoverflow.com/comment/41101370
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26246356
favorite count: 0
tagged with: ruby
has body: I've found that working with integers in Ruby causes them to act different than JS when their binary representation is larger than 32 bits. a = 144419633058839139324 b = 3903086624 JS: a &gt;&gt; 0; =&gt; 1482555392 b &gt;&gt; 0; =&gt; -391880672 Ruby: a &gt;&gt; 0 =&gt; 144419633058839139324 [a].pack('V').unpack('V').first =&gt; 1482560508 [b].pack('V').unpack('V').first =&gt; 3903086624 My question is how can I convert my Ruby code to give the same return values JS?
type: AnsweredQuestion
tagged with: bit-manipulation
has comment: http://stackoverflow.com/comment/41138371
type: Question
linked to: http://stackoverflow.com/q/12125421
has answer: http://stackoverflow.com/a/26246356
score: 5
upvote count: 5

http://stackoverflow.com/a/26224607
has body: Reason: There is no update function (or code blocks) to get updated or newly added DB info in your code. Also, you will not read and add new db info to your map data because your PHP code is only called once at initialization-time. Using PHP codes, you will not do it because of the PHP features. PHP will only work on back-end service sides. Suggestion: 1. You need client-side updates to access service side updates and receive them. 2. You need to add the updated or newly added db data to your Marker (map) array on client sides. For this, 1. Add client side update features in AJAX or others to update the info to JSON objects. 2. Call the AJAX block (retrieving block or function to read in JSON object array and add them to map marker arrays). 3. Update null pointer of Map Markers to the new Map array. Sorry for not creating a working code set based on your codes. It will take a fairly long while.
answers question: http://stackoverflow.com/q/26224129
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41130860

http://stackoverflow.com/a/26254332
score: 0
has body: {{weather.forecastday[0].high.celsius}} {{weather.forecastday[0].low.celsius}}
type: Answer
has comment: http://stackoverflow.com/comment/41185492
answers question: http://stackoverflow.com/q/26253973

http://stackoverflow.com/comment/41091522
has text: You have a spare `"` in your query line (and a SQL injection vulnerability too).
comment on: http://stackoverflow.com/q/26203969
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41346935
comment on: http://stackoverflow.com/a/26339421
score: 0
type: AnswerComment
has text: Actually, I have tried to replace this line with - 'alert', 'window.alert' same for 'confirm' and 'prompt'. and it haven't work for me still.
type: Comment

http://stackoverflow.com/a/26347100
score: 2
has body: Referring to btn only works by chance. It doesn't refer to the variable that you declared inside the handler function, it refers to the global variable btn which was automatically created because you have an element with ID btn. See Do DOM tree elements with ids become global variables? for more info. You can easily test this by changing the variable name to var button = document.getElementById('btn'); and button.addEventListener('click', handler);. You will notice that this doesn't work either. JavaScript has function scope, so every variable that is declared (var foo;) inside a function can't be accessed from outside the function.
has comment: http://stackoverflow.com/comment/41355776
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26347039
answers question: http://stackoverflow.com/q/26347039
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41355805

http://stackoverflow.com/comment/41149327
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26235116
has text: Did you also remove all the opacity stuff?
type: AnswerComment

http://stackoverflow.com/a/26323900
answers question: http://stackoverflow.com/q/26323529
has body: I found this: https://gist.github.com/geksilla/6543145 which is exactly what I was looking for :)
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26323529

http://stackoverflow.com/comment/41201581
type: Comment
type: QuestionComment
has text: *"Well the server only sees HTTP requests"* That is how the web typically works. Do you understand basics of cookie and cookieless sessions?
score: 0
comment on: http://stackoverflow.com/q/26263182

http://stackoverflow.com/q/26224658
has body: I added a custom alert in my web application based on the below suggestion for Alert issue. It works fine in iOS7 device, but on iOS8 device it displays the messages in bold font. Is it possible to display the message font without BOLD? Please find the attached screenshot for your reference. Change JavaScript alert dialog title in iOS Code snippet: function alert2(words){ var iframe = document.createElement("IFRAME"); iframe.setAttribute("src", 'data:text/plain,'); document.documentElement.appendChild(iframe); window.frames[0].window.alert(words); iframe.parentNode.removeChild(iframe); } function takePicture() { alert2("Testing custom alert"); }
has comment: http://stackoverflow.com/comment/41167180
linked to: http://stackoverflow.com/q/10681381
score: 0
has title: How to unbold alert message?
has comment: http://stackoverflow.com/comment/41167111
tagged with: ios8
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41130965
tagged with: iphone-6
tagged with: ios
answer count: 1
has answer: http://stackoverflow.com/a/26225018
tagged with: javascript
has comment: http://stackoverflow.com/comment/41130793
type: Question

http://stackoverflow.com/q/26239510
tagged with: datatables
tagged with: zeroclipboard
answer count: 1
tagged with: angularjs
has title: ng-clip in datatables using server-side processing
has comment: http://stackoverflow.com/comment/41266038
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26314829
has body: I have AngularJS frontend app with PHP backend. Also I use ng-clip ( zeroclipboard ) and datatables with server-side processing. All rows are returned from server side and one output of row looks like this: "aaData": [ { "id": 287, "email": "random@email.com", "displayName": "Name Surname", "role": "Some Role", "school": "Some school", "section": "Some section, "token": " ", "datetime": "06.10.2014 20:51", "actions": " \n " }, And because that datatatables gets output ng-clip plugin isn't working. I don't know why it's not working but looks like datatable rows are loaded after ng-clip, that is loaded on pageload, so Question is how can I re-init ng-clip so each row's button would work, or how can I could make workaround for this ? "token": " " Button should copy contents of clip-copy="" which differs in each row. Plunkr This demonstrates that first button does copy, and copy buttons in datatable rows aren't working
type: Question
has comment: http://stackoverflow.com/comment/41273672
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26314829
score: 0

http://stackoverflow.com/comment/41111787
type: Comment
has text: Note that my demo HTML has . My remove() could be better (possibly) if it removed the parent p too. As that is dependant on your HTML though it - well - depends. ;)
comment on: http://stackoverflow.com/a/26214896
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41236024
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26282165
has text: Thanks - any chance of the plain JS version as well?

http://stackoverflow.com/comment/41389971
has text: Thanks, but as pointed out above, there is no need for jQuery; I was making things too complex.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26352030

http://stackoverflow.com/q/26204005
has answer: http://stackoverflow.com/a/26204073
has comment: http://stackoverflow.com/comment/41091399
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41091324
tagged with: http://stackoverflow.com/tag/json
has title: Acessing JSON Information by order
has comment: http://stackoverflow.com/comment/41091500
downvote count: 1
accepted answer: http://stackoverflow.com/a/26204073
type: Question
has comment: http://stackoverflow.com/comment/41091272
tagged with: javascript
score: -1
has body: I am reading information from a JSON string, and when I execute console.log(record.seenTime.time.seenEpoch) it display the right information. But when I use console.log(record.seenTime.time[0].seenEpoch), I get an error saying : TypeError: Cannot read property 'seenEpoch' of undefined. Here is an example set of data: { seenTimes: { time: { seenTime: '2014-09-10T20:18:32Z', seenEpoch: 1410380312 } } } Anyone know what am I doing wrong? Thanks
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41091302
favorite count: 0
has comment: http://stackoverflow.com/comment/41091524

http://stackoverflow.com/q/26230756
has comment: http://stackoverflow.com/comment/41141932
accepted answer: http://stackoverflow.com/a/26231777
has body: This is a theoretical question... I have two mouseUp events. One of them is fired from a external jQuery plugin developed by other people that I'm using, this event is bound in this way: //Add Events for mouse drag / touch swipe action $(document).bind(self.event_up + self.id, { self: self }, self.mouseUp); The other mouse up event, it's fired by me, using the standard code, something like this: $(document).mouseup(function (e) { } }); My question is easy, sometimes one event is fired before the other, and sometimes the other event is fired before the other one. Can somebody explain me if I have any options to bind the mouseUp event in some order?
has answer: http://stackoverflow.com/a/26231777
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41141985
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Order MouseUp Event

http://stackoverflow.com/comment/41217660
type: Comment
comment on: http://stackoverflow.com/a/26271944
score: 1
type: AnswerComment
has text: +1, although you may need to use `clone(true)` to also clone the events associated with the buttons.

http://stackoverflow.com/a/26240685
answers question: http://stackoverflow.com/q/26239203
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/41197645
downvote count: 0
has comment: http://stackoverflow.com/comment/41162580
has comment: http://stackoverflow.com/comment/41163034
has body: Use @lends to tell jsdoc that what you have in the function belongs to your namespace. This way you don't have to pepper your code with @memberof everywhere. The following works when I run it here: /** * @namespace */ var ns; (/** @lends ns */ function (ns) { 'use strict'; /** * Constructs class * @class */ function Foo() { } /** * Blabla */ Foo.prototype.bar = function () { }; ns.Foo = Foo; })(ns || (ns = {}));
has comment: http://stackoverflow.com/comment/41163575
has comment: http://stackoverflow.com/comment/41197019
has comment: http://stackoverflow.com/comment/41196794
upvote count: 3
has comment: http://stackoverflow.com/comment/41164883
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26239203
has comment: http://stackoverflow.com/comment/41163815

http://stackoverflow.com/comment/41166658
type: QuestionComment
has text: With [HTML5](http://diveintohtml5.info/geolocation.html)
score: 1
comment on: http://stackoverflow.com/q/26243928
type: Comment

http://stackoverflow.com/a/29681809
type: AcceptedAnswer
has body: $scope.gridApi.core.getVisibleRows() returns an array of rows in the current sort/filter order.
type: Answer
upvote count: 12
has comment: http://stackoverflow.com/comment/72010101
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26273686
answers question: http://stackoverflow.com/q/26273686
has comment: http://stackoverflow.com/comment/49020417
has comment: http://stackoverflow.com/comment/47563548
score: 12
has comment: http://stackoverflow.com/comment/47621793

http://stackoverflow.com/comment/41313631
type: QuestionComment
comment on: http://stackoverflow.com/q/26324097
has text: @Vadim yes, I did try that, and as I said, I've lost the history. :) Firebug doesn't keep the history when it's closed. I've added this to the question.
score: 0
type: Comment

http://stackoverflow.com/comment/41336966
comment on: http://stackoverflow.com/a/26336975
score: 0
type: AnswerComment
type: Comment
has text: I think both forms about equally as "easy" to understand .. in any case there *is* a subtle difference between the forms. This has been covered too many times before.

http://stackoverflow.com/comment/89114263
type: AnswerComment
has text: Just an extra tip: when Felix refers to the function what you need to do is add that function name to your call parameters: jsonpCallback: 'func'
type: Comment
comment on: http://stackoverflow.com/a/26209655
score: 0

http://stackoverflow.com/q/26209394
has title: Add port to a custom elements in jointJS
answer count: 3
has answer: http://stackoverflow.com/a/26221963
accepted answer: http://stackoverflow.com/a/26221963
possible better answer: http://stackoverflow.com/a/26280066
favorite count: 0
has answer: http://stackoverflow.com/a/26598996
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0
type: Question
score: 3
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/26280066
tagged with: jointjs
has body: I am new to jointJs library and I am trying to add ports to my custom element that contains html code in it. I followed this tutorial (http://www.jointjs.com/tutorial/html-elements) and created my element. But when I try to add ports to it (based on this tutorial: http://www.jointjs.com/tutorial/ports) it does not work. Another problem I have is that I want the textbox(textarea on my custom shape) to disappear when I click on the blank paper, and just the label with its content stays visible on the element. For that I used the following piece of code (but it does not give me the above-mentioned functionality): paper.on('blank:pointerdown', function(evt, x, y) { this.$box.find('textarea').toBack(); }); this.model.on('cell:pointerclick', function(evt, x, y) {this.$box.find('textarea').toFront();}); My whole code is as below: Test I have searched a lot for answers to these problems but I was not successful finding simple and comprehensive ones. Any help will be appreciated. Thanks.

http://stackoverflow.com/comment/41495552
score: 0
type: Comment
has text: Well, it all depends on how you do it. Product doesn't have to be a word, it could just be P or 1, for example, you could do /p/:id/:product/:slug, so /p/123/producto/chorizo
type: AnswerComment
comment on: http://stackoverflow.com/a/26300047

http://stackoverflow.com/a/26287305
answers question: http://stackoverflow.com/q/26287197
has comment: http://stackoverflow.com/comment/41248175
type: Answer
has body: It is not defined because it is, may be (probably not, this is typical for content of this variable), out of scope of the function success. Try this way function(options) { var optns = options; $.ajax({ url: 'https://localhost:port/api/blah/blah', dataType: 'json', async: false, data: data, success: function(json) { DisplayThisArr = json; vM.getOtherData(); optns.success(DisplayThisArr); } });//end ajax }//end function(options) Or you do not submit options on the call of function read ))
has comment: http://stackoverflow.com/comment/41247263
has comment: http://stackoverflow.com/comment/41248213
has comment: http://stackoverflow.com/comment/41247611
has comment: http://stackoverflow.com/comment/41247484
has comment: http://stackoverflow.com/comment/41247564
has comment: http://stackoverflow.com/comment/41247702
score: 0

http://stackoverflow.com/comment/41239498
score: 0
type: Comment
type: QuestionComment
has text: See http://www.quirksmode.org/js/this.html. Even though the explanation is not 100% correct, it explains how to get a reference to the element.
comment on: http://stackoverflow.com/q/26283931

http://stackoverflow.com/comment/72829810
type: QuestionComment
has text: I already provided answer to this question at: [Windows equivalent of 'touch' (i.e. the node.js way to create an index.html)](http://stackoverflow.com/a/37756874/30038)
score: 0
comment on: http://stackoverflow.com/q/26343974
type: Comment

http://stackoverflow.com/a/26258269
answers question: http://stackoverflow.com/q/26258206
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41192010
type: Answer
has comment: http://stackoverflow.com/comment/41192181
has body: (?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*([^\w]|_)).{8,} The above is the regex you need. You've two quantifiers, which is causing the error. DEMO
has comment: http://stackoverflow.com/comment/41192238
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26258206

http://stackoverflow.com/comment/41331825
score: 0
type: Comment
type: QuestionComment
has text: @GeniaS. that's a fair question...however, I was refering to `saveAccountData`...it doesn't save the last item, it saves whatever the global array holds
comment on: http://stackoverflow.com/q/26334062

http://stackoverflow.com/comment/41246771
score: 0
type: Comment
type: QuestionComment
has text: Ya, It's my mistake. It's just an typo error. Now fixed.
comment on: http://stackoverflow.com/q/26287463

http://stackoverflow.com/comment/41106625
has text: Vahan, thanks for the answer. That will indeed be helpful in the future. The fix was unfortunately a stupid syntax error on my part. Nesting the 'template' hash inside the initialize method when it should have been at the root. For anyone stuck with the same problem I'm going to answer my own question below.
type: Comment
comment on: http://stackoverflow.com/a/26211803
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41168530
type: QuestionComment
comment on: http://stackoverflow.com/q/26244635
score: 0
has text: Ah! Thank you so much. This has cleared it up perfectly.
type: Comment

http://stackoverflow.com/q/26278759
type: Question
has comment: http://stackoverflow.com/comment/41257703
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41266790
has comment: http://stackoverflow.com/comment/41235468
favorite count: 0
upvote count: 2
has body: When using the Publish/Subscribe pattern I sometimes face a disadvantage: the semantic coupling it creates between parts of the system. I'm using it for web development, specifically JavaScript-heavy web applications. What ways are there to reduce, explicitize or remove the FORM module's dependency (on the VALIDATION module) as shown in the example below? var Event = require('some-pub-sub-library'); // E.g. github.com/mroderick/PubSubJS var events = { formBeforeSubmit: 'form/beforeSubmit', formSubmit: 'form/submit', validation: 'validation/go', validationOk: 'validation/ok' }; (function() { // FORM MODULE var submit = false; $('form').on('submit', function() { if (submit == false) { // For the validation to do its thing Event.publish(events.formBeforeSubmit); return false; // Don't submit the form } return true; }); // The validation should publish this event Event.subscribe(events.submit, function() { submit = true; $('form').trigger('submit'); }); }()); (function() { // VALIDATION MODULE Event.subscribe(events.formBeforeSubmit, function() { if ($('input').val() == 'foo') Event.publish(events.submit); // Validation passed else alert('Validation didn\'t pass.'); }); }());
type: UnansweredQuestion
tagged with: publish-subscribe
has title: How to handle dependencies when using the pub/sub pattern
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/41257442
tagged with: observer-pattern

http://stackoverflow.com/q/26263030
has title: Javascript voting function doesnt work with two or more copies
has comment: http://stackoverflow.com/comment/41201950
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I'm looking to add multiple voting functions to my website. When you click the up or down icons the image should change colors and the text should change accordingly. I got it to work with one copy, but when I make a second or third copy it causes an error. I'm a novice at javascript so any help will be appreciated. jfiddle: http://jsfiddle.net/ghc9ox8j/ (note images not working) This is the working Javascript: $(document).ready(function() { $('.weights').click(function() { $('img', this).attr('src', function(i, oldSrc) { return oldSrc == 'weightup.png' ? 'weightdown.png' : 'weightup.png'; }); $('.weightswitch').toggle(400); return false; }); }); function showMessage(which) { if (which == 1) { document.getElementById("weightup").style.display = "block"; document.getElementById("weightdown").style.display = "none"; document.getElementById("average").style.display = "none"; } else { document.getElementById("weightup").style.display = "none"; document.getElementById("weightdown").style.display = "block"; document.getElementById("average").style.display = "none"; } } This is the working copy HTML: Fat! Average Thin ! 50-300 And the CSS: /*-------------weight------------------*/ input.weightup[type="radio"]{ opacity: 0; right:33px; margin-top:7px; position:absolute; cursor:pointer; } input.weightup[type="radio"]+label{ background: bottom center no-repeat; padding-left:40px; padding-bottom:10px; } input.weightup[type="radio"]:checked+label{ background:url(images/weightupall.png)top center no-repeat; padding-left:40px; padding-bottom:10px; } input.weightup[type="radio"]:hover+label{ background:url(images/weightupall.png)top center no-repeat; padding-left:40px; padding-bottom:10px; } input.weightdown[type="radio"]{ opacity: 0; right:33px; margin-top:-5px; position:absolute; cursor:pointer; } input.weightdown[type="radio"]+label{ background:url(images/weightdownall.png)top center no-repeat; padding-left:40px; padding-top:9px; } input.weightdown[type="radio"]:checked+label{ b…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41201086
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41200989
has comment: http://stackoverflow.com/comment/41201049
score: 0
has answer: http://stackoverflow.com/a/26263115
answer count: 1

http://stackoverflow.com/q/26219855
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26219906
has answer: http://stackoverflow.com/a/26219908
type: Question
possible better answer: http://stackoverflow.com/a/26219906
has comment: http://stackoverflow.com/comment/41121257
tagged with: javascript
has answer: http://stackoverflow.com/a/26220400
accepted answer: http://stackoverflow.com/a/26219908
has body: I have a piece of text that looks like this: We recently reduced the number of savings accounts we offer. I welcomed this because I think members find it confusing to look through tables of lots of slightly different accounts, all with advantages and disadvantages. I think it affects their trust in us. But I don’t understand why we haven’t applied this to children’s accounts of all things. Since children don’t pay tax, why do they need an ISA as well as a children’s savings account? Children (and their parents) are the last people we want to confuse as they could be customers for life. And why is our children’s savings account called the ‘Smart Limited Access’? It doesn’t strike me as being very self-explanatory or child friendly. How about just ‘Nationwide Young Saver Account’? I’d be grateful if you could clear this up for me. Best regards, Vanessa However when it is put into html it ignores this layout and has it has one line. How can I keep it as its orginal text
has comment: http://stackoverflow.com/comment/41121285
score: 0
has comment: http://stackoverflow.com/comment/41121444
has answer: http://stackoverflow.com/a/26220120
tagged with: jquery
has answer: http://stackoverflow.com/a/26220265
has title: text not showing how it should be in html
answer count: 5

http://stackoverflow.com/q/26296611
answer count: 5
has body: Hi I have three dynamic variable my below code is working to check if all are equal if ((a == b) &amp;&amp; (b == c)) { // they're all equal ... } But, I want to create a function passing three variable to check if any one variable is equal to other variable. a=1;b=2;c=1; isEqual = compareVariable(a,b,c); here isEqual should be true . How to create this function
has answer: http://stackoverflow.com/a/26296710
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26296744
tagged with: equals
score: 1
has comment: http://stackoverflow.com/comment/41262661
has comment: http://stackoverflow.com/comment/41262540
upvote count: 1
accepted answer: http://stackoverflow.com/a/26296727
type: Question
has answer: http://stackoverflow.com/a/26296689
has title: compare three variable using java script
tagged with: javascript
tagged with: equality
has answer: http://stackoverflow.com/a/26296728
possible better answer: http://stackoverflow.com/a/26296689
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41263394
has answer: http://stackoverflow.com/a/26296727

http://stackoverflow.com/comment/41297299
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26315673
type: Comment
has text: Huh, works for me http://jsfiddle.net/hyt4qc4u/

http://stackoverflow.com/comment/41174486
type: QuestionComment
comment on: http://stackoverflow.com/q/26247384
score: 0
has text: @allenhwkim tx. tl;dr section added.
type: Comment

http://stackoverflow.com/comment/41227341
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26277577
has text: You don't need something as complex as ajax, unless you need to retrieve the email address from a database. Just use Javascript and the `onchange` event of the inputs.

http://stackoverflow.com/comment/41299200
type: Comment
has text: @RaphaelSerota `innerText` isn't standard. It should be `textContent`.
type: AnswerComment
comment on: http://stackoverflow.com/a/26316564
score: 0

http://stackoverflow.com/q/26320201
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/26320351
score: 0
has comment: http://stackoverflow.com/comment/41305865
answer count: 1
has comment: http://stackoverflow.com/comment/41305719
accepted answer: http://stackoverflow.com/a/26320351
has title: Show value using knockout
has body: I am calling an action that returns a JSON object using the following Action public async Task&lt;JsonResult&gt; GetProjects(int companyId) { } writing the following sentence in javascript: data.Name I can see the correct value from the object but when I try to use its value using knockout I am getting a weird value: &lt;h2 id="companyName" data-bind="text: companyName"&gt;&lt;/h2&gt; The code for calling the action is the following: $.get('Projects/GetProjects?companyId=' + param, function (data) { ko.applyBindings(data); $('#detailsModal').foundation('reveal', 'open'); "[object HTMLHeadingElement]" What am I doing wrong?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: knockout.js
type: Question
tagged with: c#

http://stackoverflow.com/comment/41367012
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26346697
type: Comment
has text: Very elegant - compatibility with older browsers?

http://stackoverflow.com/a/26275381
answers question: http://stackoverflow.com/q/26274787
has body: Instead to get $focus property, why can't you use ng-focus directive and achieve your functionality. if you want $focus property for the element,use directive link function you will get ele. Testing focus() on an element in an AngularJS directive template > > Name: > focus > blur > > angular.module('App', []) .controller('Ctrl', ['$scope', > function($scope){ > $scope.showErrors = true; > > $scope.errors = function(action){ > if(action==="show"){ > $scope.showErrors = true; > }else{ > $scope.showErrors = false; > } > } }]);
score: 0
has comment: http://stackoverflow.com/comment/41224324
type: Answer
has comment: http://stackoverflow.com/comment/41223840
has comment: http://stackoverflow.com/comment/41224675

http://stackoverflow.com/q/26247981
accepted answer: http://stackoverflow.com/a/26248222
possible better answer: http://stackoverflow.com/a/26248266
has answer: http://stackoverflow.com/a/26248266
has comment: http://stackoverflow.com/comment/41174083
type: Question
answer count: 2
has title: What could cause scrollTop to malfunction?
has comment: http://stackoverflow.com/comment/41174266
tagged with: javascript
tagged with: jquery
has body: I'm have been dealing with a weird bug for the last few hours. Totally losing my mind on this one. Hopefully it is something simple that I am just overlooking. Hope someone can help. Part of the complexity of the page is I am using Twitter Bootstrap with a fixed header and i am trying to use anchor links on the page as well to link to some things in this rather long page. I actually had this working before I completed some mobile optimizations to the website today then all of a sudden my anchor links stopped working. What's happening is when i click the anchor links, the page slides up, but no matter what link i click it always stops on the same link. I checked and all of my href's are properly closed. I've tried renaming all of the anchors and the targets to something unique just in case there was some naming conflict, but it still does the same thing. Pretty much stops where the first anchor. Here is my HTML: option 1 option 2 option 3 option 4 And then my anchor looks like this: And then there is content and divs between each of the anchors. Here is the javascript i am using: jQuery('.subnav-module a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { // grab the anchor link name, the hash var href = jQuery.attr(this, 'href'); var target = jQuery(this.hash); target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); if (target.length) { jQuery('html,body').animate({ scrollTop: target.offset().top - 150 //offsets for fixed header }, 1000, function () { window.location.hash = href; }); return false; } } }); I attempted a console.log(scrollTop) after that line and it returned the same number when i clicked each anchor link. So, i think it is miscalculating the position on the page of these divs. But, what would cause this script to miscalculate that? Other things I've tried: Removed all of the media queries from the stylesheet - didnt help. …
score: 0
has answer: http://stackoverflow.com/a/26248222
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41174396
tagged with: css
has comment: http://stackoverflow.com/comment/41174046
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41174347
has comment: http://stackoverflow.com/comment/41174337
type: AnsweredQuestion

http://stackoverflow.com/a/26293392
downvote count: 0
answers question: http://stackoverflow.com/q/26273979
type: Answer
upvote count: 2
has body: Could you use something like this? angular.module('fooApp') .directive('onLastRepeat', function () { return function (scope, element, attrs) { if (scope.$middle) { setTimeout(function () { scope.$emit('onRepeatMiddle', element, attrs); }, 1); } if (scope.$last) { setTimeout(function () { scope.$emit('onRepeatLast', element, attrs); }, 1); } }; })
has comment: http://stackoverflow.com/comment/41258229
has comment: http://stackoverflow.com/comment/41257946
score: 2

http://stackoverflow.com/q/26333696
has body: Hi here is my angular js code. I am a complete novice in angular development. Firstname : Lastname : Full name :{{firstname +" "+lastname}} You can find the fiddle here If I don't add the ng-controller directive the whole thing works. But when I adds the directive the whole thing stops working and the controller function is not getting executed. Actually I am trying something similar to this
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41330836
has comment: http://stackoverflow.com/comment/41330977
linked to: http://stackoverflow.com/q/5431351
has title: AngularJS controller function not getting executed
type: Question
score: 0
has answer: http://stackoverflow.com/a/26333727
upvote count: 1
accepted answer: http://stackoverflow.com/a/26333727
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41331042

http://stackoverflow.com/comment/41122311
type: QuestionComment
has text: How are you saving it to your database?
score: 0
comment on: http://stackoverflow.com/q/26220352
type: Comment

http://stackoverflow.com/a/26311492
has comment: http://stackoverflow.com/comment/41290053
has body: Check out this fiddle: http://jsfiddle.net/t8htbo5u/3/ var numb = []; $('.new').on('click', function(){ var infoStuff = $('.to-add input').val(); $('.added').append('&lt;div class="test"&gt;'+ infoStuff + '&lt;/div&gt;'); numb.push(parseInt(infoStuff)); }); $('.button').on('click', function(){ $('.total').html(numb.reduce(function(prev, curr){ return prev + curr; }, 0)); }); I used Array.reduce and ran parseInt on your infoStuff before adding it to numb for the sake of the example, you can change that it you want to take decimals.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26311446
downvote count: 0
has comment: http://stackoverflow.com/comment/41290039
type: Answer

http://stackoverflow.com/q/26320432
type: UnansweredQuestion
has title: Need to Update Rails model by ajax call with HTML5 contenteditable but instead its creating new record
tagged with: ruby-on-rails
has body: I am trying to update some plots of a stroy with HTML5 contenteditable option. here is the code. View file# where multiple plots can be modified &lt;div id="editable" contenteditable="true"&gt; &lt;%= simple_format p.description %&gt; &lt;/div&gt; AJAX # $(function(){ var contents = $("#editable").html(); $('#editable').blur(function() { if (contents!=$(this).html()){ alert('Handler for .change() called.'); contents = $(this).html(); autoSavePost(); } }) }); function autoSavePost(){ var data = {id: parseInt($("#plot_id").text()), tale_id: parseInt($("#tale").text()) ,description: $("#editable").html(), user_id: parseInt($("#user").text())}; console.log(data); $.ajax({ type: "POST", url: "/plots", contentType: "application/json; charset=utf-8", dataType: "json", data: JSON.stringify(data), success: function(){ $("#success-indicate").fadeIn().delay(4000).fadeOut(); } }); // setTimeout(autoSavePost, 6000); } Routes file # resources :plots do member do post 'update' end end Controller file# def update respond_to do |format| if @plot.update(params[:description]) format.html { redirect_to plots_path, notice: 'Plot was successfully updated.' } format.json { render:@plot } format.js else format.html { render action: 'edit' } format.json { render json: @plot.errors, status: :unprocessable_entity } end end end I am asking experts help. will be grateful
has comment: http://stackoverflow.com/comment/41400555
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26371897
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/41149291
comment on: http://stackoverflow.com/a/26235085
has text: Thanks. But actually i want to execute the alert in beginanimate. I mention only the alert. But there may be so many task, function calling in begin animate after alert("Hellow ashik !");
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26234505
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26222221
has comment: http://stackoverflow.com/comment/41182440
has comment: http://stackoverflow.com/comment/41176513
answers question: http://stackoverflow.com/q/26222221
has comment: http://stackoverflow.com/comment/41197935
upvote count: 2
type: AcceptedAnswer
has body: You can create array of images' links and then append new &lt;img&gt;s with these links as src to container using for loop: Fiddle. var imageLinks = ["link1", "link2"]; var container = $("#nhs_BasicSearchBox"); for (var i = 0; i &lt; imageLinks.length; i++) { container.append($('&lt;img&gt;', { src: imageLinks[i] })); }
has comment: http://stackoverflow.com/comment/41190540
type: Answer
has comment: http://stackoverflow.com/comment/41197137

http://stackoverflow.com/comment/41146300
type: Comment
comment on: http://stackoverflow.com/a/26219780
type: AnswerComment
score: 0
has text: You'll have to post the relevant parts of your project to show what you're trying to do.

http://stackoverflow.com/a/26321982
answers question: http://stackoverflow.com/q/26321797
has comment: http://stackoverflow.com/comment/41309723
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: I believe what you want to do is change this line: displayOneOrder(countNumber, ticketName, quantity, charge, delta); ...to this: displayOneOrder(countNumber, ticketType, quantity, charge, delta); In other words, you passed ticketName for that second parameter when you meant to pass ticketType instead. UPDATE: Or, if you want it to show the full name of the ticket type (e.g., "Adult" instead of "A"), then either change that line to this: displayOneOrder(countNumber, findTicketName(ticketType), quantity, charge, delta); ...or precede it with a line to set the value of ticketName, like so: ticketName = findTicketName(ticketType);
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26321797

http://stackoverflow.com/comment/41238358
has text: Sorry, code is defined outside (should have mentioned). How do I access an object within the contdata array that is called exturl.
type: AnswerComment
comment on: http://stackoverflow.com/a/26283366
score: 0
type: Comment

http://stackoverflow.com/comment/41166428
comment on: http://stackoverflow.com/a/26243519
type: Comment
score: 0
type: AnswerComment
has text: or - _just move the whole definition outside_ !!

http://stackoverflow.com/q/26296402
has title: Execute mouseover() from JS without change position of mouse
tagged with: css
downvote count: 0
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26296431
favorite count: 0
answer count: 6
type: Question
has answer: http://stackoverflow.com/a/26299271
accepted answer: http://stackoverflow.com/a/26299271
has answer: http://stackoverflow.com/a/26296429
upvote count: 1
has answer: http://stackoverflow.com/a/26296708
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26296859
possible better answer: http://stackoverflow.com/a/26296554
has body: I have on div, after mouseover it change here content, how I can to execute mouseover without mouse, it is possible? my div before mouse over: Test my div after mouseover: Test
has answer: http://stackoverflow.com/a/26296554
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26226249
type: Answer
answers question: http://stackoverflow.com/q/26226197
has body: Something like this should get you started: var page = 0; $('.item').each(function(i){ if(i % 4 === 0){ var $li = $('&lt;li/&gt;').prop({ class: 'pagination' + (++page) }); } }); http://jsfiddle.net/c87tsvo8/
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26226197

http://stackoverflow.com/q/26236898
has answer: http://stackoverflow.com/a/26239455
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/63336449
upvote count: 4
has body: So, I've put together a very simple datepicker: HTML: Date: {{dt}}. JavaScript: angular.module('services', ['ui.bootstrap']); angular.module('services').controller('DatepickerCtrl', function ($scope) { $scope.toggleMin = function() { $scope.minDate = $scope.minDate ? null : new Date(); }; $scope.toggleMin(); }); The datepicker loads correctly but the ng-model is not updated and the paragraph at the end of the markup shows a blank value for "dt". I saw a few similar issues posted on GitHub (https://github.com/angular-ui/bootstrap/issues/808, https://github.com/angular-ui/bootstrap/issues/784) but none of the solutions there solved the issue. Any thoughts?
answer count: 3
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: Datepicker does not update ng-model
has answer: http://stackoverflow.com/a/26239290
type: UnansweredQuestion
tagged with: datepicker
tagged with: twitter-bootstrap

http://stackoverflow.com/a/26316861
has comment: http://stackoverflow.com/comment/41412888
has body: You could do it with plain js: var fontsize = "2em"; // Less text - big font if(this.options.data.gymName.properties.gymName.length &gt; 32) { fontsize = "1.4em"; // More text - smaller font size } then on your surface properties: properties: { ... fontSize: fontsize, ... }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26258950
downvote count: 0
answers question: http://stackoverflow.com/q/26258950
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/41079033
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26196027
has text: I don't see an error message. http://fmjgames.com/soldiergirl/ the 4 images show up, but it's supposed to be a slideshow
type: QuestionComment

http://stackoverflow.com/comment/41338081
has text: It's same as my result. After selecting the value, open the dropdown again. All options must be in lowercase
comment on: http://stackoverflow.com/a/26337588
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41201407
type: AnswerComment
score: 0
type: Comment
has text: This got me part of the way there - but I'm still not getting any app name after the /app/. Do you know why that would be?
comment on: http://stackoverflow.com/a/26263144

http://stackoverflow.com/a/40534190
answers question: http://stackoverflow.com/q/26211573
upvote count: 1
score: 1
has body: I had the same problem. What solved it for me is converting the number to a string. Example: $scope.selectedDevice = "" + newElem.value;
downvote count: 0
type: Answer

http://stackoverflow.com/q/26331228
tagged with: node.js
has answer: http://stackoverflow.com/a/26331262
accepted answer: http://stackoverflow.com/a/26331299
score: 0
answer count: 2
tagged with: mysql
has title: How can I parse PHP user details (session) to Node.js server?
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26331299
has body: so I have 2 pages: Chat page which runs on Node.js and Socket.io (WebSockets). And main page where user logins etc... I want to make it so when user logins on main page -> it validates details -> then stores user ID in session and goes into chat where he's identified by his userID. Oh yeah and user accounts are stored on MySQL.
type: Question
linked to: http://stackoverflow.com/q/23795926
tagged with: php
possible better answer: http://stackoverflow.com/a/26331262

http://stackoverflow.com/a/26272059
type: Answer
upvote count: 1
score: 1
has body: You can use closest to get the parent tr element, then you need to find the .topicId. Try this: &lt;script&gt; $(document).ready(function(){ $('.correctAttempt').click(function(){ var id = $(this).closest('tr').find(".topicId").val(); alert(id); $('#correctOutOfAttempt').modal('show'); }); }); &lt;/script&gt; The advantage of using closest instead of traversing rigidly by parent is that you can change your tr and td structure without having to amend the JS code, so long as the classnames remain the same. Example fiddle
answers question: http://stackoverflow.com/q/26271996
downvote count: 0

http://stackoverflow.com/comment/41273043
has text: Do you want to sort so the best matches appear first? Or do you want to show only the items that match the input? so if you type "dog", should only the dogs be visible, or should the dogs appear first on the list?
score: 0
comment on: http://stackoverflow.com/q/26302151
type: QuestionComment
type: Comment

testem
tags question: http://stackoverflow.com/q/26307450
tag name: testem
type: Tag

base64
tags question: http://stackoverflow.com/q/26236015
tags question: http://stackoverflow.com/q/26212792
tags question: http://stackoverflow.com/q/26332467
tags question: http://stackoverflow.com/q/26290079
tag name: base64
tags question: http://stackoverflow.com/q/26233271
tags question: http://stackoverflow.com/q/26322685
tags question: http://stackoverflow.com/q/26270909
tags question: http://stackoverflow.com/q/26334773
tags question: http://stackoverflow.com/q/26202630
type: Tag
tags question: http://stackoverflow.com/q/26264925

http://stackoverflow.com/q/26314272
has comment: http://stackoverflow.com/comment/41297249
has answer: http://stackoverflow.com/a/26314301
type: UnansweredQuestion
has title: AJAX on success call 2 functions
tagged with: codeigniter
downvote count: 1
type: Question
has body: Hi how can I call 2 functions when AJAX is success? My code is below and I am using Codeigniter. I have 3 select fields in the view and when the first select is changed, it will call the model by the controller and get the materials based on the car chosen. After that, it should also get the colors, which is the third field based on the material chosen. $(document).ready(function(){ $('#car').change(function(){ $("#material &gt; option").remove(); var car_id = $('#car').val(); $.ajax({ type: "POST", url: "http://localhost/wheel_configurator/user/get_material/"+car_id, success: function(materials) { $.each(materials,function(materialID,materialName) { var opt = $('&lt;option /&gt;'); opt.val(materialID); opt.text(materialName); $('#material').append(opt); }); } }); }); $('#material').change(function(){ $("#color &gt; option").remove(); var material_id = $('#material').val(); $.ajax({ type: "POST", url: "http://localhost/wheel_configurator/user/get_color/"+material_id, success: function(colors) { $.each(colors,function(colorID,colorName) { var opt = $('&lt;option /&gt;'); opt.val(colorID); opt.text(colorName); $('#color').append(opt); }); } }); }); });
has comment: http://stackoverflow.com/comment/41294609
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/26304681
has comment: http://stackoverflow.com/comment/41278652
type: Answer
has comment: http://stackoverflow.com/comment/41279331
has comment: http://stackoverflow.com/comment/41278870
has comment: http://stackoverflow.com/comment/41294593
has comment: http://stackoverflow.com/comment/41278907
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41278095
has body: you can use this code with jQuery: HTML : &lt;div id="silde"&gt; &lt;/div&gt; CSS: #silde{ height:191px; width:100%; background-image: url(http://laravel.com/assets/img/quotes.jpg); background-position: 0 0; } Js: $(document).ready(function(){ var posi = 0 ; setInterval(function(){ posi++; $("#silde").css("background-position",posi+'px 0'); }, 200); }); and you can use posi++ to move right, posi-- to move left. and you can see the sample here: http://jsfiddle.net/4bbykut3/1/
accepted answer of: http://stackoverflow.com/q/26304285
has comment: http://stackoverflow.com/comment/41279220
score: 0
answers question: http://stackoverflow.com/q/26304285

http://stackoverflow.com/a/26338297
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: If your variable is your_variable Then you can use document.getElementById('DivID').innerHTML = your_variable;
answers question: http://stackoverflow.com/q/26338162

http://stackoverflow.com/a/43487027
upvote count: 2
answers question: http://stackoverflow.com/q/26324574
downvote count: 0
has body: Socket Programming sockets provide the communication mechanism between two computers using TCP. A client program creates a socket on its end of the communication and attempts to connect that socket to a server. When the connection is made, the server creates a socket object on its end of the communication. The client and the server can now communicate by writing to and reading from the socket. The java.net.Socket class represents a socket, and the java.net.ServerSocket class provides a mechanism for the server program to listen for clients and establish connections with them. The following steps occur when establishing a TCP connection between two computers using sockets − The server instantiates a ServerSocket object, denoting which port number communication is to occur on. The server invokes the accept() method of the ServerSocket class. This method waits until a client connects to the server on the given port. After the server is waiting, a client instantiates a Socket object, specifying the server name and the port number to connect to. The constructor of the Socket class attempts to connect the client to the specified server and the port number. If communication is established, the client now has a Socket object capable of communicating with the server. On the server side, the accept() method returns a reference to a new socket on the server that is connected to the client's socket. After the connections are established, communication can occur using I/O streams. Each socket has both an OutputStream and an InputStream. The client's OutputStream is connected to the server's InputStream, and the client's InputStream is connected to the server's OutputStream. There are two types of soket: Server Socket - is created to bind() to a port and listen() for a connect() from a client. So a server just waits for a conversation and doesn't start one. Client Socket - is created to connect() to a listen() server. The client initiates the connection. server App import java.io…
type: Answer
score: 2

http://stackoverflow.com/q/26263650
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/66097155
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/66085664
has body: I'm trying to build a two column Masonry-based layout, with expanding boxes after click. My current code is here: http://jsfiddle.net/2auahsuz/ JavaScript that expands the blocks: expandBlocks: function() { $('.main-blocks').on('click', 'article.expand, article.collapse', function() { Functions.expandThis($(this)); }) }, expandThis: function(block) { var scrollTo = block, mode; $('.main-blocks').off('click'); $('article').not(block).each(function() { $(this).removeClass('collapse').addClass('expand').children('.desc').velocity('slideUp', {duration:100}); }); if(block.hasClass('expand')) { mode = 'slideDown'; block.removeClass('expand').addClass('collapse'); } else { mode = 'slideUp'; block.addClass('expand').removeClass('collapse'); }; block.children('.desc').not(':animated').velocity( mode, { duration: 200, progress: function() { $('.main-blocks').masonry(); }, complete: function() { Functions.masonryBlocks(scrollTo); Functions.expandBlocks(); } } ); } All works great, but what I want is to keep column order. I mean, when I click on a block on the left side, I want to animate only blocks below that one, not the ones on the right. Ho can I achieve that?
score: 1
type: Question
tagged with: jquery-masonry
has comment: http://stackoverflow.com/comment/66157220
has title: Masonry - expand after click, but keep columns
tagged with: javascript

http://stackoverflow.com/comment/41358238
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26346131
has text: I did Response.Write " " and I got my message previous
score: 0

http://stackoverflow.com/q/26324033
has title: Show one element if another is above a certain height
answer count: 3
upvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26324526
has answer: http://stackoverflow.com/a/26330146
favorite count: 0
accepted answer: http://stackoverflow.com/a/26330146
has answer: http://stackoverflow.com/a/26324655
has body: I have a following HTML: {{day-number}} more ... Event-container is filled with an unknown number of .event elements like the following: {{event-name}} I want to show or hide the .more element based on if the .event-container has a height of over 76px (equal to the height of four .event elements stacked). The styling for the above elements: .event { text-align: left; font-size: .85em; line-height: 1.3; border-radius: 3px; border: 1px solid #3a87ad; background-color: #3a87ad; font-weight: normal; color: whitesmoke; padding: 0 1px; overflow: hidden; margin-bottom: 2px; cursor: pointer; } .event-box { max-height: 76px; overflow: hidden; position:relative; } .event-box .more-events { height: 10px; position: absolute; right: 0; bottom: 10px; display: none; z-index: 5; } No styling for .event-container I can do what I want with Javascript (jQuery): $(".event-box").each(function(){ var $this = $(this); if($this.children(".event-container").height() > 76){ $this.children(".more-events").css("display", "block"); } else { $this.children(".more-events").css("display", ""); } }); And run that every time a make a change, but I'd rather do it with CSS. Is this possible? Maybe with pseudo elements or media queries or something? JSFIDDLE: http://jsfiddle.net/pitaj/LjLxuhx2/
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26324526
type: Question
tagged with: javascript

http://stackoverflow.com/comment/101944639
score: 0
type: AnswerComment
has text: jQuery is the way to go, simple short and let the framework to serialise the form.
type: Comment
comment on: http://stackoverflow.com/a/26250395

http://stackoverflow.com/comment/41670502
has text: @salivan Maybe it's because I was a little bit late... The bounty was limited in time. After the time ran out, as I suppose, the answer with the most upvotes received a half of the points. Bad luck... but they're just points anyway))) so never mind) I would be happy if my solution helped you. Could you please let me know whether it was useful or not?
type: AnswerComment
comment on: http://stackoverflow.com/a/26454511
score: 0
type: Comment

http://stackoverflow.com/a/26335754
answers question: http://stackoverflow.com/q/26335622
accepted answer of: http://stackoverflow.com/q/26335622
has comment: http://stackoverflow.com/comment/41335006
upvote count: 4
has comment: http://stackoverflow.com/comment/41334966
type: AcceptedAnswer
downvote count: 0
has body: The two jQuery objects point at the same DOM elements, but are different arrays (jQuery objects are essentially just arrays behind the scenes with extra stuff). Use jQuery is http://api.jquery.com/is/ to test if the same selector would match them: if(!$current.is('#planungtext')){ The fastest way to do that check "manually" is: if ($current[0].id !== '#planungtext'){ It is mentioned in comment that $current is a jQuery variable (good naming standard) but initially undefined in which case almost every solution posted will crash. You need to initialise $current to an empty jQuery object to give the most consistent behavior (jQuery objects should never be undefined to be used like that, else you need to re-wrap it. e.g. with $($current) which I do not recommend as a solution to an uninitialised jQuery variable): var $current = $(); // $() returns an empty jQuery object
type: Answer
score: 4

http://stackoverflow.com/a/26344448
score: 0
has comment: http://stackoverflow.com/comment/41354150
type: Answer
answers question: http://stackoverflow.com/q/26343958
has body: Already answered this today, you can find it here: https://stackoverflow.com/a/26337868/1641941 Those mdn articles don't look like Mozilla developer network articles I suggest using this one as it doesn't create an instance of Parent to set prototype part of inheritance and doesn't modify objects you don't own to achieve a simple task as inheritance: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create?redirectlocale=en-US&amp;redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fcreate

http://stackoverflow.com/a/26227022
downvote count: 0
type: Answer
upvote count: 2
has body: did you try removeCls and then addCls method defined for the button to change color when required? Try removeCls method to remove the existing CSS if any, and then set the background-color you want to in a different css class and add that CSS class to button using addCls method.
answers question: http://stackoverflow.com/q/26218609
score: 2

http://stackoverflow.com/comment/41135973
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26221602
has text: data.list[s].dt_txt parses JSON and it gets values in format, 2014-10-07 00:00:00

http://stackoverflow.com/a/26209669
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/26204696
answers question: http://stackoverflow.com/q/26204696
type: Answer
has body: I went overboard. Your other question was closed. Juuuuust gonna leave this here... I'm using PHP version PHP 5.2.0. http://php.net/manual/en/faq.passwords.php http://php.net/manual/en/function.password-hash.php http://php.net/manual/en/function.password-verify.php &lt;?php // so I don't actually have to test form submission, too... $_POST['current_password'] = 'Tacotaco'; $_POST['new_password'] = 'NINrocksOMG'; $_POST['confirmPassword'] = 'NINrocksOMG'; $_SESSION['id'] = 1; // this is Tacotaco encrypted... update your db to test // update users set password = '$2y$10$fc48JbA0dQ5dBB8MmXjVqumph1bRB/4zBzKIFOVic9/tqoN7Ui59e' where id=1 // the following is sooooo ugly... don't leave it this way if (!isset($_SESSION['id']) or empty($_SESSION['id']) or !isset($_POST['current_password']) or empty($_POST['current_password']) or !isset($_POST['new_password']) or empty($_POST['new_password']) or !isset($_POST['confirmPassword']) or empty($_POST['confirmPassword']) ) { $message = 'Please enter your password'; } else { $sid = $_SESSION['id']; $currpass = $_POST['current_password']; $newpass = $_POST['new_password']; $conpass = $_POST['confirmPassword']; $message = validate_password($sid, $currpass, $newpass, $conpass); } print "&lt;br/&gt;$message&lt;br/&gt;"; function validate_password($sid, $currpass, $newpass, $conpass) { $mysqli = mysqli_connect('localhost','root','','test') or die('Error ' . mysqli_error($link)); $stmt = $mysqli-&gt;prepare('select id, password from users where id = ?'); $stmt-&gt;bind_param("s", $sid); $stmt-&gt;execute(); $stmt-&gt;bind_result($userid, $userpass); $message = ''; if ($stmt-&gt;fetch()) { $stmt-&gt;close(); if (strlen($newpass) &lt; 8) { $message = 'Please enter a password with at least 8 characters'; } elseif (!preg_match('`[A-Z]`', $newpass)) { $message = 'Please enter at least 1 capital letter'; } elseif ($newpass !== $conpass) { $message = 'Your passwords do not match.'; } else { if (password_verify($currpass, $userpass)) { $hashed_new…

http://stackoverflow.com/comment/41356419
score: 0
type: AnswerComment
has text: this works great, except for one thing: it doesn't capture changes done to the text in a ` `. Please see this: [link](http://stackoverflow.com/questions/26342367/event-listener-for-td-content)
type: Comment
comment on: http://stackoverflow.com/a/26296966

http://stackoverflow.com/q/26217487
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
score: 0
has body: I have added two functions to my site master to show and hide my loading gif. But don't want to call it from ever ajax call or before post method. Is the no jQuery for me to check if the site is loading and then call the show method. I notice during a post the tab that my site is on has a loader, how do they check when to show it and can i call my loader on the same method? The big problem is my asp.net submit buttons sometimes take very long with complex functions and need a loader to be show.
has answer: http://stackoverflow.com/a/26218055
type: UnansweredQuestion
type: Question
has title: Display loading gif on every site loading and posting?

http://stackoverflow.com/comment/41320702
type: QuestionComment
has text: This question is tagged nodejs. Does it have to be node or is a browser-centric solution acceptable?
score: 0
comment on: http://stackoverflow.com/q/26328294
type: Comment

http://stackoverflow.com/q/26335451
type: Question
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26335744
has comment: http://stackoverflow.com/comment/41334436
has answer: http://stackoverflow.com/a/26335614
accepted answer: http://stackoverflow.com/a/26335614
has comment: http://stackoverflow.com/comment/41334196
favorite count: 0
has comment: http://stackoverflow.com/comment/41334119
has comment: http://stackoverflow.com/comment/41334151
has answer: http://stackoverflow.com/a/26335537
has answer: http://stackoverflow.com/a/29772927
has comment: http://stackoverflow.com/comment/41334527
tagged with: php
has body: Here's my Delete button: <a href="javascript:void(0);" onclick="delete(<?php echo $data->emp_id;?>);"> Delete Here's my Javascript code: Here's my controller (admin_logins.php) method - function employee4($emp_id) { $this->employee_model->delete_employee($emp_id); $this->index(); } And here's my model(employee_model.php) method - public function delete_employee($emp_id) { $this->db->where('employee.emp_id',$emp_id); return $this->db->delete('employee'); } My table name is employee and my database is MySQL. Column Name Datatype id int emp_id varchar(15) emp_name varchar(50) emp_mobile_no varchar(15) Whenever I click the Delete button, nothing happens. What am I doing wrong?
answer count: 4
has comment: http://stackoverflow.com/comment/41334515
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41334612
has comment: http://stackoverflow.com/comment/41334310
has comment: http://stackoverflow.com/comment/41334197
has answer: http://stackoverflow.com/a/26335744
score: 1
tagged with: codeigniter
tagged with: mysql
upvote count: 1
has title: Delete button not working in CodeIgniter

http://stackoverflow.com/q/26352316
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26352494
downvote count: 0
has answer: http://stackoverflow.com/a/26352343
has body: Why HTML can't render line breaks if the text of was set via javascript? see sample here: WHY? Below are the codes: IT WORKS wire. pin.. $(document).ready(function() { $("#par").text('I\n CANT INSERT LINE BREAKS!'+' '+'FFFF;br/KKK'); });
has answer: http://stackoverflow.com/a/26352333
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26352330
type: Question
has answer: http://stackoverflow.com/a/26352334
upvote count: 1
possible better answer: http://stackoverflow.com/a/26352333
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26352330
favorite count: 0
answer count: 5
has title: can't render while setting text in

http://stackoverflow.com/comment/49507872
comment on: http://stackoverflow.com/q/26272560
score: 0
has text: did u get any solution for this?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26266208
has body: $.getJSON does not return the data from the call, it returns a promise. Perhaps something like this would work better: $.getJSON( "status.php").then(function(statusData){ ... model: function(params) { return Em.RSVP.hash({ uposts: tweets, ustat: [statusData] }); } ... });
score: 0
answers question: http://stackoverflow.com/q/26266138
type: Answer

http://stackoverflow.com/comment/41314673
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26324944
has text: Thinking about it: It's not just the function, it's the contexts the function closes over, and anything referenced by those contexts, so although the string might not be much smaller than the function, I bet it's a lot smaller than everything the function would keep in RAM. Good call.
score: 1

http://stackoverflow.com/a/26223849
score: 2
has comment: http://stackoverflow.com/comment/41153147
answers question: http://stackoverflow.com/q/26223490
downvote count: 0
type: Answer
has body: You could keep it simple by adding a separate input element outside of your ng-repeat. Plunker: http://plnkr.co/edit/YDkzgtOSNpqDehnPkpZe?p=preview Add another div element below your ng-repeat as below: Add New
upvote count: 2
has comment: http://stackoverflow.com/comment/41149073

http://stackoverflow.com/comment/41301397
type: Comment
comment on: http://stackoverflow.com/a/26317702
score: 0
type: AnswerComment
has text: If you're aware of, for example, a jQuery plugin that will allow me to, for example, blur an image, WITHOUT using CSS3's 'filter' property, THAT would be helpful. I've found countless unsupported CSS properties - it's just that I've been completely unable to locate ANY jQuery equivalents.

http://stackoverflow.com/q/26225478
has answer: http://stackoverflow.com/a/26258609
accepted answer: http://stackoverflow.com/a/26258609
has title: Without the file or function name, how do I find a function that is making changes on an element?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/446892
has body: I have a large project. With dozens of JS files. An element on my page has a click event attached to it. I want to edit this click event, but first I need to locate its' file &amp; line. How can I do that, without knowing the function name or file name before hand? Is there a way to watch the element in firebug and record the function being executed? Backstory: The element has an .open class being added when it is clicked, and removed when the user clicks on anything else. I want to have that .open class added on mouseover, and removed on mouseout. I want to use the same function being called in the click event, but first I need to find it. Thanks.
type: Question
tagged with: debugging
has answer: http://stackoverflow.com/a/35586233
answer count: 2
tagged with: firebug
has comment: http://stackoverflow.com/comment/41132192
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41132558
score: 0
possible better answer: http://stackoverflow.com/a/35586233

http://stackoverflow.com/a/26304722
upvote count: 2
type: Answer
has body: Assuming you intended the value of the 123 key in the output to be a hash rather than an array, then without either underscore or lodash: Object.keys(obj).reduce( // Reduce the keys in the input function(result, animals) { // by taking each key like DOGS animals.forEach( // and for each of its function(animal) { // elements (animal) result[animal.id] = result[animal.id] || {}; // create an ID field in result result[animal.id][animals] = animal.list; // add animal's list of results }); return result; // and pass result to next key }, {} ); For IE8, use relevant polyfills. Or do the obvious rewrite using underscore/lodash equivalents.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41277839
has comment: http://stackoverflow.com/comment/41277880
answers question: http://stackoverflow.com/q/26303605

http://stackoverflow.com/a/26222887
has comment: http://stackoverflow.com/comment/41150114
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41165477
answers question: http://stackoverflow.com/q/26222601
accepted answer of: http://stackoverflow.com/q/26222601
has body: In a typical web request/response paradigm, each request to a page is independent from the others. This mean that if you make a request for a first page and then a second one, the two processed request will not share any information or status. This is why we call this kind of client/server communication "stateless". Of course we can buidl a "stateful" system on top of this kind of communication, with session data or a database, but this is beyond the point. In a similar way, in the structure you propose, you'll have a first request to load the container page, and a second one or more to load the content to inject in the first one. Those will be separated calls, isolated from each other, unable to share any variable or required script. But that's not a problem. Nor it is a big overhead. There is another reason you don't want to repeat code: keeping thing DRY (Don't Repeat Yourself). This is because you don't want to mantain similar but duplicated code, where each update would need to be repeated in different parts of your program. In your tipical situation, you will end up with a script which will make all the common work needed in your pages. Both the container page and the content pages will require this common script. So, you write the needed code only once, but it will be executed for every request.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41126577
type: Comment
type: QuestionComment
has text: This question is impossible to answer without knowing what your data looks like...
comment on: http://stackoverflow.com/q/26221696
score: 0

http://stackoverflow.com/q/26205376
has title: Javascript recursion from Eloquent Javascript
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26205522
linked to: http://stackoverflow.com/q/720158
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/51812614
linked to: http://stackoverflow.com/q/29994249
favorite count: 0
has answer: http://stackoverflow.com/a/26205522
linked to: http://stackoverflow.com/q/15712230
type: AnsweredQuestion
tagged with: recursion
tagged with: conditional-statements
score: 1
has comment: http://stackoverflow.com/comment/44735566
upvote count: 1
type: Question
has body: So this is from the Eloquent Javascript. I am trying to figure out how this code is actually stepped through. So we are trying to find a way to reach the target number by adding either 5 or multiplying by 3, and we start from the number 1. So, essentially, we are trying to find a sequence of such additions and multiplications that produce the target number? For example, the number 13 could be reached by first multiplying by 3 and then adding 5 twice, whereas the number 15 cannot be reached at all. Here is the code snippet: function findSolution(target) { function find(start, history) { if (start == target) return history; else if (start &gt; target) return null; else return find(start + 5, "(" + history + " + 5)") || find(start * 3, "(" + history + " * 3)"); } return find(1, "1"); } The result: console.log(findSolution(24));// → (((1 * 3) + 5) * 3) Apparently this is what happens when we call findSolution(13): To better understand how this function produces the effect we’re looking for, let’s look at all the calls to find that are made when searching for a solution for the number 13. find(1, "1") find(6, "(1 + 5)") find(11, "((1 + 5) + 5)") find(16, "(((1 + 5) + 5) + 5)") too big find(33, "(((1 + 5) + 5) * 3)") too big find(18, "((1 + 5) * 3)") too big find(3, "(1 * 3)") find(8, "((1 * 3) + 5)") find(13, "(((1 * 3) + 5) + 5)") found! Question: 1) I am confused what happens when we call findSolution(13). How is it that the first line is find (1, "1") when I haven't supplied it either the start or history number? How does the code just step down to line: return find(1,"1") How does the code get there? 2) Is this how OR statements operate in recursion? In a recursive check, does Javascript typically explore the first branch of the OR statement before tackling the second branch? Is this line: find(3, "(1 * 3)") only checked after the all of the branches of: find(6, "(1 + 5)") fail to return a solution?

http://stackoverflow.com/comment/41298816
type: Comment
comment on: http://stackoverflow.com/a/26313134
type: AnswerComment
has text: Ok, glad I could be of assistance ;)
score: 0

http://stackoverflow.com/comment/41346892
type: Comment
type: QuestionComment
has text: That’s what `.append` _does_ – if you don’t want that, use a method that _replaces_ the current element content instead.
score: 0
comment on: http://stackoverflow.com/q/26342314

http://stackoverflow.com/q/26321914
tagged with: php
linked to: http://stackoverflow.com/q/25793124
type: AnsweredQuestion
has title: passing special characters to javascript function
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/168214
answer count: 2
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41309058
has body: I have the following code: opener.postConditionPostCure("&lt;?php echo the_field('cure_description'); ?&gt;") In some cases the_field() returns ' " ) characters. I believe these characters are throwing errors. I have tried using the js fn escape() function as well as the php fn rawurlencode() as: opener.postConditionPostCure(escape("&lt;?php echo the_field('cure_description'); ?&gt;")) opener.postConditionPostCure("&lt;?php echo rawurlencode(the_field('cure_description')); ?&gt;") to no avail. I would like the entire string returned by the_field() to be passed to the postConditionPostCure function. All advice is appreciated. Thanks in advance.
has comment: http://stackoverflow.com/comment/41309262
has answer: http://stackoverflow.com/a/26322111
has comment: http://stackoverflow.com/comment/41309488
accepted answer: http://stackoverflow.com/a/26322111
favorite count: 0
possible better answer: http://stackoverflow.com/a/26322014
has answer: http://stackoverflow.com/a/26322014

http://stackoverflow.com/comment/41081982
has text: Do you mind elaborating on this and what you mean by assignments and declarations?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26198721

http://stackoverflow.com/a/26316640
has comment: http://stackoverflow.com/comment/41525294
score: 0
has comment: http://stackoverflow.com/comment/41657010
accepted answer of: http://stackoverflow.com/q/26314645
has comment: http://stackoverflow.com/comment/41526388
type: AcceptedAnswer
has body: // this interval will repeat itself every 50 milliseconds var handler = setInterval(function() { // get the element that holds the number var numberContainer = document.getElementById("number"); // get the number. it starts with 0 var number = parseInt(numberContainer.innerText, 10); // increase it by 1, or 2 (number += 2;) number++; // update the number in the element numberContainer.innerText = number; // set a limit. if the number is greater than/equal to 50 // stop the interval if (number >= 50) { clearInterval(handler); } }, 50); 0
has comment: http://stackoverflow.com/comment/41665266
type: Answer
answers question: http://stackoverflow.com/q/26314645

http://stackoverflow.com/q/26238239
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43405030
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: Please note this is an HTML issue on mobile web browsers. This is not a nativa app or phonegap app. Issue Details: Everytime i touch/click the input textfield android keyboard will toggled and messed up the HTML layout. Once the keyboard toggled, HTML overflow element and body element will moved and scaled and the input box always been covered. I've tried disable all the overflow container and height and it works fine. The browser pushed the content up and the input text field does not covered by the keyboard. Tested on iPad Air and mini, iphone4 it works fine on ios 7 and 8.0.2. Issue founded on: Device: Samsung Galaxy Note 3 Operating System: Android Kitkat 4.4.2 Browser: Google Chrome, Firefox My research conclusion I've done some research and most of the solution that i've found was to do with android manifest xml. and it seems that's a native app solution which i wasn't sure if it works and how it works for web. Please advice. example ref Target Result: I need to keep the current layout to have the containers overflow hidden and inner content to be able to scroll plus everytime input field was clicked, it prevent zoom and always on top of the keyboard instead of being covered (at both content and navigation). The result needs to be work on mobile web browsers. Code at JSBin HTML JS Bin MENU SCROLL HERE nav link 1 nav link 2 nav link 3 nav link 4 nav link 5 nav link 6 nav link 7 nav link 8 nav link 9 nav link 10 nav link 11 nav link 12 nav link 13 nav link 14 nav link 15 nav link 16 nav link 17 nav link 18 nav link 19 nav link 20 nav link 21 nav link 22 nav link 23 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod, consectetur culpa excepturi adipisci itaque ut, laudantium obcaecati dolorem voluptatibus optio provident quos vel eligendi. Ut eaque inventore nesciunt alias ullam! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod, consectetur culpa excepturi adipisci itaque ut, laudantium obcaecati dolorem voluptatibus optio provident quos…
linked to: http://stackoverflow.com/q/4207880
tagged with: android
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: HTML overflow scrolling content messed by android keyboard when toggle
has comment: http://stackoverflow.com/comment/43405792
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/43404892

w2ui
tags question: http://stackoverflow.com/q/26338907
tag name: w2ui
type: Tag

http://stackoverflow.com/q/26242672
tagged with: cocos2d-x
favorite count: 0
answer count: 1
has body: I am trying to save a high score integer to the user's Android system, so that it can persist throughout all game-play experience. I have read that using Cocos2D-X one can use NSUserDefaults but this doesn't seem to be available in the Cocos2D-JS API at all. Anyone has any experience with this, is there any other efficient way how to tackle this issue?
score: 4
has answer: http://stackoverflow.com/a/26247665
tagged with: cocos2d-js
upvote count: 4
downvote count: 0
tagged with: javascript
has title: How to save a variable to Android using Cocos2D-JS?
accepted answer: http://stackoverflow.com/a/26247665
type: Question
type: AnsweredQuestion
tagged with: android

http://stackoverflow.com/comment/41097375
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26206270
score: 0
has text: Check this https://wordpress.org/support/topic/howto-integrate-the-media-library-into-a-plugin

http://stackoverflow.com/a/26322921
has comment: http://stackoverflow.com/comment/41310559
has comment: http://stackoverflow.com/comment/41310665
answers question: http://stackoverflow.com/q/26322867
type: Answer
score: 26
has body: You don't need some big monster single regular expression, which would probably involve arcana such as lookaheads, and be hard to maintain as new conditions were added. All you need is function validatePassword(pw) { return /[A-Z]/ .test(pw) &amp;&amp; /[a-z]/ .test(pw) &amp;&amp; /[0-9]/ .test(pw) &amp;&amp; /[^A-Za-z0-9]/.test(pw) &amp;&amp; pw.length &gt; 4; }
upvote count: 26
has comment: http://stackoverflow.com/comment/41310614
downvote count: 0

http://stackoverflow.com/comment/41341677
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26331896
has text: In TypeScript: `declare $;` or use a definition file for jQuery: https://github.com/borisyankov/DefinitelyTyped/blob/master/jquery/jquery.d.ts
type: Comment

http://stackoverflow.com/comment/41255144
type: QuestionComment
comment on: http://stackoverflow.com/q/26292292
has text: <?php echo CHtml::button('Admit',array('submit' => array('/student/admissionStudentDetails/admit_Confirm', 'id'=>$model->admission_id),'class'=>'submit','confirm'=>'Are you sure admit this student?')); ?>
score: 0
type: Comment

http://stackoverflow.com/q/26329175
downvote count: 0
has body: I was searching for an easy and simple database for a little highscore system for a some games I'm developing in javascript. I saw Orchestrate.io in github's student developer pack. I found a suitable drivermodule nodejs orchestrate and have integrated them. The problem comes with querying orchestrate for my data. I have managed saving scores and querying them with db.list('collection'), but this seems to not responding with all data. It appered to me that some values are not returned. I read about the db.search('collection','query') function. But I don't really understand how I could return all data because I don't want to query in a specific way. My objects are as simple as follows: {"name":"Jack","score":1337} As I understand, one has to send a key, when putting such values to an orchestrate-collection. But I'd like to query the whole collection and get the values in a descendant order in regard to the score. As for now I end up sorting the result on the client-side. I hope you guys can give me some hints for a query that can sort for specific values!
tagged with: express
favorite count: 0
possible better answer: http://stackoverflow.com/a/27071095
tagged with: node.js
score: 2
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26502270
accepted answer: http://stackoverflow.com/a/26502270
tagged with: javascript
has title: How to query orchestrate.io
upvote count: 2
has answer: http://stackoverflow.com/a/27071095
answer count: 2

http://stackoverflow.com/comment/41320758
has text: Is that not already using the minimal amount of memory? I'd rather design it properly sooner than later.
comment on: http://stackoverflow.com/a/26322754
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41336978
comment on: http://stackoverflow.com/q/26336695
score: 0
type: Comment
type: QuestionComment
has text: @AvinashRaj: I have state my assumption that the regex only works for "valid input", though I do make an assumption that `{{}}` never appear outside `{}`.

http://stackoverflow.com/comment/41139278
score: 2
has text: Think of it like this: The square brackets are for representing arrays, the curly braces are for representing key-value maps.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26229145

http://stackoverflow.com/comment/41170848
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26245974
score: 0
has text: Directly under the form

http://stackoverflow.com/a/26271995
has body: Loop through the elements $('.popupDiv[data-layer]').each(function(){ }); to loop through each group seperately, you can use below logic //create an array to store processed data-layer type var dataArray = new Array(); $('.popupDiv').each(function(){ var dataLayer = $(this).data('layer'); //check if data-layer already processed if(!dataArray.indexOf(dataLayer)) { //update data array dataArray.push(dataLayer); $('.popupDiv[data-layer="'+ dataLayer +'"]').each(function(){ //do your stuff here }); } });
accepted answer of: http://stackoverflow.com/q/26271933
type: Answer
answers question: http://stackoverflow.com/q/26271933
upvote count: 29
has comment: http://stackoverflow.com/comment/41220890
score: 29
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41217930

http://stackoverflow.com/q/26346032
upvote count: 2
has comment: http://stackoverflow.com/comment/41354567
has title: D3 enable mouseover AFTER transition
has body: How can I add a d3-tip / mouseover event AFTER a transition on a histogram / bar chart? I create a bar chart / plot: canvas.call(tip); var sampleBars = canvas.selectAll(".sampleBar") .data(data) .enter().insert("rect", ".axis") .attr("class", "sampleBar") .attr("x", function(d) { return x(d.x) + 1; }) .attr("y", function(d) { return y(d.y); }) .attr("width", x(data[0].dx + data[0].x) - x(data[0].x) - 1) .attr("height", 0) .transition() .duration(2500) .delay(500) .attr("height", function(d) { return height - y(d.y); }); I want to add: sampleBars .on('mouseover', tip.show) .on('mouseout', tip.hide); And this is the tip: var tip = d3.tip() .attr('class', 'd3-tip') .offset([-10, 0]) .html(function(d) { return "&lt;span style='color:white'&gt;" + d3.round((d.y * 100)) + "%" + "&lt;/span&gt;" + " infected"; }) So that the mouseover event occurs after the transition is complete. But I get the error: Uncaught TypeError: undefined is not a function The error is for the line: .on('mouseover', tip.show) I think there is a simple flaw in my logic. I seem to be confused about how these events or attributes interact with each other. Again: I want to 'activate' the mouseover tip AFTER the transition is complete so that after the transition does its thing the tip will appear if the user puts their mouse over each bar. I have no problem creating the mouseover event and having it work on user mouseover to display the data I want, but I am having no luck with making this work with a transition of those bars.
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26346744
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26346744
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/a/26236948
answers question: http://stackoverflow.com/q/26236182
score: 1
has comment: http://stackoverflow.com/comment/41152996
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41154675
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41153811
has comment: http://stackoverflow.com/comment/41154426
has body: I think the problem is that you're immediately responding to the request before your db.getUser() completes. IIRC the Express session middleware saves session changes when the response is sent, so try something like this instead: exports.authorize = function(req, res) { if (!req.body) return res.render('login', { title: 'Express!' }); var login = req.body.login; var password = req.body.password; db.getUser(login, password, function(err, results) { if (err) return res.send("User not found", 500); req.session.userId = results[0].id; res.render('login', { title: 'Express!' }); }); }
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26236182
has comment: http://stackoverflow.com/comment/41156038

http://stackoverflow.com/a/26274247
downvote count: 0
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41221646
has comment: http://stackoverflow.com/comment/41221611
answers question: http://stackoverflow.com/q/26272608
accepted answer of: http://stackoverflow.com/q/26272608
has body: An often-used tool for that is curl. For instance, to make a GET request: $ curl 'http://your.url/getaction?from=FOO&amp;to=BAR' To make a POST request: $ curl -XPOST http://your.url/postaction -d 'from=FOO&amp;to=BAR' An alternative, one that I prefer myself, is httpie.
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/76159159
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26198407
has text: Thank you so much. This means this API https://developers.google.com/maps/documentation/directions/ does not support client side scripting because of incompatibilities with XSS (like server side "Access-Control-Allow-Origin *" response headers or JSONP functionality). We need to use the JavaScript API therefore (https://developers.google.com/maps/documentation/javascript/directions). Strange: The Geocoding API https://developers.google.com/maps/documentation/geocoding/ supports client side scripting beceause that server responds with a "Access-Control-Allow-Origin *" header.

http://stackoverflow.com/q/26276767
favorite count: 0
tagged with: extract
has title: Extract array of objects based on their content
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41226063
has comment: http://stackoverflow.com/comment/41226107
has comment: http://stackoverflow.com/comment/41225963
downvote count: 0
has answer: http://stackoverflow.com/a/26276821
score: 1
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/41226005
has answer: http://stackoverflow.com/a/26276823
answer count: 2
has body: In JavaScript I have a JSON array like this: var r = [{"name":"a","bool":false},{"name":"b","bool":false}, {"name":"c","bool":false},{"name":"a","bool":false}, {"name":"b","bool":false},{"name":"c","bool":true}, {"name":"a","bool":true}]; I want to build another array containing all the objects where name=="a" and bool==false. I solved this by looping, but I wanted to know if there is another way to do it. How can I do? [edit] My loop was: var rLen = r.length; var newArray = []; for(var i=0;i&lt;rLen;i++) { if(r[i].name=="a"&amp;&amp;r[i].bool==false) { newArray.push(r[i]); } }
upvote count: 1

http://stackoverflow.com/comment/41122981
type: Comment
has text: Edited... Take a look
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26220572

http://stackoverflow.com/q/26262926
answer count: 1
tagged with: joomla
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/26269543
accepted answer: http://stackoverflow.com/a/26269543
tagged with: backend
has body: I'm developing a simple module fo Joomla 2.5. Everything is almost done, but I have a series of form fields in the module params backend, which I would like to hide when a specific checkbox is clicked on... I have the function made, it's just a loop with a document.getElementblablablabla.style.display = 'none', but how can I load the JS and attach the function to the checkbox?
tagged with: parameters
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: javascript
has title: HOW do I load a Javascript call in a Joomla module BACKEND?

http://stackoverflow.com/comment/41198430
score: 0
type: QuestionComment
type: Comment
has text: That's what I mean by saying "different layout" ;) Anyway, be aware that useHTML options doesn't work for exporting..
comment on: http://stackoverflow.com/q/26209652

http://stackoverflow.com/comment/41322157
type: AnswerComment
comment on: http://stackoverflow.com/a/26282030
type: Comment
score: 1
has text: Yes, for the "global" event system, I meant adding an "event bus" to window, and, as the article explains in the end, subscribe to this instead. If you really need global, just use global, nobody's watching ;)

http://stackoverflow.com/a/27813197
answers question: http://stackoverflow.com/q/26231442
upvote count: 2
type: Answer
has body: I published a package for writing REST APIs in Meteor 0.9.0+ that supports authentication. It is meant to replace RestStop2 now that it is deprecated, and has a similar API: https://github.com/kahmali/meteor-restivus It was inspired by RestStop2 and built with Iron Router's server-side routing. UPDATE: I just wanted to include a code example for anyone that finds this. This is the Restivus Quick Start example from the GitHub README (check out the README if you'd prefer the sample code in JavaScript): Items = new Mongo.Collection 'items' if Meteor.isServer # API must be configured and built after startup! Meteor.startup -&gt; # Global API configuration Restivus.configure useAuth: true prettyJson: true # Generates: GET, POST, DELETE on /api/items and GET, PUT, DELETE on # /api/items/:id for Items collection Restivus.addCollection Items # Generates: GET, POST on /api/users and GET, DELETE /api/users/:id for # Meteor.users collection Restivus.addCollection Meteor.users, excludedEndpoints: ['deleteAll', 'put'] routeOptions: authRequired: true endpoints: post: authRequired: false delete: roleRequired: 'admin' # Maps to: /api/posts/:id Restivus.addRoute 'posts/:id', authRequired: true, get: -&gt; post = Posts.findOne @urlParams.id if post status: 'success', data: post else statusCode: 404 body: status: 'fail', message: 'Post not found' post: roleRequired: ['author', 'admin'] action: -&gt; post = Posts.findOne @urlParams.id if post status: "success", data: post else statusCode: 400 body: status: "fail", message: "Unable to add post" delete: roleRequired: 'admin' action: -&gt; if Posts.remove @urlParams.id status: "success", data: message: "Item removed" else statusCode: 404 body: status: "fail", message: "Item not found"
score: 2
downvote count: 0

http://stackoverflow.com/comment/41298388
comment on: http://stackoverflow.com/q/26316167
type: QuestionComment
has text: Added getTemplate. Selector points to the right place, but none of the elements in the new template can be selected.
type: Comment
score: 0

http://stackoverflow.com/q/26234245
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26235644
tagged with: javascript
tagged with: jquery
has body: I have a problem with datatables. I can't enable bFilter in input outside table container. There is a code which I initialize my datatable. var table = $('#table-perms-users').DataTable( { "scrollY": tableHeight + "px", "scrollX": "100%", "scrollXInner": "100%", "bScrollCollapse": true, "bSort" : true, "bInfo": false, "bFilter": false, "bPaginate": false, "columns": [ { "orderDataType": "dom-last-name"}, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" }, { "orderDataType": "dom-checkbox" } ] } ); I try to enable filter with function fnFilter() on keyup event on input. It looks like that: $('#dTSearch').keyup(function(){ table.fnFilter($(this).val()); }); But I can see an error message on console: Uncaught TypeError: undefined is not a function (index):10086(anonymous function) (index):10086jQuery.event.dispatch jquery.1.11.1.js?t=1402046180:4641elemData.handle Maybe someone can answer me what I doing wrong? Looks like it didn't see var table or didn't find function fnFilter. Maybe I have some mistakes in define my datatable?
tagged with: datatable
type: UnansweredQuestion
has title: datatables filter in different input
has answer: http://stackoverflow.com/a/26234577
score: 0

http://stackoverflow.com/q/26345522
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41352471
tagged with: javascript
has comment: http://stackoverflow.com/comment/41352530
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26346189
has title: Get the size of an AJAX response before it finishes loading
tagged with: ajax
type: Question
tagged with: content-length
has comment: http://stackoverflow.com/comment/41352556
has body: I'm using jQuery to load data via AJAX from a server, it's a fairly normal use case. The trick is that I'd like to get the expected content length from the request before it is completed; I want to be able to show a progress bar as the data is loaded. Is there any way at all to do this? I have to imagine there is. Thanks! Update: The server has to do quite a bit of work to generate the response, so I'd prefer not to hit it with two requests, it would defeat the purpose.
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26346189
has comment: http://stackoverflow.com/comment/41352820

http://stackoverflow.com/comment/42889207
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26303324
type: AnswerComment
has text: @Tasos the code solves using the same panel for all pages. Use `.ui-screen-hidden` better than show and hide ;)

http://stackoverflow.com/a/26224313
has body: You shouldn't have to call initialize more than once. You should implement a different logic, for example get the newest marker that is not in the map and add it via var marker = new google.maps.Marker({ position: locations[i].latlng, map:map, title:locations[i].hora }); markers.push(marker); bounds.extend(locations[i].latlng); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent( 'Data: ' + locations[i].Data + ' Hora: ' + locations[i].hora + ' Velocidade aproximada: ' + locations[i].velocidade + ' K/H Raio aproximado de: ' + locations[i].raio + ' metros Provedor: ' + locations[i].provedor + ' Latitude: ' + locations[i].latlng ); infowindow.open(map, marker); } })(marker, i)); UPDATE: I will add take the following approach. I don't like mixing PHP and Javascript together, I prefer using JSON and AJAX request. Update your functions to look like this: var map; var markers = []; setInterval(refreshMapa, 3000); function initialize() { var mapOptions = { zoom: 12, center: new google.maps.LatLng(-25.4848801,-49.2918938), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var locations = []; $.get("getmarkers.php", function(response){ for(var i = 0; i < response.markers.length; i++) { var marker = response.markers[i]; var myMarker = { Data: marker.Data, latlng: new google.maps.LatLng(marker.lat, marker.lon), hora: marker.hora, raio: marker.raio, provedor: marker.provedor, velocidade: marker.velocidade }; locations.push(myMarker); addMapMarker(myMarker); } },'json'); markerClusterer = new MarkerClusterer(map, markers, { maxZoom: 16, gridSize: 60 }); map.fitBounds(bounds); } function refreshMapa() { // make sure this one only returns markers that are new and not in the map $.get("getnewmarkers.php", function(){ for(var i = 0; i < response.markers.length; i++) { var marker = response.markers[i]; var myMarker = { Data: marker.Data, latlng: new googl…
has comment: http://stackoverflow.com/comment/41131862
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41132039
has comment: http://stackoverflow.com/comment/41160114
has comment: http://stackoverflow.com/comment/41131699
has comment: http://stackoverflow.com/comment/41131759
has comment: http://stackoverflow.com/comment/41132508
has comment: http://stackoverflow.com/comment/41132374
downvote count: 0
has comment: http://stackoverflow.com/comment/41131460
has comment: http://stackoverflow.com/comment/41133136
has comment: http://stackoverflow.com/comment/41131928
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26224129
has comment: http://stackoverflow.com/comment/41131752
has comment: http://stackoverflow.com/comment/41173328
has comment: http://stackoverflow.com/comment/41132339
has comment: http://stackoverflow.com/comment/41135010
score: 1
accepted answer of: http://stackoverflow.com/q/26224129

http://stackoverflow.com/q/26245941
has comment: http://stackoverflow.com/comment/41170727
has answer: http://stackoverflow.com/a/26246028
has comment: http://stackoverflow.com/comment/41170626
type: Question
score: -2
has comment: http://stackoverflow.com/comment/41170504
has body: I have tried the best resources, but can't understand a single thing. "this" is just so confusing, how does it connect with other variables outside. I have tried this source, everybody understands by that source but not me. Can anyone explain with superb examples. I am totally a begineer in Javascript. This is the best source as they say.. How does "this" keyword work within a function? Please help me understand "this". Really tired of searching all over the internet and books.
linked to: http://stackoverflow.com/q/133973
has comment: http://stackoverflow.com/comment/41170434
has comment: http://stackoverflow.com/comment/41170414
has comment: http://stackoverflow.com/comment/41170670
upvote count: 0
accepted answer: http://stackoverflow.com/a/26246028
tagged with: this
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41170447
has comment: http://stackoverflow.com/comment/41170565
has comment: http://stackoverflow.com/comment/41170515
favorite count: 0
has comment: http://stackoverflow.com/comment/41170945
has comment: http://stackoverflow.com/comment/41170432
has comment: http://stackoverflow.com/comment/41170386
has comment: http://stackoverflow.com/comment/41170383
has comment: http://stackoverflow.com/comment/41170454
has comment: http://stackoverflow.com/comment/41170668
has title: Can someone please make me understand what is "this" keyword and its uses in JavaScript?
has comment: http://stackoverflow.com/comment/41170600
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41170411
has comment: http://stackoverflow.com/comment/41170556
downvote count: 2
has comment: http://stackoverflow.com/comment/41170782

http://stackoverflow.com/q/26343289
favorite count: 0
has title: PHP Not Recognizing Array in HTML Form "name" Attribute
has comment: http://stackoverflow.com/comment/41348453
has comment: http://stackoverflow.com/comment/41348780
has comment: http://stackoverflow.com/comment/41348919
has comment: http://stackoverflow.com/comment/41348625
has body: I have a list of and fields where users enter the name of an item and the quantity. The PHP function generateMaterialsTable(); is responsible for generating one text field and one number field if there are no existing records in the database. If there are multiples, the function shows all items and their corresponding quantities. Here is the PHP code: function generateMaterialsTable($month_id, $table, $item, $addOrEdit){ global $mysqli; $item_singular = substr($item, 0, strlen($item)-1); $item_singular_title = $item_singular.'_title'; if($addOrEdit == 'Edit'){ $materials_query = "SELECT * FROM archivestats.".$table."_".$item." WHERE month_id = '$month_id'"; $materials_result = $mysqli->query($materials_query); if($materials_result->num_rows > 0){ $counter = 1; while($materials_match = $materials_result->fetch_assoc()){ $output .= ' '; $counter++; } } else { $output .= ' '; } } return $output; } The user also has the option to add a new text and quantity field. This is done via the following JQuery: //WHEN USER CLICKS '+Add Another Field' $('.new-field').click(function(){ var newFieldId = $(this).attr('id'); //find id of the '+Add Another Field' paragraph var newField = newFieldId.substr(0, newFieldId.lastIndexOf('-')); //find the name of the field before the last - (eg. 'book' from 'book-new') var fields = $(this).parents().siblings().closest('.'+newField+'-row').find('input[type="text"]'); var count = 0; $(fields).each(function(){ //we only need to get information for the last text box in the bunch if(count == fields.length-1){ var last_field = $(this).attr('name'); //the name attribute of the last text box var field_name = last_field.substr(0, last_field.indexOf('[')); //find the name of the field before a _ (eg. 'book' from 'book_1') var regEx = /\d+/; //find the number of the field contained in the name (eg. '1' from 'book_1') var field_number = parseInt(last_field.match(regEx)); $(this).parent().parent().after(' '); } count++; //iterate our counter }); }); //en…
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41348467
upvote count: 1
tagged with: php
score: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/41348741
tagged with: post
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41250108
has text: You are quite right. As the spec you quoted says, strict mode will act as if you were trying to modify the prototype's property, but it will eventually only modify the object's property if all checks are OK. That's a bit funny.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26289296
type: AnswerComment

http://stackoverflow.com/q/26258303
has comment: http://stackoverflow.com/comment/41191924
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41191997
has body: I want to loop through each key value json element and print it.but some of the keys has null values also. Hence $.each is giving error TypeError: obj is null I dont want to remove null keys from object and not want to print null object in html variable. I want to check for null object in $.each function Fiddle Demo -> http://jsfiddle.net/paxg89q0/4/ Code: var s={"CategoryID":"1","Name":"TCS","ID":"23","Type":"Pay","AccountNo":"1234567890","Authenticator":"{\"EmailAddress\":\"dfgsdfgsdfg\",\"MobileNumber\":\"98-7698769\",\"UniqueID\":\"9876-8975657-6\"}","AddBill":null,"PartnerID":null,"ShortName":null,"Token":"8FB91DE6"}; var html; $('div').html(getKeyValueJson(s)); function getKeyValueJson(obj) { $.each(obj, function (key, value) { if (typeof value == 'object') { getKeyValueJson(value); } else { html += '&lt;label&gt;' + key + '&lt;/label&gt;&lt;label&gt;' + value + '&lt;/label&gt;'; } }); return html; }
has comment: http://stackoverflow.com/comment/41191963
tagged with: http://stackoverflow.com/tag/json
has title: check null object in jquery each function
type: Question
has answer: http://stackoverflow.com/a/26258394
answer count: 2
has comment: http://stackoverflow.com/comment/41191900
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26258428
has comment: http://stackoverflow.com/comment/41192033
score: 0
possible better answer: http://stackoverflow.com/a/26258428
accepted answer: http://stackoverflow.com/a/26258394

http://stackoverflow.com/q/26344705
has title: Using jQuery plugins on multiple targets and pages with similar configuration
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41354980
has comment: http://stackoverflow.com/comment/41352822
has comment: http://stackoverflow.com/comment/41354890
has comment: http://stackoverflow.com/comment/41351608
has answer: http://stackoverflow.com/a/26345618
has comment: http://stackoverflow.com/comment/41371685
type: Question
has comment: http://stackoverflow.com/comment/41383258
has body: I have successfully configured a jQuery plugin as shown below (EDIT: Note that I am not asking anyone to review, just answer the specific question). Now I need to do the same for different targets using an identical configuration object except for the ID name on line 4 (i.e. instead of template1, it might be someOtherTemplateID. How can I do so without duplicating the code on each page? My only thought is to create an object with everything passed to the plugin below, but also include an extra property called template. Then, instead of hardcoding var source = $("#template1").html();, I would change it to var source = $("#"+this.template).html(); I would then set myObj.template="someOtherTemplateID", and use the plugin as $('a.linkPreview').ajaxTip(myObj);. This approach does not sound ideal, and I expect there is a cleaner way to do so. $('a.linkPreview').ajaxTip({ url:'index.php', display: function(d){ var source = $("#template1").html(); //template1 needs to change to another ID var template = Handlebars.compile(source); Handlebars.registerHelper("formatPhoneNumber", function(p) { p = p.toString(); return "(" + p.substr(0,3) + ") " + p.substr(3,3) + "-" + p.substr(6,4); }); Handlebars.registerHelper('fullName', function(f,l) { return f + ((f&amp;&amp;l)?" ":"") + l; }); Handlebars.registerHelper('specNumber', function(s) { return (s)?s.substr(0,2)+' '+s.substr(2,2)+' '+s.substr(4):''; }); Handlebars.registerHelper('specNumberP', function(s) { return (s)?' ('+s.substr(0,2)+' '+s.substr(2,2)+' '+s.substr(4)+')':''; }); return template(data); }, getData:function(){ var d=ayb.getUrlVars(this.attr('href')); d.task='getPopup'; return d; } }); The ajaxTip plugin is listed below. Note that I don't believe is needed for my question. /* * jQuery ajaxTip * Copyright Michael Reed, 2013 * Dual licensed under the MIT and GPL licenses. */ (function($){ var defaults = { 'url' : 'getAjaxTip.php', // The url used to get the tooltip data. 'class' : '', // Css class(es) to add to too…
score: 0
has comment: http://stackoverflow.com/comment/41383714
has comment: http://stackoverflow.com/comment/41351880
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26276881
has comment: http://stackoverflow.com/comment/41226440
has answer: http://stackoverflow.com/a/26277875
has body: I have a page which displays All Test Events on default (Initial Page View) My controller: public function testController() { $category = 0; //NEED TO BE CHANGED WHEN USER SELECTED TEST EVENT 2 AND GET ALL EVENTS (Category 2) $getEventsBasedOnCategory = //DB QUERY TO GET ALL EVENTS (Category 0) //Pass all events to view } My HTML page: SELECT Event All Test Events Test Event 2 My ajax request: $("#event_filter").change(function(){ $.ajax({ url: '/site/example/displayEvents', data: { event_filter: $("#event_filter").val() }, async: false, type: 'POST', success: function(data){ }, }); }); My question is how am I going to change the category to 2 (if user selected 2 in select box) and request again from the database and display the events with category 2 on site? Im using codeigniter by the way. Thanks Thanks, Sorry for bothering you guys.
possible better answer: http://stackoverflow.com/a/26277875
has answer: http://stackoverflow.com/a/26281804
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/41227967
accepted answer: http://stackoverflow.com/a/26281804
tagged with: php
has comment: http://stackoverflow.com/comment/41228864
score: 0
has title: Reload page using different value using ajax
tagged with: codeigniter
answer count: 2

http://stackoverflow.com/comment/41166962
has text: @Tator: Are you still using duplicate `id`s? For example, on the `a` tags?: `id="deleteEvent"` Duplicate `id`s are *invalid*, so the behavior is undefined.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26244004

http://stackoverflow.com/comment/41197267
comment on: http://stackoverflow.com/a/26260193
type: Comment
score: 0
type: AnswerComment
has text: Your regex lie must be: `var regex = new RegExp("^[0-9]{1,18}(?:\\.[0-9]{0,2})?$");` in the demo code.

http://stackoverflow.com/q/26282133
has body: I'm trying to figure out why my dropdown menu isn't working. Here's the page I'm working on: http://www.privateservercloud.com/ If you hover over the area to the left of "Manage Campaigns" you should see that "SEO Dashboard" appears with a dropdown menu. There's 3 things that happened when I added the dropdown menu that I can't figure out. The "SEO Dashboard" link got pushed to the right when that li should be to the very left. The "SEO Dashboard" text completely disappeared unless you're hovering over it. The dropdown menu has black squares in it that don't appear on the other website I'm using it on... Can anyone see what would have caused these things to happen when I added the drop down menu? EDIT: Everything appears to be fixed except for #1. The "SEO Dashboard" link should be to the very left but still doesn't appear to be working...
tagged with: javascript
has title: Dropdown menu not working from CSS or Javascript?
has answer: http://stackoverflow.com/a/26282393
has answer: http://stackoverflow.com/a/26282299
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26282299
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26282393
tagged with: css
has answer: http://stackoverflow.com/a/26282382
score: 0
answer count: 3

http://stackoverflow.com/comment/41289965
has text: I am not getting Content-Disposition in response.headers
type: Comment
comment on: http://stackoverflow.com/a/26301595
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41290873
has text: Can you give an example where `encodeURIComponent` and `encodeURI` don't work properly?
comment on: http://stackoverflow.com/q/26311947
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41201992
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26263182
score: 0
has text: @Wes, All there is to be said : http://xkcd.com/538/ Good luck explaining that to your boss ;)

http://stackoverflow.com/comment/41232707
comment on: http://stackoverflow.com/q/26280445
type: QuestionComment
score: 0
has text: Sorry I'm not sure how to fix the code so that it isn't halfway accross the page.
type: Comment

http://stackoverflow.com/a/26316850
accepted answer of: http://stackoverflow.com/q/26303392
score: 0
has comment: http://stackoverflow.com/comment/41310865
has comment: http://stackoverflow.com/comment/41302343
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41300691
answers question: http://stackoverflow.com/q/26303392
has comment: http://stackoverflow.com/comment/41302788
has body: If I understand correctly you want an image always to have a fixed absolute physical size. There is no way to achieve that. You can define a width with absolute units like inch, centimeter or millimeter, but the rendered result differs from one screen to another. Every browser has set internally 1 inch = 96px, and with that base all other units are calculated. So only if a screen has a physical pixel-size of exactly 25.4 / 96 = 0.26458 mm an element having width set to 5mm is really 5mm. But the absolute physical size of a pixel differs widely on different screens and is not detectable by javascript. EDIT According to your comment: Yes it is possible with your own screen. You can display an element with a width set to 200mm and measure the real width on screen in mm with a ruler. The quotient 200 / your_measurement gives you a conversion factor. If you now want to set a width to a fixed value you have to multiply that value with the factor. Display following file and measure the width of the red quadrat: &lt;!doctype html&gt; &lt;head&gt; &lt;style&gt; div {width: 200mm; height: 200mm; margin: 50px; background-color: red;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; The conversion factor is valid for all absolute units you want to use. With some interaction of a user you can calibrate a users screen as they did on the ZEISS page you linked to. The user has to compare the element on screen against a fixed width (e.g. width of a credit card = 54mm). Since here the user is fixed and the code does the measurement, calculation of the factor is contrariwise: conversion factor f = code_result / 54. I have made a FIDDLE here with 0.5mm-steps to get more accuracy.
has comment: http://stackoverflow.com/comment/41302045

http://stackoverflow.com/comment/41088366
has text: Couldn't that last one also be `[[1,1],[0],[1,1],[0,0],[1]]`? How do you decide which way to group?
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26202190

http://stackoverflow.com/q/26215269
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26578346
score: 3
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
has title: Dgrid - how do I merge cells in a single row
tagged with: merge
tagged with: dojo
tagged with: dgrid
downvote count: 0
has body: Few of the rows in my d-grid in a subsection and the row object has an attribute to identify such a row. Can I merge this row cells into one and change the CSS of the particular row to reflect the subsection part.

http://stackoverflow.com/comment/41278607
score: 0
type: AnswerComment
type: Comment
has text: I've seen this article too and it's for ftp: destinations. My problem occurs in a normal HTML page which uses window.open() function in javascript. I'll check to see if it's installed anyways.
comment on: http://stackoverflow.com/a/26305210

http://stackoverflow.com/q/26290692
favorite count: 0
has title: I can't get my Slick slider to work at all
has answer: http://stackoverflow.com/a/27706300
has comment: http://stackoverflow.com/comment/112945022
tagged with: css
type: AnsweredQuestion
score: 7
has body: I'm trying to get a fading, Slick slider to work on my website. But I'm having no luck. This is Slick: http://kenwheeler.github.io/slick/ If you scroll down, you'll see the instructions on how to implement. I've attached my screenshot, so hopefully someone can see what I'm doing wrong. My Now Amazing Webpage I'm new to Javascript and Jquery so I feel like I'm messing something up there. When I load my page, all I see are the 3 test images, one below the other. Anyone know what I'm doing wrong?
upvote count: 7
type: Question
has comment: http://stackoverflow.com/comment/41255176
tagged with: javascript
has comment: http://stackoverflow.com/comment/41254380
tagged with: jquery
has comment: http://stackoverflow.com/comment/41252477
tagged with: slider
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27706300

http://stackoverflow.com/a/26273574
score: 0
answers question: http://stackoverflow.com/q/26273505
type: Answer
has body: You can submit the first form using AJAX, otherwise the submission of one will prevent the other from being submitted.

http://stackoverflow.com/comment/41228084
type: QuestionComment
has text: My work here is done, although IE 8 doesnt allow border radius, or the background-size: contain; property. I guess thats for another question
comment on: http://stackoverflow.com/q/26276945
score: 0
type: Comment

http://stackoverflow.com/a/26280548
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26280377
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26280377
upvote count: 2
type: Answer
has body: The filter method should do the trick. var jsonArrayString = '[{"firstname": "John","otherProp": "otherValue"},{"firstname": "other Name", "otherProp": "otherValue"}]'; var jsonArray = JSON.parse(jsonArrayString); var filteredArray = jsonArray.filter(function(element) { return element.firstname === "John"; }); console.log(filteredArray); Advice: The filter method is not supported in &lt;= IE 8. but there is a polyfill in the MDN article.
score: 2

http://stackoverflow.com/q/26258089
has answer: http://stackoverflow.com/a/26258124
has answer: http://stackoverflow.com/a/26258552
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26258540
answer count: 7
has answer: http://stackoverflow.com/a/26258479
favorite count: 0
upvote count: 5
type: UnansweredQuestion
has title: Get InnerHTML of element that isnt inside another tag
has answer: http://stackoverflow.com/a/26258281
downvote count: 0
has body: So if I had Hello Qwertyuiop How would I get the InnerHTML of the outside without including anything from the inside or any other HTML tags? (bascially how to get "Hello")
tagged with: innerhtml
has answer: http://stackoverflow.com/a/26258456
type: Question
has answer: http://stackoverflow.com/a/26258948
score: 5

http://stackoverflow.com/comment/41308985
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26317430
has text: @clecai wierd, for me, when I click down on the thing (which defaults to US), the dropdown menu opens, then when I release United States shows up in the span and the dropdown menu remains open. If I click down on a country, nothing changes, and when I release, the dropdown menu closes and the new country shows up in the span.
score: 0

http://stackoverflow.com/comment/41150637
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26235126
has text: What do you call those kind of encodings? (&bnsp; etc.)

http://stackoverflow.com/comment/41356752
comment on: http://stackoverflow.com/a/26347630
score: 0
type: AnswerComment
type: Comment
has text: @msrd0 `$device_mf` could be any value. sure, you can include my link. this is my first regex `\(.*(<\?php.*echo.*\$.*\?>).*\)` it matches alert() but I want only the `$device_mf`

http://stackoverflow.com/q/26348465
answer count: 1
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/41358508
has comment: http://stackoverflow.com/comment/41367266
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41367461
linked to: http://stackoverflow.com/q/11436396
linked to: http://stackoverflow.com/q/365826
linked to: http://stackoverflow.com/q/24753114
downvote count: 0
score: 1
tagged with: geolocation
type: Question
tagged with: mongodb
linked to: http://stackoverflow.com/q/24757433
tagged with: javascript
has comment: http://stackoverflow.com/comment/41359723
has answer: http://stackoverflow.com/a/26354079
accepted answer: http://stackoverflow.com/a/26354079
has body: I have already been facing issues in meteor when dealing with reactive sorting of a publication according to various data. Every time, I never found a real answer to what I was trying to achieve and I ended up giving up and just deciding "not to build my app that way", which always makes me really sad. Now maybe I can phrase this problem simply enough that it could get a constructive and very interesting answer. I think it sounds like it should be possible to be done in a Meteor app, so here it is: I store the locations of my users in "lat" and "lon" variables in my Accounts.users collection. I want the current user to get a list of, say, the 10 closest users to him or her. How would I do this, considering the seemingly complicated set of operations needed to get that distance from latitude and longitude? As far as I know, it is pretty much impossible to insert such an equation in a MongoDB query condition. So how do other people achieve this feat? I would appreciate any insight on this problem, as theoretical as it may be.
tagged with: distance
has title: Sort users by distance from current user reactively in Meteor?
upvote count: 1
has comment: http://stackoverflow.com/comment/41361766

http://stackoverflow.com/a/26338666
downvote count: 0
answers question: http://stackoverflow.com/q/26338385
type: Answer
score: 1
upvote count: 1
has body: window.open returns a reference of the child window. You can use something like this: var child = window.open("HTMLPage2.htm" , "child" , "width=200, height=100"); child.updateInfo(...); This is possible only if the child's URL conforms to the Same-Origin Policy. EDIT: If the child is not from the same origin, you can still communicate with it via the window.postMessage() API. This enables you to send a message event to the child-window, and the child can listen to that event and invoke custom functionality.
accepted answer of: http://stackoverflow.com/q/26338385
type: AcceptedAnswer

http://stackoverflow.com/comment/41130091
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26224199
type: AnswerComment
has text: @ScottBlair-- If it doesnt exist, `toggle` will add it. I edited the selector, it should toggle the class on the `i` - my bad.

http://stackoverflow.com/a/26234869
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26234848
accepted answer of: http://stackoverflow.com/q/26234848
score: 5
type: AcceptedAnswer
has body: You can simply access the property like this: obj = { "data:example":"smthing"}; alert(obj['data:example']);
upvote count: 5

http://stackoverflow.com/a/26203771
type: Answer
has comment: http://stackoverflow.com/comment/92037599
upvote count: 10
downvote count: 1
answers question: http://stackoverflow.com/q/26203453
score: 9
has body: I always use following code to generate unique ids. I've found this method several years ago on Stackoverflow: /** * Create a random Guid. * * @return {String} a random guid value. */ newGuid: function() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r &amp; 0x3 | 0x8); return v.toString(16); }).toUpperCase(); } And you are able to find other useful js helpers in my library: https://github.com/mazong1123/neatjs

snap.svg
tags question: http://stackoverflow.com/q/26202870
tags question: http://stackoverflow.com/q/26201397
type: Tag
tag name: snap.svg

http://stackoverflow.com/q/26227286
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/111102
has title: JavaScript closure within eventlistener
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26227330
accepted answer: http://stackoverflow.com/a/26227330
has body: test test test test test I am try to have a fully understanding on js closure, the above function add even listener to the buttons. it console log 'pass' 5 times and then does nothing when button clicked. but if i uncomment out the closure bit (return), console.log will echo out the i, but not log 'pass'. I did find relevant answer but i don't get why with closure onclick doesn't log the 'pass' string when button clicked instead does log out the i. How do JavaScript closures work?
possible better answer: http://stackoverflow.com/a/26229362
type: Question
tagged with: closures
tagged with: javascript
has answer: http://stackoverflow.com/a/26229362

http://stackoverflow.com/q/26317210
has title: Make canvas object's drawn path transparent?
has body: I need some help with this code. There is a blue square (it is supposed to be,) but it's path is blue too! body{ overflow-y:hidden; overflow-x:hidden; } canvas{ background:url("https://img0.etsystatic.com/038/0/6965312/il_340x270.545626074_sflg.jpg"); } Uhh, what?!?! How do you make the path transparent/clear? I tried fillPath, but that didn't work. Maybe I was using it wrong. Please give me some help? Please also include source/example.
tagged with: canvas
accepted answer: http://stackoverflow.com/a/26318485
tagged with: javascript
type: Question
type: AnsweredQuestion
tagged with: path
score: 0
has answer: http://stackoverflow.com/a/26318485
answer count: 1
tagged with: fill

http://stackoverflow.com/q/26199174
tagged with: mongodb-query
linked to: http://stackoverflow.com/q/20262405
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: javascript
has body: I have an object assigned to a variable, such as: var child = { { _id: 'ObjectID("16e7f7baa05c3a9d751363")', title: 'Testing', sort: 3, active: true } The following does not work, and honestly I am unsure of what I'm missing: db.category.update( { _id: "thisistheparentdocumentsid", "children._id": child._id }, { $set: { "children.$.title": child.title, "children.$.active": child.active, "children.$.sort": child.sort } } ); What I really want to do, as I want to reuse this method and not repeat myself later is: db.category.update( { _id: "thisistheparentdocumentsid", "children._id": child._id }, { $set: { "children" : child } } ); That doesn't work either. I referenced this post: Update array element by id with mongo query As well as: http://docs.mongodb.org/manual/reference/operator/update/positional/ But my query is not working. Am I missing something elementary here? --- Edit --- Here is the result when I query based on the parent document db.category.findOne({ "_id" : "9dYgKdfFczgiRcNouij"}); { "title" : "ParentTest", "active" : true, "children" : [ { "_id" : ObjectId("680d55c6995ef6f0748278c2"), "title" : "ChildTest", "active" : true }, { "_id" : ObjectId("2b4469c1a4c8e086942a1233"), "title" : "ChildTest2" "active" : true } ], "_id" : "9dYgKdfFczgiRcNouij" } I'm passing data to the server, such as... Method.call("UpdateCommand", id, child); The variable id is the parent id of the document, and the child is the object I mentioned. I use child._id.toString() to generate the matching ObjectId("..."); So more specifically: db.category.update( { _id: id, "children._id": child._id.toString() }, { $set: { "children.$.title": child.title, "children.$.active": child.active, "children.$.sort": child.sort, "children.$.uppercase": child.title.toUpperCase() } } ); Yet this doesn't work. I'm thinking something is off with my selector, but I can use findOne() with the same method and it does return the proper document, and using $elemMatch returns the specified child item in t…
has title: With MongoDB, how do I update an object within in array with an object from a variable?
has answer: http://stackoverflow.com/a/26199283
linked to: http://stackoverflow.com/q/11979403
tagged with: mongodb
score: 2
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26199283

http://stackoverflow.com/q/26284059
has answer: http://stackoverflow.com/a/26284276
accepted answer: http://stackoverflow.com/a/26284276
tagged with: javascript
has comment: http://stackoverflow.com/comment/41240115
has title: Run script when angular element's children have completed linking
upvote count: 2
has comment: http://stackoverflow.com/comment/41240283
has comment: http://stackoverflow.com/comment/41240482
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/41240503
has answer: http://stackoverflow.com/a/26284373
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41242875
has comment: http://stackoverflow.com/comment/41240149
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41240033
downvote count: 0
possible better answer: http://stackoverflow.com/a/26284373
has body: I want to know the best way to structure this simple angularJS scenario. I have a which contains two other s. When the DOM is ready, I use a jQuery splitter plugin to make the two children sizable. In plain old HTML, this is no problem! It looks something like this: ... ... Now I want to turn components into AngularJS directives, and I'm running into a problem. Here's the root HTML template: Where leftPane and rightPane are directives something like: app.directive('leftPane', function(){ return { templateUrl: 'leftPane.html', replace: true } }); With leftPane.html: And the container controller: app.controller('containerCtrl', ['$scope', function($scope){ $('#container').split('horizontal'); }]); The problem is that at the time the .split() call happens, the child panels have not been compiled and evaluated yet. Where / how should I call .split() to ensure that the children have been evaluated and are in the DOM properly? *** UPDATE: Here is a Plunker demonstrating the issue: http://plnkr.co/edit/idODF0ztbqip44rfsZsE?p=preview Interestingly there is no issue when using literal templates (template:' left panel '). The issue arises when using templateUrl. I guess templateUrl is evaluated in a different order? The easiest way to tell what's happening is to look at the DOM while resizing the splitter. You can see the plugin is dynamically setting width. But it is not attached to the left panel. At the time the plugin is initialized, the left pane hasn't been added to the DOM yet.
type: Question
has comment: http://stackoverflow.com/comment/41240328

http://stackoverflow.com/q/26315518
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26315541
has body: I have problem using the :not(.disabled) in the class selector. After using it I can't get $(this).position().top Here is the code $('.game:not(.disabled)').bind('click', function(){ // Note, there is also scrollToX and scrollToY methods if you only // want to scroll in one dimension $('.game').removeClass('active'); $(this).addClass('active'); var newgame = $(this).attr('data-href'); theGame = newgame; console.log('EVENT: [CHANGED] ['+theGame+']'); var y = $(this).position().top; console.log('EVENT: [SCROLLTO]['+0+' : '+y+']'); console.log(y); api.scrollTo(0, y); return false; }); When I remove :not(.disabled) it works fine and the 'y' coord is used fine.. How can I fix this ?
tagged with: position
tagged with: css-position
score: 0
has title: Jquery getting position().top of div with :not(.class)
accepted answer: http://stackoverflow.com/a/26315541
tagged with: css
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/26330600
score: 0
answer count: 3
has title: Sleep 1 second and then append?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26330680
has answer: http://stackoverflow.com/a/26330690
has answer: http://stackoverflow.com/a/26330615
type: Question
tagged with: javascript
tagged with: jquery
has body: I need to add iframes with waiting 1 second between adding each other, instead of adding all at once. Tried this with no luck, it just append it all at once. var i = 0; function appendSomeItems() { for (var j=0; j&lt;50; i++, j++) { $('body').append('&lt;iframe src="http://www.example.com"&gt;&lt;/iframe&gt;').delay(1000); } if (i &lt; 50) window.setTimeout(appendSomeItems, 0); } appendSomeItems(); What is the correct way to do that ? thanks.

http://stackoverflow.com/q/26307429
has comment: http://stackoverflow.com/comment/41283490
type: Question
has comment: http://stackoverflow.com/comment/41284016
has answer: http://stackoverflow.com/a/26309578
accepted answer: http://stackoverflow.com/a/26309578
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/41284831
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Here is the fiddle: http://jsfiddle.net/sw31uokt/ Here is some of the relevant code for the incrementValue function I set up to count overall clicks within the canvas element. What I would like to do is be able to display a count of each color, so "you have placed 14 red pixels, 3 blue pixels, 4 black pixels'. function incrementValue() { var value = parseInt(document.getElementById('number').value, 10); value = isNaN(value) ? 0 : value; value++; document.getElementById('number').value = value; } $(c_canvas).click(function(evt) { var pos = getNearestSquare(getMousePos(c_canvas, evt)); if (pos != null) { context.fillStyle=(currentColor); context.fillRect(pos.x,pos.y,19,19); incrementValue(); } });
has comment: http://stackoverflow.com/comment/41283579
tagged with: css
has comment: http://stackoverflow.com/comment/41283407
type: AnsweredQuestion
has title: Count Amount of Colored Squares in Canvas

http://stackoverflow.com/a/26349659
type: Answer
has body: I dont know if you have seen this before: Possible to show two slides in the carousel at a time? Hope this helps.
score: 0
answers question: http://stackoverflow.com/q/26239798

http://stackoverflow.com/q/26256689
upvote count: 0
has answer: http://stackoverflow.com/a/26256844
has comment: http://stackoverflow.com/comment/41190664
has comment: http://stackoverflow.com/comment/41189507
has comment: http://stackoverflow.com/comment/41188998
accepted answer: http://stackoverflow.com/a/26256844
type: AnsweredQuestion
tagged with: javascript
score: -1
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/41191824
has title: jQuery - load url value
answer count: 1
downvote count: 1
tagged with: submit
tagged with: url
has body: I'm looking at implementing this country selector http://baymard.com/labs/country-selector One change I'm stuggling to make is: instead of just showing an alert pop-up once submitted, I'd like it so that when the forms value="[url]" to load that page when submitted. Currently this is the script: I've tried a number of different solutions but I end up losing the typing fuctionality and reverting back to a standard drop down with the links working. Any ideas on how I could get both working? Here's a snippet of the html: China
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41215229
has text: @edcoder yes the file is not saved in the server. I am using a library to generate pdf file. When I click the hyperlink, it creates a pdf file and opens it in new browser tab in pdf format. from there I could save the pdf file. but for me, when I click the hyperlink the pdf file should be downloaded by prompting save as dialogbox.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26270265

http://stackoverflow.com/comment/41351163
type: QuestionComment
comment on: http://stackoverflow.com/q/26344392
has text: Have you checked the browser console for errors? If static text works fine, and variables don't, then it's almost certainly a problem with the variable.
score: 0
type: Comment

http://stackoverflow.com/a/44997481
answers question: http://stackoverflow.com/q/26287859
type: Answer
score: 0
has body: I've used this library for a project, to visualize states of database-objects: https://www.npmjs.com/package/promise-state-machine-es6 While it does not really cover async stuff, it does help in reasoning about applicationlogic with non-technical people.

http://stackoverflow.com/a/26327067
has comment: http://stackoverflow.com/comment/41318310
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41320991
accepted answer of: http://stackoverflow.com/q/26327000
upvote count: 2
answers question: http://stackoverflow.com/q/26327000
has comment: http://stackoverflow.com/comment/41321062
has body: This has nothing to do with Travis; CodeMirror's test script specifically disallows tabs (see this line). They want consistent formatting.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26305853
upvote count: 1
type: Answer
has body: If you can do without split, you can just use a regex like this that captures field data. edit - Modified to match spurious escapes as well. # /(?:^|,)((?:[^,\\]*(?:\\,|\\)?)+)(?:(?=,)|$)/ (?: ^ | , ) # Leading comma or BOL ( # (1 start), Field data (?: [^,\\]* (?: \\, | \\ )? )+ ) # (1 end) (?: # Lookahead, comma or EOL (?= , ) | $ ) Output >> ** Grp 0 - ( pos 0 , len 4 ) C=US ** Grp 1 - ( pos 0 , len 4 ) C=US -------------- ** Grp 0 - ( pos 4 , len 6 ) ,ST=NY ** Grp 1 - ( pos 5 , len 5 ) ST=NY -------------- ** Grp 0 - ( pos 10 , len 15 ) ,O=GOOGLE\, INC ** Grp 1 - ( pos 11 , len 14 ) O=GOOGLE\, INC
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26305459

http://stackoverflow.com/a/26235407
answers question: http://stackoverflow.com/q/26234988
has body: You can use Javasctipt-Java bridge and call Android code from your custom HTML javascript inside WebView. That Android code may launch intent for the external browser. See more Call Java function from JavaScript over Android WebView
score: 0
type: Answer

http://stackoverflow.com/q/26329365
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26338174
has comment: http://stackoverflow.com/comment/41326391
upvote count: 3
accepted answer: http://stackoverflow.com/a/26332050
favorite count: 0
has body: I want to create an SVG donut shape (circle with another empty circle inside). I want to be able to access &amp; resize both circles, eg via their id attributes. This will allow for animation. I have considered three approaches but none are that great: complex path: does not allow for access of the inner circle via #id outline stroke: possible but complicated for my purpose (would have to reposition as I increase stroke) clippath/mask: Doesn't work like a compound path, only an outer box Is there a way of doing this?
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/41338771
has answer: http://stackoverflow.com/a/26332050
possible better answer: http://stackoverflow.com/a/26338174
type: AnsweredQuestion
score: 3
has title: SVG donut-shape with access of both circles

http://stackoverflow.com/comment/41300020
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26312874
has text: That thread is really old. The lifecycle events are called when using innerHTML: http://jsbin.com/haxaha/1/edit. I think in this case the warning "Attributes on core-tooltip were data bound prior to Polymer upgrading the element" is not that helpful.

source-maps
type: Tag
tags question: http://stackoverflow.com/q/26225191
tag name: source-maps
tags question: http://stackoverflow.com/q/26212796

http://stackoverflow.com/comment/41289177
comment on: http://stackoverflow.com/q/26310964
score: 0
type: Comment
type: QuestionComment
has text: @Anthony I think you mean `.val()`. But he could have done `phone_number = $('#phone_number').val()`.

http://stackoverflow.com/comment/59991107
score: 0
type: AnswerComment
type: Comment
has text: @saimeunt yes please share how to sent the data, error back to the client.
comment on: http://stackoverflow.com/a/26226668

http://stackoverflow.com/q/26212100
tagged with: javascript
has body: There isn't any GA tracking code on my website page, and ga.js or analytics.js is not present when I inspect the code. The same is reflected in the GA dashboard as an alert, that my page is missing tracking code. However, my google analytics account shows New Users, separated by Demographics and a couple other graphs with values as high as 50 new users. But in realtime report, it shows 0 users when I am on the website. I'm unable to interpret this behavior. I was of the understanding that this data comes only when tracking code is present. Is there any other method of feeding data to the site, which I'm not aware of. This particular GA account was created by someone else an year ago,and I've gained access just now.So I'm also not very sure what all is setup with the account.
score: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41108224
type: UnansweredQuestion
has title: GA showing new users and demographic data when site has no tracking code
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41107610
type: Question
tagged with: google-analytics

http://stackoverflow.com/comment/41354652
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26346526
has text: ^^ Has to be it. Works fine for me - http://jsfiddle.net/rth94prt/
score: 0

http://stackoverflow.com/a/26314720
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26314677
downvote count: 0
type: Answer
has body: Because class was added after click event initialised. You need to use live event handlers, like this: $( document ).on('click', '.remove_rating', function() { In this case .remove_rating click handler will work on dynamically created elements and on class name changes.

http://stackoverflow.com/comment/41161023
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26232489
has text: Alright. Thanks for the headsup. Was thinking dynamic content for body click works.

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/26229424
tags question: http://stackoverflow.com/q/26309397
tags question: http://stackoverflow.com/q/26253941
tags question: http://stackoverflow.com/q/26295405
type: Tag

http://stackoverflow.com/comment/41116348
type: AnswerComment
comment on: http://stackoverflow.com/a/26217109
score: 0
type: Comment
has text: The problem is, this only makes guarantees when I get a promise *passed into* my library, but I need to *produce promises*. Say I bundle Bluebird with my library to produce those promises. Even if my users can easily convert them to, e.g., Q promises in their code, they still need to send Bluebird over the wire to their clients, which is non-trivial. --- I was hoping to find some minimal code to produce promises with whichever promise library happens to be loaded.

http://stackoverflow.com/q/26329380
tagged with: firebreath
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26343015
score: 0
has title: Firebreath - cannot inject plugin
type: Question
tagged with: javascript
answer count: 1
has body: I am developing Web application using Angular - In order to be able to work with chrome and IE11, I am using Firebreath to hide the ActiveX. I am trying to inject the html - however the pluging isnt created function activate() { var headElement = document.getElementsByTagName('body')[0], objNode = document.createElement("object"); objNode.setAttribute("id", 'plugin0'); objNode.setAttribute("type", "application/x-nvplayer"); headElement.appendChild(objNode); } when I take this code - and paste it into static html file - all works

http://stackoverflow.com/comment/41213260
has text: is there a border or padding used for the header or main
comment on: http://stackoverflow.com/q/26268875
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41295063
score: 0
comment on: http://stackoverflow.com/q/26314510
type: Comment
type: QuestionComment
has text: If you can't see,the website is http://www.colouredlines.com.au/

http://stackoverflow.com/comment/41117538
comment on: http://stackoverflow.com/a/26208759
has text: my whole content container width was 100%, after implementing your code i am seeing whole content width decreased to look like 50%
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26302096
tagged with: angularjs
has body: Similar to this question, I would like to break on a variable change in Chrome. However, I'm using Angular, so the variable I would like to break on is only defined in the HTML. Its essentially something like this - &lt;div ng-click="show = !show"&gt;...&lt;div&gt; &lt;div ng-class="{expanded : show}"&gt;... With no code in the controller. So how can I get Chrome to pause when show is changed? I know that I can change the code to a function call that wraps show and then put a breakpoint there, but its an inefficient use of time and I would like to know if there is a way to directly break on variable change.
downvote count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11618278
tagged with: google-chrome
linked to: http://stackoverflow.com/q/36195945
score: 2
linked to: http://stackoverflow.com/q/13743058
has title: Break on variable change in Chrome using AngularJS
has comment: http://stackoverflow.com/comment/41275386
has answer: http://stackoverflow.com/a/26304961
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: breakpoints
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26331913
tagged with: css
has comment: http://stackoverflow.com/comment/41327669
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1830347
linked to: http://stackoverflow.com/q/9276086
type: Question
has title: Passed data on selected row from dialog window to main page
tagged with: javascript
tagged with: jquery
has body: $(document).ready(function(){ $('#1, #2').click(function(){ window.clickedbtnid = $(this).attr('id'); $( "#table_dialog_1" ).dialog(); }); $( "#table_dialog_1" ).find('td').click(function(){ $('#'+window.clickedbtnid).parent().prev().find('input').val($(this).id); $( "#table_dialog_1" ).dialog('close'); }) }); $('#input_'+id).attr('value', $(this).html()); this was closed to what i want but it only pass based on clicked td's text of table on dialog area because what I need is the first td table of dialog window to pass on input tag, and second td and third on link tag element. See my last table in fiddle below, it should look like the table on the main page when dialog window is closed. see this FIDDLE
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26333573
answer count: 1
accepted answer: http://stackoverflow.com/a/26333573

http://stackoverflow.com/comment/41351877
type: AnswerComment
has text: Hi @Arun P Johny, you ROCK! I would not have worked this out without your help!!!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26344961

http://stackoverflow.com/a/26339571
answers question: http://stackoverflow.com/q/26338672
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26338672
has body: You have to keep the asynchronous nature of CasperJS in mind. All wait* and then* functions are asynchronous step functions, which are used to schedule some behavior. If you call synchronous functions like captureSelector after the invocation of a wait, then there was no wait inbetween. They have to be scheduled inside of the then callback of wait: this.wait(10000, function then(){ this.captureSelector('signup-form.png','input#id_name'); var form_values = this.getFormValues('form'); console.log(JSON.stringify(form_values)); test.assertEqual(form_values.stage, "2"); }); If the form submit handler is not asynchronous then the following should work without explicit wait: casper.start('https://my.vidzor.com/accounts/signup/', function(){ this.fillSelectors('form', { 'input[name="name"]': 'Test User', 'input[name="email"]': 'test@example.com', 'input[name="password"]': 'example', 'input[name="password_confirm"]': 'example' }, true); }); casper.then(function(){ this.captureSelector('signup-form.png','input#id_name'); var form_values = this.getFormValues('form'); console.log(JSON.stringify(form_values)); test.assertEqual(form_values.stage, "2"); });

http://stackoverflow.com/comment/41155903
has text: Using `reg.lastIndex = 0;` before each test probably works as well then.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26238291
score: 0

http://stackoverflow.com/q/26215113
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41112838
tagged with: window.open
has answer: http://stackoverflow.com/a/49075308
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41112670
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41114434
has title: Delaying window.open inside click event handler
has answer: http://stackoverflow.com/a/26216764
score: 3
has body: For some days now I've been trying (without success) to open new window with delay without Chrome blocking it most of the time. Delay is crucial for my task, because some animation must take place before window is opened and I can not afford browsers to block new tabs from opening. Here is sample from my code: element.on("click", function(e){ e.preventDefault(); var self = $(this), url = self[0].href; window.setTimeout(function(){ window.open(url); }, 1000); }); element is jQuery object (anchor element to be more precise). I have noticed that I have bigger success rate if I pass string directly like this window.open("http://example.com"); I've tried this solution in Explorer(no problem), Chrome(problem), Firefox(no problem) and Opera(problem). I am loosing my mind, because I've tried everything I can remember. Synchronous ajax calls, artificially triggering click, creating fake anchor elements and artificially triggering click event. Nothing works fine. Bonus question (in case someone knows how to solve problem): is there a way to call window.open anytime &amp; anywhere from code?
tagged with: settimeout
upvote count: 3

http://stackoverflow.com/comment/41338530
has text: More on constructor functions and prototype here: http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711 I think IIFE and closures are already covered in the answers
comment on: http://stackoverflow.com/q/26336952
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41165168
has text: add jQuery tag, you are using jQuery here.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26243202

http://stackoverflow.com/q/26345135
tagged with: extjs
tagged with: extjs4
has answer: http://stackoverflow.com/a/26347691
type: AnsweredQuestion
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/26347691
has body: I've got this panel. It shows tools icons in this order: gear, close, collapse. I'd like to get icons is this order: gear, collapse, close. I can't figure it out. When I put collapseFirst: true, then collapse is at the first position. Here's an alternative link to the SenchFiddle Ext.application({ name : 'Fiddle', launch : function() { Ext.create('Ext.panel.Panel', { width : 500, height: 200, title : 'Panel', renderTo: Ext.getBody(), closable : true, collapsible : true, collapseFirst : false, tools: [{ type : 'gear' }], initTools: function() { var me = this, tools = me.tools, i, tool; me.tools = []; for (i = tools &amp;&amp; tools.length; i; ) { --i; me.tools[i] = tool = tools[i]; tool.toolOwner = me; } // Add a collapse tool unless configured to not show a collapse tool // or to not even show a header. if (me.collapsible &amp;&amp; !(me.hideCollapseTool || me.header === false || me.preventHeader)) { if (Ext.getVersion().major == '4') { me.collapseDirection = me.collapseDirection || me.headerPosition || 'top'; me.collapseTool = me.expandTool = Ext.widget({ xtype: 'tool', handler: me.toggleCollapse, scope: me }); me.updateCollapseTool(); // Prepend collapse tool is configured to do so. if (me.collapseFirst) { me.tools.unshift(me.collapseTool); } } else { me.updateCollapseTool(); // Prepend collapse tool is configured to do so. if (me.collapseFirst) { me.tools.unshift(me.collapseTool); } } } if (me.pinnable) { me.initPinnable(); } // Add subclass-specific tools. me.addTools(); // Append collapse tool if needed. if (me.collapseTool &amp;&amp; !me.collapseFirst) { me.addTool(me.collapseTool); } // Make Panel closable. if (me.closable) { me.addClsWithUI('closable'); me.addTool({ xtype : 'tool', type: 'close', scope: me, handler: me.close }); } } }); } }); &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/4.2.1/resources/css/ext-all-neptune.css" rel="stylesheet"/&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/4.2.1/ext-all-debug.js"&gt;&lt;/scr…
has title: ExtJS Ext.panel.Panel tools order
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/26212441
favorite count: 0
possible better answer: http://stackoverflow.com/a/50742329
has answer: http://stackoverflow.com/a/50742329
has comment: http://stackoverflow.com/comment/41107406
has answer: http://stackoverflow.com/a/26212510
type: AnsweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/18096715
type: Question
accepted answer: http://stackoverflow.com/a/26212510
score: 1
has body: I am using an older version of Jquery &lt; 1.5 in my project. So, it's the same scenario that I don't want other function to execute until first function is not done. Is there any other way of doing instead of using Deferred that I think is available from version 1.5.
answer count: 2
downvote count: 0
has title: Is there any alternative approach to jquery Deferred function?
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26289509
tagged with: object
tagged with: javascript
has comment: http://stackoverflow.com/comment/41250248
has comment: http://stackoverflow.com/comment/41250326
has comment: http://stackoverflow.com/comment/41250277
type: AnsweredQuestion
has body: Let's say I have an example, where somebody can order a car by picking options. If they order two cars, I want to be able to use the same function, but not "clobber" the variable name. Here is an example: cars = []; function car(color, kind) { this.color = color; this.kind = kind; } div.addEventListener('click', function(){ if(cars.length) { newCar = new car('red', 'chrysler'); } else { newCar = new car('red', 'buick'); } cars.push(newCar) }, false); Am I correct that everytime the div is clicked, a new car is made (not that the original car is changed)? I just don't see how I can go back and edit the first car if they have the same variable name. It would be cool to be able to say var car+cars.length and get cars1, cars2, etc.
has answer: http://stackoverflow.com/a/26289569
favorite count: 0
has comment: http://stackoverflow.com/comment/41250200
type: Question
accepted answer: http://stackoverflow.com/a/26289569
has title: How to make multiple instances of an object, without reusing the same variable name in JavaScript
has comment: http://stackoverflow.com/comment/41250373
linked to: http://stackoverflow.com/q/5117127
score: 0
upvote count: 1
answer count: 1
downvote count: 1

http://stackoverflow.com/a/26283344
has comment: http://stackoverflow.com/comment/41238399
type: Answer
downvote count: 0
score: 3
has body: There's another, more comprehensive approach you could do, if you want to allow for "any order" of the arguments. Remove ".0", split on the commas, trim the spaces, sort the list, and re-join. For example: check = check.replace(/\.0*\b/g, "").split(/\s*,\s*/g).sort().join(","); This would allow the following to match: width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no user-scalable=no,maximum-scale=1.0,initial-scale=1.0,width=device-width See it in action? JS Bin
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26283026
accepted answer of: http://stackoverflow.com/q/26283026

http://stackoverflow.com/q/26268137
has comment: http://stackoverflow.com/comment/41220303
answer count: 1
tagged with: javascript
tagged with: express
score: 0
has comment: http://stackoverflow.com/comment/41211043
tagged with: parse-platform
has body: Maybe this is simple, maybe this is a bug on Parse - would like to know if anyone has had the same problem and a possible solution. What I'm trying to do: I'm sending a JSON request from an app called FormEntry to my Parse app The body comes in like this: json={"someLabel" : "someValue"} I would like to take the entire body and create a Parse.Cloud.httpRequest over to Zapier to perform some functions. Now, the problem seems to be this: On random occasions (i.e. I have no idea why), the body is sent (as shown by the logs) where there is a trailing comma at the end of the last pair in the JSON object. e.g. like this json={"lastLabel" : "lastValue",} The number of elements in 'normal' and 'incorrect' objects seem to be the same, so it's simply just another comma added. And I have no idea why. My setup: Using app.use(parseExpressRawBody()); only and not the standard app.use(express.bodyParser()); which doesn't provide access to the raw body. Because parseExpressRawBody converts the body to a buffer I need to turn it back into a string to send it in the HTTP request in a meaningful way. Therefore I use: var body = req.body.toString(); When logging this var to the Parse console it looks to be format back from the buffer fine. And that's about it. Nothing complex going on here but a real annoying bug that I just haven't found a sensible way of understanding. Would SUPER appreciate anyone who has seen this before or who could point me in a direction to focus on.
type: UnansweredQuestion
has title: Odd occurrence in using app.use(parseExpressRawBody())
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26309636

http://stackoverflow.com/comment/41253047
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26283410
has text: pure letters. IE10 compatibility mode.
type: AnswerComment

http://stackoverflow.com/comment/41092354
comment on: http://stackoverflow.com/a/26203889
score: 0
type: Comment
type: AnswerComment
has text: now, how will i actually remove the second search box and keep only the first one i made?

http://stackoverflow.com/comment/41213246
type: QuestionComment
comment on: http://stackoverflow.com/q/26269433
score: 0
type: Comment
has text: Thanks! Can you give me a quick code example of how to actually incorporate it to my desired results?

http://stackoverflow.com/comment/41161513
type: AnswerComment
has text: No sir this code work good in chrome and safari and not the newset version of firefox !!!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26241378

http://stackoverflow.com/a/26258733
has body: You can throw EvalError like this throw new EvalError("message"); However, InternalError is not standardized but in some browsers, you'll be able to make that error by doing too much of recursions and EvalError is at the brink of extinction as pointed by @FelixKling
score: 1
answers question: http://stackoverflow.com/q/26258583
has comment: http://stackoverflow.com/comment/41196206
downvote count: 0
has comment: http://stackoverflow.com/comment/72852750
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41312466
score: 0
type: Comment
type: QuestionComment
has text: As soon as you call `.submit()`, the page reloads and the rest of the script stops. The only way to do multiple submits is with AJAX.
comment on: http://stackoverflow.com/q/26323889

http://stackoverflow.com/a/26234135
type: Answer
has body: Update on link: http://jsfiddle.net/kuw6tt92/1/ function fadeIn(selectors) { var elements = Array.prototype.slice.call($(selectors)); function fade() { jQuery(elements.shift()).fadeIn("slow", fade); } fade(); } fadeIn("div");
has comment: http://stackoverflow.com/comment/41148681
has comment: http://stackoverflow.com/comment/41148988
score: 0
answers question: http://stackoverflow.com/q/26233905

http://stackoverflow.com/comment/41340630
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26338507
score: 0
has text: Richsilv - thank you for the clear and concise answer.

http://stackoverflow.com/comment/41309952
has text: I assume you had some reason for writing `~~$('#first').val()`. If I knew what you were trying to do, I could explain how to do it properly.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26322517

http://stackoverflow.com/q/26222567
accepted answer: http://stackoverflow.com/a/26222954
has title: Slider Button Function
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: button
tagged with: javascript
tagged with: jquery
has body: I have a slider that works perfectly with the exception of getting the disk to animate to the corresponding slide. I think since I have the slides changing their number for the infinite loop it messes with how the disc buttons select them. If anyone has a fix please fork my code. http://codepen.io/Spiderian/pen/IKvah Here is the code in question: discs.click(function(e) { console.log( slideAnimating ); var btnIndex = discs.index(this); if(!slideAnimating &amp;&amp; btnIndex !== slideNumber) { timerFunction.pause(); nextSlide = btnIndex; changeSlide(); }
has answer: http://stackoverflow.com/a/26222954
score: 0
has comment: http://stackoverflow.com/comment/41126921
tagged with: slider
tagged with: css

http://stackoverflow.com/comment/41242313
score: 0
type: Comment
has text: @War10ck hehe I could have guessed that there'd be a meta post about it. I'm actually a little curious now, what's the perceived harm in allowing "this type of question" on Stack Overflow? Who is harmed? Moderators?
comment on: http://stackoverflow.com/a/26285187
type: AnswerComment

iphone
tags question: http://stackoverflow.com/q/26336487
tag name: iphone
tags question: http://stackoverflow.com/q/26244822
tags question: http://stackoverflow.com/q/26292319
tags question: http://stackoverflow.com/q/26324964
tags question: http://stackoverflow.com/q/26294768
tags question: http://stackoverflow.com/q/26197755
tags question: http://stackoverflow.com/q/26352968
type: Tag

http://stackoverflow.com/a/26328696
answers question: http://stackoverflow.com/q/26313778
score: 0
type: Answer
has body: You could use a controller? Create the component you need dynamically when you need it and just use add() to a Container with table layout? http://docs.sencha.com/extjs/4.2.2/?mobile=/api/Ext.container.AbstractContainer#method-add

http://stackoverflow.com/comment/41176168
score: 0
type: AnswerComment
has text: yes I checked the array and that it's matching becomes true. ) ( this part: item.getText() == ("A+")) for the bigitems example, I cannot use without var bigitems. thank you again. might need to leave it for now :) * I edited original code bit more
comment on: http://stackoverflow.com/a/26248956
type: Comment

http://stackoverflow.com/a/26320351
type: AcceptedAnswer
has body: First, you are binding HTMLHeadingElement to an h2, which is a HTMLHeadingElement itself. If you log this: console.log(companyName.outerHTML); You will get a string close to " ACME Corporation " So I guess the mistake come from your up-front work, when storing your data. You may convert companyName to its text value when storing it into your database. HTMLHeadingElement inherits properties from Node so you have access to textContent property, which is what you are looking for. // Pseudo code: before storing your project project.companyName = source.companyName.textContent project.save() If you don't want/can't do this up-front work, then you can do this while binding your value.
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26320201
answers question: http://stackoverflow.com/q/26320201

http://stackoverflow.com/comment/41235636
score: 0
type: Comment
type: QuestionComment
has text: do you get the "variable is undefined" error on mouseover or mouseout?
comment on: http://stackoverflow.com/q/26281759

http://stackoverflow.com/comment/41320791
score: 1
comment on: http://stackoverflow.com/a/26328356
type: AnswerComment
type: Comment
has text: Could use Mutation Observers to achieve the second part in an event-based fashion.

http://stackoverflow.com/a/26295837
type: Answer
has comment: http://stackoverflow.com/comment/41261457
answers question: http://stackoverflow.com/q/26295394
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41261648
has comment: http://stackoverflow.com/comment/41261372
has body: Bootstrap relies on jQuery but in your code you have presented the files for Bootstrap first. Change the order and it will work. Additionally you need to ensure your paths are correct as you seem to be missing the name of the theme. As you mention in the comments, your code to include the scripts is: Html.AppendScriptParts("~/Scripts/jquery.validate.unobtrusive.min.js"); Html.AppendScriptParts("~/Scripts/jquery.validate.min.js"); Html.AppendScriptParts("~/Themes/Content/bootstrap-3.2.0/js/bootstrap.min.js"); Html.AppendScriptParts("~/Scripts/jquery-1.10.2.min.js"); Simply change the order of the last 2 lines like this: Html.AppendScriptParts("~/Scripts/jquery.validate.unobtrusive.min.js"); Html.AppendScriptParts("~/Scripts/jquery.validate.min.js"); Html.AppendScriptParts("~/Scripts/jquery-1.10.2.min.js"); Html.AppendScriptParts("~/Themes/ProcoDefault/Content/bootstrap-3.2.0/js/bootstrap.min.js");
accepted answer of: http://stackoverflow.com/q/26295394
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41243664
type: Comment
has text: Imagine that somebody logged into webmail, received and followed the link to the page, which opens in iframe the webmail (session still alive) of that somebody and doing whatever it wants with his emails )) Worse, it can be a bank account and so on..
comment on: http://stackoverflow.com/q/26285960
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41319804
comment on: http://stackoverflow.com/a/26327486
type: AnswerComment
has text: Thanks torazaburo. Your solution is similar to the last one in Addy's blog. But this kind of approaches are only appropiate when you attempt to make external memoizing among successive invocations as you show in your example memoizing `factorial(7)` after invoking `factorial(6)`. Your solution does not apply internal memoization, which in the factorial function does not make sense but it does on overlapping recursion such as in the fibonacci case. External memoization is not confined to recursive schemes. Internal is used to solve recursive functions with overlapping calls
score: 0
type: Comment

http://stackoverflow.com/q/26197666
tagged with: scope
downvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26197717
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26197739
has comment: http://stackoverflow.com/comment/41080110
type: AnsweredQuestion
has body: I'm trying to use a variable inside my getJSON function. How can I pass it in? This is what I've tried. function getComments(parent_id) { if(typeof(parent_id)==='undefined') parent_id = -1; console.log("parent_id type: " + typeof(parent_id)); // parent_id type: number var message = { parentMessageID: parent_id }; $.getJSON(UPDATECOMMENTCALL, message, function(data, parent_id) { console.log("JSON parent_id: " + typeof(parent_id)); // JSON parent_id: string } } Instead of parent_id being -1 inside the function, it's a string with value "success". How can I pass it in properly?
upvote count: 0
possible better answer: http://stackoverflow.com/a/26197717
has answer: http://stackoverflow.com/a/26197739
type: Question
has comment: http://stackoverflow.com/comment/41080088
score: -2
has title: JS/JQ: Access variable from inline function
tagged with: javascript

http://stackoverflow.com/comment/41160747
score: 0
has text: Ok, I have access to the $rootScope thanks, but I still can't figure out how to call the function?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26240765

http://stackoverflow.com/a/26314294
type: Answer
answers question: http://stackoverflow.com/q/26314252
score: 1
has body: Make use of this keyword $('.form-group').find('input').change(function () { // When the input value get changed the below code will be executed console.log(this.id); // Based on it add your switch statement });
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/41346378
score: 0
type: Comment
has text: document.querySelector('.some_class .small') returns null
type: AnswerComment
comment on: http://stackoverflow.com/a/26341759

http://stackoverflow.com/comment/41314566
type: Comment
has text: @Firsh: Yes, the CSS animation is implemented in the browser itself, while the jQuery animation is implemented in Javascript running in the browser. You should however also consider the browser support, e.g. that IE 8 doesn't support transitions.
comment on: http://stackoverflow.com/a/26314010
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41172543
comment on: http://stackoverflow.com/a/26246903
score: 0
type: AnswerComment
type: Comment
has text: No not really, the javascript built-in would be it's use of regex for pattern matching. @Davsket answer shows how you can do this and the comments on your question provide more details on how to use Regex. Personally, for something like this I would take the regex approach, but to specifically address your 'bird*' format this answer will suffice for simple usage.

http://stackoverflow.com/comment/41158470
score: 1
comment on: http://stackoverflow.com/a/26239062
type: AnswerComment
type: Comment
has text: Updated the answer, @Ciarán . Tried to give you an idea of how to achieve what you wanted. It'd be good to have an idea of how your LocalStorage object is structured

http://stackoverflow.com/a/26245999
accepted answer of: http://stackoverflow.com/q/26245091
answers question: http://stackoverflow.com/q/26245091
score: 0
type: AcceptedAnswer
has body: function MultiArray(dimensions) { this.elements = []; var leaf = dimensions.length == 1; var dimension = dimensions.shift(); for (var i = 0; i &lt; dimension; ++i) { this.elements.push(leaf ? undefined : new MultiArray(dimensions)); } } MultiArray.prototype.get(indexes) { var leaf = indexes.length == 1; var index = indexes.shift(); return leaf ? this.elements[index] : this.elements[index].get(indexes); } MultiArray.prototype.set(indexes, value) { var leaf = indexes.length == 1; var index = indexes.shift(); if (leaf) { this.elements[index] = value; } else { this.elements[index].set(indexes, value); } return this; } var m = new MultiArray([4, 3, 5]); m.set([1, 2, 4], "i'm a value in a multi dimensional array"); m.get([1, 2, 4]); // should return "i'm a value in a multi dimensional array" m.get([2, 0, 3]); // should return undefined m.get([0, 1]); // should return an array of 5 elements
type: Answer

http://stackoverflow.com/q/26237041
has body: I have a problem. I'm trying to print out only content which is in a div, basically everything below the buttons (See picture below). But then i try to print, the result looks something like this: I.e. without any stylesheets. But the code includes all the css files I currently have. This is the function I have. I have tried with or without the stylesheets and different ways to reference them. Can anybody see what I'm doing wrong? function PrintHistory() { var printDivCSS5 = new String( '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.core.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.resizable.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.selectable.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.accordion.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.autocomplete.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.button.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.dialog.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.slider.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.tabs.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.datepicker.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.progressbar.css"&gt;' + '&lt;link rel="stylesheet" type="text/css" href="http://localhost:62533/Content/themes/base/jquery.ui.theme.css"&gt;' + '&lt;link rel="stylesheet" type="tex…
has title: Print part of a page javascript
type: Question
accepted answer: http://stackoverflow.com/a/26237423
tagged with: javascript
score: 0
tagged with: printing
answer count: 1
has comment: http://stackoverflow.com/comment/41153305
tagged with: jquery
has comment: http://stackoverflow.com/comment/41153492
has answer: http://stackoverflow.com/a/26237423
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26287781
has body: Note: Jquery or JS resolutions. I have an array called "Decimal" That receives 11 decimal values with the whole number removed (Ex: 0.25) If I run these 7 if statements against a single value in my Decimal array like below, I get 1 value in the "Fraction" array, which is what I wanted to happen to confirm that the logic in the if() statements is correct. if (Decimal[1] &lt;= 0.125) {Fraction.push('1/8');} if (Decimal[1] &lt;= 0.25) {Fraction.push('1/4');} if (Decimal[1] &lt;= 0.375) {Fraction.push('3/8');} if (Decimal[1] &lt;= 0.50) {Fraction.push('1/2');} if (Decimal[1] &lt;= 0.625) {Fraction.push('5/8');} if (Decimal[1] &lt;= 0.75) {Fraction.push('3/4');} if (Decimal[1] &lt;= 1) {Fraction.push('7/8');} As soon as I put those 7 if statements into a for loop I get 44 values in the Fraction Array ( I was expecting 11). See Code Below: for (var t = 0; t &lt; Decimal.length; t++) { if (Decimal[t] &lt;= 0.125) {Fraction.push('1/8');} if (Decimal[t] &lt;= 0.25) {Fraction.push('1/4');} if (Decimal[t] &lt;= 0.375) {Fraction.push('3/8');} if (Decimal[t] &lt;= 0.50) {Fraction.push('1/2');} if (Decimal[t] &lt;= 0.625) {Fraction.push('5/8');} if (Decimal[t] &lt;= 0.75) {Fraction.push('3/4');} if (Decimal[t] &lt;= 1) {Fraction.push('7/8');} }
has comment: http://stackoverflow.com/comment/41247172
tagged with: javascript
has comment: http://stackoverflow.com/comment/41247211
accepted answer: http://stackoverflow.com/a/26287926
tagged with: for-loop
type: AnsweredQuestion
has title: for loop pushing to many values into an array
tagged with: arrays
tagged with: jquery
type: Question
has comment: http://stackoverflow.com/comment/41247303
has comment: http://stackoverflow.com/comment/41247271
has comment: http://stackoverflow.com/comment/41247224
has comment: http://stackoverflow.com/comment/41247214
possible better answer: http://stackoverflow.com/a/26287813
has answer: http://stackoverflow.com/a/26287926
has answer: http://stackoverflow.com/a/26287813
has comment: http://stackoverflow.com/comment/41247276
score: 0
answer count: 2

http://stackoverflow.com/comment/41239654
has text: Since the question is not tagged with jQuery, you should provide a solution without it.
comment on: http://stackoverflow.com/a/26284033
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41079954
has text: Okey, so I can just write: alertify.alert("alerttext", functionIWantToCall())?
comment on: http://stackoverflow.com/a/26197527
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26330974
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/26330910
has body: For your purposes, hitting a restful API will be very similar to interacting with a server via regular AJAX. The difference is that this API will conform to the restful model, where various CRUD-like operations will conform to REST's particular pattern of using specific HTTP verbs [GET, PUT, POST, DELETE] and also its pathing model of referring to an entity. Have a look: http://www.restapitutorial.com/lessons/httpmethods.html If you want to have a play with a restful API, there's a few frameworks out there where you can spin up your in a few minutes. I'd probably use Sinatra for this; although there many options: http://www.andrewhavens.com/posts/20/beginners-guide-to-creating-a-rest-api/ Just google "restful api example [your server-side language of choice]; there's a lot of material out there. In short order you'll want to explore how cross server side scripting is done with a restful API, and how to use JSONP: http://www.ibm.com/developerworks/library/wa-aj-jsonp1/
type: Answer
score: 2

utf-8
tags question: http://stackoverflow.com/q/26270508
tag name: utf-8
type: Tag

http://stackoverflow.com/comment/41359591
comment on: http://stackoverflow.com/q/26349260
type: QuestionComment
type: Comment
has text: You will need to understand how asynchronous responses work in javascript. The answer that your question is marked a duplicate of contains a lot of helpful explanation about dealing with asynchronous repsonses. It's about an Ajax call, but the exact same info applies to your situation.
score: 0

http://stackoverflow.com/comment/41216366
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26270959
has text: You need to check you http server rewrite rules or your php url rewriter (if u have one). 404 error mean that http://www.somesite.com/admin/exportToCSVAction is unreachable
score: 0

http://stackoverflow.com/comment/41156623
has text: is there a tutorial anywhere on how to convert the data to readable html for JS? A user on here helped me write this php code, and it works fine for manual-refresh. I'd like to utilize AJAX.
comment on: http://stackoverflow.com/a/26229143
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26325339
has body: &lt;input type="file" id="uploadfile" name="uploadfile" /&gt; &lt;input type="button" value="upload" onclick="upload()" /&gt; &lt;script&gt; var client = new XMLHttpRequest(); function upload() { var file = document.getElementById("uploadfile"); /* Create a FormData instance */ var formData = new FormData(); /* Add the file */ formData.append("upload", file.files[0]); client.open("post", "/upload", true); client.setRequestHeader("Content-Type", "multipart/form-data"); client.send(formData); /* Send to server */ } /* Check the response status */ client.onreadystatechange = function() { if (client.readyState == 4 &amp;&amp; client.status == 200) { alert(client.statusText); } } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/26324956
score: 0

http://stackoverflow.com/a/26356253
answers question: http://stackoverflow.com/q/26328123
downvote count: 0
type: Answer
has body: You can use an XPath: var rootXE = app.activeDocument.xmlElements.item(0); var tagXEs = rootXE.evaluateXPathExpression("//*[starts-with(local-name(),'image')]");
score: 1
upvote count: 1

http://stackoverflow.com/q/26220668
type: UnansweredQuestion
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/26221849
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26223574
has body: I have just started experimenting with the angular-ui-router from github to use states instead of the mess that is routing. I have written a controller and included it in all my bundled files, html, etc. However, when I navigate to the page on my localhost, it throws the following error in the chrome console: "Error: [ng:areq] Argument 'WeatherCtrl' is not a function, got string". The following is my angular code: Kr.controller("WeatherCtrl", ['ui.state']) .config(['$stateProvider', function($stateProvider) { var weather = { name: 'weather', url: '/nws', abstract: true, templateUrl: 'partials/webtools/nws/weatherDefault.html' }; var smallWeather = { name: 'smallWeather', url: '/nws/shortForecast', parent: weather, templateUrl: 'partials/webtools/nws/shortForecast' }; var mediumWeather = { name: 'mediumWeather', url: '/nws/mediumForecast', parent: weather, templateUrl: 'partials/webtools/nws/mediumForecast' }; var bigWeather = { name: 'bigWeather', url: '/nws/longForecast', parent: weather, templateUrl: 'partials/webtools/nws/longForecast' }; $stateProvider .state(weather) .state(smallWeather) .state(mediumWeather) .state(bigWeather); } ]); and this is the relevant html code: 6 to 10 Day Forecast 8 to 14 Day Forecast Three Month Outlook Please select a Forecast Type using the buttons above Curiously enough, the paragraph element will display when the page has the state 'weather', but I can't be sure if this is because ui-sref is being ignored and the paragraph simply inserting itself as an independent element. Also, I do recognize that the angular app has slightly funky syntax, but it seems correct according to the latest documentation of angular-ui-router. Thanks in advance for any assistance!
has title: Angular Controller involving 'ui.state' throws error: Argument 'Controller' is not a function, got string
tagged with: angularjs

http://stackoverflow.com/comment/41140693
score: 0
comment on: http://stackoverflow.com/q/26218467
type: Comment
type: QuestionComment
has text: The simples answer is that your endpoint is incorrect, maybe the callback parameter is missing (url.of.my.server?callback=?), please provide more information

http://stackoverflow.com/q/26228855
score: 1
has comment: http://stackoverflow.com/comment/41138771
has answer: http://stackoverflow.com/a/26229143
has comment: http://stackoverflow.com/comment/41138904
has comment: http://stackoverflow.com/comment/41138727
type: Question
has comment: http://stackoverflow.com/comment/41138850
has title: Automatically update with AJAX
has comment: http://stackoverflow.com/comment/41139639
has answer: http://stackoverflow.com/a/26229010
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41138750
answer count: 3
has answer: http://stackoverflow.com/a/26228928
upvote count: 1
tagged with: setinterval
favorite count: 0
has body: I'm currently using this code on my webpage: <?php $url = "https://www.toontownrewritten.com/api/invasions"; $data = json_decode(file_get_contents($url)); if (!empty($data->invasions)) { echo " Invasion Tracker "; $i = 0; foreach($data->invasions as $title => $inv) { print " District: {$title} Cog: {$inv->type} Progress: {$inv->progress} "; if (count(($data->invasions) > 1)) { if (end($data->invasions) !== $inv) { print " "; } else { print " "; } } } } else { echo " No invasions!"; } ?> I'm looking to make it refresh every 10 seconds via AJAX. However, I keep reading you need to make a function, but I'm not sure how I'd do that with the API? Every 10 seconds, that API is being updated, which is why I'd like this to be updated with AJAX every 10 seconds. Currently, I have it so the user has to manually refresh. Any help is appreciated!
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41139778
linked to: http://stackoverflow.com/q/12038183
tagged with: php
has comment: http://stackoverflow.com/comment/41139286
has comment: http://stackoverflow.com/comment/41138769

http://stackoverflow.com/a/26295751
answers question: http://stackoverflow.com/q/26295665
has body: $.each($('.className'),function(index,value){ console.log(value); }) console.log('LENGTH : '+$('.className').length);
type: Answer
score: 0

http://stackoverflow.com/a/26332656
type: Answer
answers question: http://stackoverflow.com/q/26332366
has body: You should be able to echo the $basefile variable after the '=' for the javascript variable you wish to assign it to. This may be of some help: How to pass variables and data from PHP to JavaScript?
score: 0

http://stackoverflow.com/comment/41095694
type: AnswerComment
comment on: http://stackoverflow.com/a/26206229
type: Comment
has text: @john: You're missing a closing parenthesis in the first `if` condition. I'd recommend to use a halfway decent editor as well as proper JS debugging tools, like the developer consoles of FF and/or Chrome. This will save you a bunch of time in situations like this one.
score: 0

http://stackoverflow.com/comment/41167092
type: AnswerComment
score: 0
type: Comment
has text: This worked perfect. I then added $('.pause').click(function() { audioElement.pause(); }); to the playMusic function to create a way to stop what is playing. This will work great for a simple list that need to just play samples
comment on: http://stackoverflow.com/a/26243910

http://stackoverflow.com/comment/41253378
type: Comment
comment on: http://stackoverflow.com/q/26291389
score: 1
type: QuestionComment
has text: marking it as duplicate since the same concept applies here also... since the selector changes during runtime - http://jsfiddle.net/arunpjohny/6k2aemzu/1/

http://stackoverflow.com/q/26253305
has answer: http://stackoverflow.com/a/26253486
type: Question
possible better answer: http://stackoverflow.com/a/26253430
tagged with: javascript
has body: I have a form with some fields on. I am still learning Javascript. When my is submitted it triggers my JS which checks if the fields was submitted and then displays the errors in a which is done through innerhtml. Problem is it only display's the div for a few seconds and then finishes reloading the page and the div is not displayed anymore. function checkradio() { chosen = "" len = document.cv.Radio1.length for (i = 0; (i&lt;2); i++) { if (document.cv.Radio1[i].checked) { chosen = document.cv.Radio1[i].value } } if (chosen == "") { document.getElementById('error-1').innerHTML = "Please choose a type"; document.getElementById("Radio1").focus(); } }
score: 0
answer count: 3
tagged with: validation
has answer: http://stackoverflow.com/a/26253430
has answer: http://stackoverflow.com/a/26253407
accepted answer: http://stackoverflow.com/a/26253407
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10575273
tagged with: forms
has title: javascript form validation - reloading of page

http://stackoverflow.com/comment/41340720
type: QuestionComment
has text: don't use `.live()`, it is deprecated now. Use `.on()` instead
score: 1
comment on: http://stackoverflow.com/q/26339215
type: Comment

http://stackoverflow.com/comment/41313853
score: 0
has text: http://stackoverflow.com/questions/454202/creating-a-textarea-with-auto-resize might help.
comment on: http://stackoverflow.com/q/26324667
type: Comment
type: QuestionComment

drupal
type: Tag
tags question: http://stackoverflow.com/q/26269395
tag name: drupal
tags question: http://stackoverflow.com/q/26330749

http://stackoverflow.com/q/26326099
linked to: http://stackoverflow.com/q/25555960
tagged with: href
has body: I want to filter only the a's that are really shown currently in the browser. I used getBoundingClientRect function, but there are still some cases that I can't filter - like hidden or covered a tags. Is there a more generic way in pure javascript to know exactly what are the a tags that are really shown currently and the user really can see? I need it for my chrome extension that uses these tags. So if there is a way to do it using chrome extension API it is a good solution too. But Mostly the problem is li tags where not all the elements inside the list are shown. How can I know what elements are shown and what not? Thanks!
score: 0
has title: generic way to check if tag is shown in the browser
has comment: http://stackoverflow.com/comment/41318088
answer count: 0
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41317787
has comment: http://stackoverflow.com/comment/41317228
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41316834

http://stackoverflow.com/q/26229222
has comment: http://stackoverflow.com/comment/46851692
downvote count: 0
has title: What is exactly define(function(require){...}) in JavaScript
has answer: http://stackoverflow.com/a/77770224
favorite count: 0
possible better answer: http://stackoverflow.com/a/77770224
linked to: http://stackoverflow.com/q/10331305
tagged with: requirejs
has answer: http://stackoverflow.com/a/26229340
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41139740
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/41139475
type: Question
tagged with: requirejs-define
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26229340
has body: I understand that define is used to define a module, and function is an anonymous function, but what does the argument 'require' in the function hold? If I write anything in define(function(require){...}), when will this be called? How to give a call to his anonymous function? Please help, I am new to advanced JS.
answer count: 2
tagged with: require

http://stackoverflow.com/a/26252208
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/26252164
downvote count: 0
type: Answer
has body: You can just set the scrollTop value of the other to match. That will cause it to scroll a desired amount. That's how you scroll something. It won't cause it to scroll by trying to trigger a scroll event. A scroll event is an indicator of some scroll motion, not something that causes scroll motion. If using jQuery, you can use .scrollTop() to retrieve the current value of the scroll or .scrollTop(val) to set the amount of scroll.

ember.js
tags question: http://stackoverflow.com/q/26224586
tags question: http://stackoverflow.com/q/26320282
tags question: http://stackoverflow.com/q/26287415
tags question: http://stackoverflow.com/q/26321230
tags question: http://stackoverflow.com/q/26215958
tags question: http://stackoverflow.com/q/26284399
tags question: http://stackoverflow.com/q/26230172
tags question: http://stackoverflow.com/q/26282075
tags question: http://stackoverflow.com/q/26266784
tags question: http://stackoverflow.com/q/26297464
tags question: http://stackoverflow.com/q/26286320
type: Tag
tags question: http://stackoverflow.com/q/26305498
tags question: http://stackoverflow.com/q/26226017
tag name: ember.js
tags question: http://stackoverflow.com/q/26210995
tags question: http://stackoverflow.com/q/26219239
tags question: http://stackoverflow.com/q/26293494
tags question: http://stackoverflow.com/q/26266138
tags question: http://stackoverflow.com/q/26283667
tags question: http://stackoverflow.com/q/26205943
tags question: http://stackoverflow.com/q/26199681
tags question: http://stackoverflow.com/q/26256582
tags question: http://stackoverflow.com/q/26212492
tags question: http://stackoverflow.com/q/26263213
tags question: http://stackoverflow.com/q/26242986
tags question: http://stackoverflow.com/q/26234507
tags question: http://stackoverflow.com/q/26349965
tags question: http://stackoverflow.com/q/26267277
tags question: http://stackoverflow.com/q/26306414
tags question: http://stackoverflow.com/q/26247333
tags question: http://stackoverflow.com/q/26344276
tags question: http://stackoverflow.com/q/26291834
tags question: http://stackoverflow.com/q/26246066
tags question: http://stackoverflow.com/q/26197846
tags question: http://stackoverflow.com/q/26210054

http://stackoverflow.com/comment/41322161
type: AnswerComment
comment on: http://stackoverflow.com/a/26320100
score: 0
type: Comment
has text: ...can I mix promise libraries? I'm pretty comfortable with the use of $q and it seems like all I really need is the .settle(), could I implement bluebird just for that part and go back to using $q?

http://stackoverflow.com/a/26217883
has body: I would suggest not using align justify in the span as a class - just display the glyphicon and then justify it in an outside div. here is some more info - http://getbootstrap.com/components/#glyphicons-how-to-use
has comment: http://stackoverflow.com/comment/41117232
score: 0
answers question: http://stackoverflow.com/q/26217701
type: Answer
has comment: http://stackoverflow.com/comment/41117267

http://stackoverflow.com/q/26232907
has body: I'm doing a check to see if an image has got a url source. // HTML (short version) &lt;div id="image-drop-box"&gt; &lt;img class="promo-img hidden" title="Promo image" src=""&gt; &lt;/div&gt; //JS var promoImg = $('#image-drop-box .promo-img'); var missingImg = promoImg.prop('src').length == 0 ? true : false; console.log(promoImg.prop('src').length); console.log(promoImg.prop('src')); All tough the img source is empty, it keeps returning the browser URL. Why is that? See the jsFiddle here.
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26232955
score: 1
has comment: http://stackoverflow.com/comment/41145431
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Why am I getting the browser URL when I try to get the img src?
has answer: http://stackoverflow.com/a/26233184
favorite count: 0
has answer: http://stackoverflow.com/a/26233075
has answer: http://stackoverflow.com/a/26232965
accepted answer: http://stackoverflow.com/a/26232965
answer count: 5
possible better answer: http://stackoverflow.com/a/26232955
has answer: http://stackoverflow.com/a/26232952

http://stackoverflow.com/q/26266657
has title: Unable to run selenium WebDriver JavaScript bindings
tagged with: javascript
score: 0
answer count: 1
has body: I'm currently using the selenium binding for python and would like to evaluate the JavaScript binding but am stuck with the sample application! As I cannot seem to understand, what's wrong in this example, any help would be appreciated. my package.json file looks like this: { "name": "selenium_tests", "version": "0.0.0", "repository": {}, "devDependencies": { "mocha": "^1.21.4", "selenium-webdriver": "^2.43.5" } } my script looks like this: var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder(). withCapabilities(webdriver.Capabilities.firefox()). build(); driver.get('http://www.google.com'); driver.findElement(webdriver.By.name('q')).sendKeys('webdriver'); driver.findElement(webdriver.By.name('btnG')).click(); driver.wait(function () { 'use strict'; return driver.getTitle().then(function (title) { return title === 'webdriver - Google Search'; }); }, 1000); driver.quit(); and the error stack when running it is as follows: D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:1745 throw error; ^ Error: Wait timed out after 1039ms at D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:1412:29 at D:\selenium_node\node_modules\selenium-webdriver\lib\goog\base.js:1582:15 at webdriver.promise.ControlFlow.runInNewFrame_ (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:1640:20) at notify (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:444:12) at then (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:497:7) at Object.webdriver.promise.asap (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:749:11) at newFrame.then.e (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:1656:25) at D:\selenium_node\node_modules\selenium-webdriver\lib\goog\base.js:1582:15 at webdriver.promise.ControlFlow.runInNewFrame_ (D:\selenium_node\node_modules\selenium-webdriver\lib\webdriver\promise.js:1640:20) at…
accepted answer: http://stackoverflow.com/a/26292509
tagged with: node.js
type: AnsweredQuestion
tagged with: selenium
tagged with: webdriver
type: Question
has answer: http://stackoverflow.com/a/26292509

http://stackoverflow.com/a/26269081
answers question: http://stackoverflow.com/q/26269054
type: Answer
downvote count: 0
score: 1
has body: you should have global temp.replace(/[\/]+/g, '/')
upvote count: 1

http://stackoverflow.com/a/26270273
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41218141
has comment: http://stackoverflow.com/comment/41214954
answers question: http://stackoverflow.com/q/26270215
upvote count: 1
type: Answer
has body: I think it depends on browser support, If browser is support to view file then you can see file in browser and click save button to download it, otherwise, the browser will prompting a dialog box.

http://stackoverflow.com/comment/41124796
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26218472
has text: yes was missing, but you understood my problem, thank you anyway! problem solved with first answer

http://stackoverflow.com/comment/41355579
has text: `ng-selected` is a attribute to use on ` ` elements, not on ` `. With `ng-selected`, you can make a certain option "selected". It doesn't save the selection to a scope variable.
comment on: http://stackoverflow.com/a/26341841
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41268154
score: 0
type: AnswerComment
has text: I doesn't work first, because i have had an other error: javascriptvariable was a string and not an array, so i use nwo JSON.parse and everything works! ;)
type: Comment
comment on: http://stackoverflow.com/a/26298452

http://stackoverflow.com/a/26337775
answers question: http://stackoverflow.com/q/26258235
type: Answer
has body: Problem solved: $('.editable').editable('option','display', function (value, sourceData) { this.innerHTML = value; });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26258235
score: 0

http://stackoverflow.com/q/26255623
has answer: http://stackoverflow.com/a/26256215
has body: I use code from: https://github.com/ParsePlatform/Todo/blob/master/js/todos.js it has error on line: 405 new AppView; "TypeError: undefined is not a function" I try to debug from javascript console with new Parse.View; and get the same error
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41254900
has comment: http://stackoverflow.com/comment/41187161
score: 0
answer count: 1
tagged with: parse-platform
has title: new Parse.View and get "TypeError: undefined is not a function"
type: UnansweredQuestion

http://stackoverflow.com/comment/41226647
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26277092
has text: Can the value of the elements (#to, #from, #CustomerID, #status) change or does it remain the same after page load?

http://stackoverflow.com/q/26293546
score: 0
answer count: 3
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/26295907
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41258294
tagged with: requirejs
accepted answer: http://stackoverflow.com/a/26294135
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/45504329
has comment: http://stackoverflow.com/comment/41257421
type: Question
has answer: http://stackoverflow.com/a/26294135
has title: AngularJS + RequireJS not working
has body: I am using AngularJS with RequireJS. NEW QUESTION: RequireJS does not load any controllers. I am using this tutorial. OLD QUESTION: RequireJS loads the main.js file, the bootstrap.min.js file and jQuery. This works good. But it does not load angular for some reason. I am using chrome, and in the developer tools tab "network" there are only the 3 files mentioned above loaded. console.log(typeof angular); equals to undefined. ( I have tried that in the developer console ) There is no error message shown in the console! SOLUTION: I fixed it by adding 'angular' to the deps array. My main.js code is: // Require JS Configuration require.config({ // Code format changed // alias library paths paths: { 'jquery': '../bower_components/jquery/dist/jquery.min', 'domReady': '../bower_components/requirejs-domready/domReady', 'angular': '../bower_components/angular/angular.min', 'angular-route': '../bower_components/angular-route/angular-route.min', 'ngFx': '../bower_components/ngFx/dist/ngFx.min', 'angular-ui-router': '../bower_components/angular-ui-router/release/angular-ui-router.min', 'bootstrap': '../bower_components/bootstrap/dist/js/bootstrap.min' }, // angular does not support AMD out of the box, put it in a shim shim: { 'angular': { exports: 'angular' }, 'angular-route': { deps: [ "angular" ] }, 'ngFx': { deps: [ "angular" ] }, 'angular-ui-router': { deps: [ "angular" ] }, 'bootstrap': { deps: [ "jquery" ] } }, // Kick start application deps: [ './bootstrap', 'domReady', 'angular', 'angular-route', 'ngFx', 'angular-ui-router', 'bootstrap' ] }); My bootstrap.js file: define([ 'require', 'angular', 'app', 'routes' ], function (require, ng) { 'use strict'; require(['domReady!'], function (document) { ng.bootstrap(document, ['app']); }); }); My app.js file: define([ 'angular', './controllers/index', './directives/index', './filters/index', './services/index' ], function (ng) { 'use strict'; return ng.module('app', [ 'app.services', 'app.controllers', 'app.filters', 'app.direct…
tagged with: javascript
has answer: http://stackoverflow.com/a/26295907

http://stackoverflow.com/comment/41317310
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26321911
has text: That was my thought too, but nodes appear to be internal representations of DOM elements rather than something I can call getComputedStyle on. I also tried node.$ and a few other things.
score: 0

youtube
tags question: http://stackoverflow.com/q/26331503
tags question: http://stackoverflow.com/q/26340590
tags question: http://stackoverflow.com/q/26342288
type: Tag
tag name: youtube
tags question: http://stackoverflow.com/q/26273066
tags question: http://stackoverflow.com/q/26254684
tags question: http://stackoverflow.com/q/26226182
tags question: http://stackoverflow.com/q/26245049
tags question: http://stackoverflow.com/q/26320669

http://stackoverflow.com/comment/41280802
type: AnswerComment
type: Comment
has text: Thanks! I don't know why, but this package is working and the others are not. <3
score: 2
comment on: http://stackoverflow.com/a/26306169

http://stackoverflow.com/a/26253015
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26213425
score: 1
accepted answer of: http://stackoverflow.com/q/26213425
type: AcceptedAnswer
downvote count: 0
has body: I solved the problem with this code, I hope can help other people regards Alberto

http://stackoverflow.com/q/26208741
has title: express4.2.0 session is undefined
tagged with: session
type: Question
answer count: 1
tagged with: javascript
tagged with: express
score: 0
tagged with: undefined
tagged with: node.js
has answer: http://stackoverflow.com/a/26208790
accepted answer: http://stackoverflow.com/a/26208790
type: AnsweredQuestion
has body: I am finding a trouble to set a session with node.js using express4.2.0 I show you my code and after I comment: APP.js var express = require('express'); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var cookieSession = require('cookie-session'); var mainModel = require('./model/main_model'); var users = require('./routes/users'); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(favicon()); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded()); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use(cookieSession({ keys: ['secret1', 'secret2'] })); app.use('/users', users); /*Evething that express makes automatically*/ app.listen(8080); USERS.js var express = require('express'); var router = express.Router(); router.get('/', function(req, res) { if(req.cookie &amp;&amp; req.cookie.user) res.send("COOKIE"); else if(req.session &amp;&amp; req.session.user) res.send("SESSION"); else res.render('users/new_user', {title:"NEW USER"}); }); /*there is more content... but not relevant. */ function makeTheUserSession(result, res) { result['go'] = '/users'; //res.session.user = result.result[0]; //res.cookie('user', result.result[0]); res.send(result); } The function makeTheUserSession is call from the method post of '/users' (to find a users on the data base). If I uncomment the res.session.user line, when I invoque makeTheUserSession the app breaks, stop, capito, dead (Cannot set property 'user' of undefined)... If I uncomment the res.cookie('user', result... line, when I invke the function, and after I see the browser cookies on the settings I found a cookie called user with the values of result.result[0]... but after on the get method it doesn´t works how I expect... res never sends me "COOKIE". I had sawn the same question many tim…

http://stackoverflow.com/comment/41202771
type: QuestionComment
comment on: http://stackoverflow.com/q/26263701
has text: The Date object doesn't have a format. That format you see is just a string representation of the Date object. You can format the `StartDate` obejct the same exact way you format the `EndDate` object.
score: 0
type: Comment

http://stackoverflow.com/a/26227535
has comment: http://stackoverflow.com/comment/41136800
has comment: http://stackoverflow.com/comment/41136896
answers question: http://stackoverflow.com/q/26227142
has comment: http://stackoverflow.com/comment/41137122
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41136471
has body: Other answer is not relevant, I didn't notice it was FancyBox. A similar question was posted here, here and here. As @JFK sated in the first link you could use the data-, prefix to an attribute of image to hold the caption information. And access it with a jquery script. . . . your demo and the script would be: $(document).ready(function() { $(".fancybox").fancybox({ helpers : { title: { type: 'inside'} }, // use the following if you want to do the caption before the image // beforeShow : function(){ afterLoad: function(){ this.title = this.title + ' ' + $(this.element).data("caption"); //you can also do the following to use the alt instead of the caption //this.title = this.title + ' ' + $(this.element).find('img').attr('alt'); } }); // fancybox }); // ready
has comment: http://stackoverflow.com/comment/41152647

http://stackoverflow.com/comment/41293267
score: 0
type: Comment
has text: hello bojan , the solution is great but still one thing this script is not providing is that making different iframe structure for different button click , each button is loading a different iframe , but the size of iframe too must be different for both the button , for eg. for the first button click the ifram should load with width = 500 and height = 400 , but for the next button click it should be widht = 650 and height = 350
comment on: http://stackoverflow.com/a/26253115
type: AnswerComment

http://stackoverflow.com/comment/41154153
type: Comment
comment on: http://stackoverflow.com/q/26237586
score: 0
type: QuestionComment
has text: what do you get if you type `$` in the browser console?

http://stackoverflow.com/a/26253430
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: You need to add e.preventDefault(); for avoiding the default behavior. Hence, if validation fails, the form won't be submitted.
answers question: http://stackoverflow.com/q/26253305

http://stackoverflow.com/comment/41164942
comment on: http://stackoverflow.com/q/26243083
score: 4
type: Comment
type: QuestionComment
has text: `0*0.14` is always `0`

http://stackoverflow.com/q/26329321
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26329371
downvote count: 0
favorite count: 0
upvote count: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26329410
has body: I need to send a form from HTML5-coded page using Ajax and jQuery. I don't know how to send parameters from a form to Ajax and jQuery correctly. How to send it correctly? My application must get the user's tweets(from tweet.com), user_id and tweets amound are parameters, which must be entered to the form. (This is a title) Page example using HTML5 Page header Enter user_id: Enter user last tweets amount: From date: To date: Page bottom
has answer: http://stackoverflow.com/a/26329410
has answer: http://stackoverflow.com/a/26329371
has title: Sending form using HTML5, Ajax and jQuery

http://stackoverflow.com/q/26313790
has comment: http://stackoverflow.com/comment/41330502
has comment: http://stackoverflow.com/comment/41316312
has answer: http://stackoverflow.com/a/26314367
tagged with: javascript
type: UnansweredQuestion
tagged with: hottowel
tagged with: azure
has title: How to set Default page in Angular
linked to: http://stackoverflow.com/q/25271758
tagged with: angularjs
type: Question
tagged with: url-routing
has body: I am getting an error when I request the link with this URL: http://xxx:46630/ or with this http://crmbyzaid.azurewebsites.net/ But it is working good when I add '/index.html' with URL. Now I want to set the Default render of my partial page "app/dashboard/dashboard.html" when I request with just http://crmbyzaid.azurewebsites.net/ My code of config-route.js is function routeConfigurator($routeProvider, routes) { routes.forEach(function (r) { $routeProvider.when(r.url, r.config); }); $routeProvider.otherwise({ redirectTo: '/' }); } function getRoutes() { return [ { url: '/', config: { templateUrl: 'app/dashboard/dashboard.html', title: 'dashboard', settings: { nav: 1, content: '&lt;i class="fa fa-dashboard"&gt;&lt;/i&gt; Dashboard' } } }, { url: '/admin', config: { title: 'admin', templateUrl: 'app/admin/admin.html', settings: { nav: 1, content: '&lt;i class="fa fa-lock"&gt;&lt;/i&gt; Admin' } } } ] }
answer count: 1
score: 0

http://stackoverflow.com/q/26290084
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41251147
has title: create a jquery dialog for 'customer' creation/edit that can be used on more than one page
score: 0
has body: So, like the title says I'm trying to figure out how to define a modal dialog that will update or create customers. And then I can show it on the orders page or other pages simply by calling it... I'm new to JavaScript but not to programming. In windows app I would create a class that I could call and show to the user but I'm not sure how to do that in js. I've figured out how to use the modal dialog with a div and with an iframe but making it usable on multiple pages is eluding me. Please help, Thanks, Dave Edit: I don't want to use an iframe since I would like yo be able to access fields both ways from the page to the dialog and back again. Edit 2: So (remember im new to this)... I created the main page (default.aspx) and a customer page (customer.html) and a customer single instance module (customer.js). From default.aspx I load up the customer module, add an event handler for the "loaded" custom event i created, and it works, loads the data in the form. Then I open the customer dialog, it works, dialog loads its own data from the customer module, however, when i click the save button in the dialog, the data is saved properly but the customer module after saving fires a "datasaved" event and its not getting caught on default.aspx... can you see anything wrong with this?? this web site was picky as to what i can paste in here so let me know if something got missed... default.aspx common.js `var webserviceBaseUrl = '/WebService.asmx/'; var websiteBaseUrl = '/'; if (!('contains' in String.prototype)) { String.prototype.contains = function (str, startIndex) { if (startIndex == undefined) startIndex = 0; return ''.indexOf.call(this, str, startIndex) !== -1; }; } if (!('contains' in Array.prototype)) { Array.prototype.contains = function (arr, startIndex) { if (startIndex == undefined) startIndex = 0; return ''.indexOf.call(this, arr, startIndex) !== -1; }; } Date.prototype.toDateTimeLocal = (function () { var now = new Date(this); var month = (now.getMonth() + 1); var…
has comment: http://stackoverflow.com/comment/41251061
possible better answer: http://stackoverflow.com/a/26290340
has answer: http://stackoverflow.com/a/26290340
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41251084
tagged with: dialog
has answer: http://stackoverflow.com/a/26382873
accepted answer: http://stackoverflow.com/a/26382873
type: Question
answer count: 2

http://stackoverflow.com/a/26353515
answers question: http://stackoverflow.com/q/26353422
has comment: http://stackoverflow.com/comment/41373212
score: 1
has body: Do you mean like this: http://jsfiddle.net/L3gh6heg/ ? Textarea Hidden Part $("#c_text").focusin(function () { $("#hidden_part").show(); }); $("#c_text").focusout(function () { $("#hidden_part").hide(); }); focusin detects when an element gains focus and focusout detects when an element loses focus. jQuery also allows you to call show and hide on elements which is probably easier to use than manually setting the css.
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41368174
has comment: http://stackoverflow.com/comment/41366741
downvote count: 0

http://stackoverflow.com/comment/41152438
type: AnswerComment
comment on: http://stackoverflow.com/a/26234007
score: 0
has text: Jssor, It doesnt show caption for other thumbnails for some reason and how can i show caption without any effect, Just fade effect. I also tried to play with teh class of Caption so that i can put the second caption under the first caption but nothing works.
type: Comment

http://stackoverflow.com/a/30126259
score: 2
upvote count: 2
has body: Per Raymond Camden from earlier this year, this isn't possible with the cordova=file-plugin: http://www.raymondcamden.com/2015/01/21/phonegapcordova-tip-working-with-files-under-www-and-android - First and foremost, you cannot use the File system APIs to work with files under the www folder. The docs for the File plugin incorrectly states that you have Read access to the application directory (which would contain www) but that is incorrect. But there are several directories that you do have access to using the file plugin. Here's some sample code to retrieve the contents of a few of them: https://stackoverflow.com/a/29905718/346550
downvote count: 0
answers question: http://stackoverflow.com/q/26282357
type: Answer

http://stackoverflow.com/q/26197206
score: 0
answer count: 1
has title: How can I disable a subset of buttons which were created using ng-repeat in AngularJS?
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26197396
type: Question
has comment: http://stackoverflow.com/comment/41079298
tagged with: javascript
has answer: http://stackoverflow.com/a/26197396
has body: I am trying to build a quiz web application using AngularJS. The quiz questions are structured like this: $scope.quiz = [ { 'q': 'For what period would archaeologists first begin to find permanent human settlements?', 'options': [{ 'value': 'The Paleolithic'} , { 'value': 'The Classical Era'} , {'value' : 'The Bronze Age'} , { 'value': 'The Neolithic'}], 'answer': 'The Neolithic', 'difficulty': 2 }, { 'q': 'Which of the following civilizations shares the most in common with the Harappan civilization found in the Indus River Valley?', 'options':[{ 'value': 'The Mogul Empire in India'} , { 'value': 'The Tokugawa Shogunate in Japan'} , {'value' : 'The Olmec civilization in Mesoamerica'} , { 'value': 'The Athenian city- state in ancient Greece'}], 'answer': 'The Olmec civilization in Mesoamerica', 'difficulty': 6 }, { 'q': 'Identify the important original contribution of the Hebrew culture to the civilizations in the Middle East and Mediterranean during the Classical Period.', 'options':[{ 'value': 'Monotheism'} ,{ 'value': 'Written legal code'} , {'value' : 'Phonetic alphabet'} , { 'value': 'Priest caste'}], 'answer': 'Monotheism', 'difficulty': 5 }, { 'q': 'Confucianism established political and social systems in China while what other philosophy contributed significantly to China’s medical practices and art and architecture?', 'options':[{ 'value': 'Legalism'} ,{ 'value': 'Shintoism'} , {'value' : 'Hinduism'} , { 'value': 'Daoism'}], 'answer':'Daoism', 'difficulty': 3 } ]; I use nested ng-repeat's to show the questions and options for each question: &lt;div class='question' ng-repeat='question in quiz | orderBy: difficulty' value='{{$index}}'&gt; &lt;h3&gt;{{$index+1}}. {{question.q}}&lt;/h3&gt; &lt;button type='button' class='btn btn-default btn-block' ng-repeat='option in question.options' ng-click='submitOption(option.value, question.answer, question.q)' ng-disabled='' ng-data='{{question.q}}'&gt; &lt;input type='checkbox'&gt; &lt;strong&gt;{{option.value}}&lt;/st…

http://stackoverflow.com/a/26341314
answers question: http://stackoverflow.com/q/26340681
downvote count: 1
has comment: http://stackoverflow.com/comment/41346513
score: -1
upvote count: 0
has body: I try to write your script in jQuery, and i try remove useless loop. I hope my script no change the behavior of your script: find h3 element with userinout var inside text and remove it form DOM (during the loop or after), if no one was matched script fire an alert. VER.1 var userinput = userinput.toLowerCase(), flag = false; //select and loop all H3 (with jQuery) $("h3").each(function(){ //if text inside H3 match with userinput if($(this).text().indexOf(userinput) &gt;= 0){ //add class matched to the matched element $(this).addClass("matched"); //flat to true flag = true; } }); //check flag (if true remove al matched element) if(flag)$("#overzicht_list .matched").remove(); else alert("No match found!"); or, next script is the same, but remove directly the matched element inside first loop: VER.2 var userinput = userinput.toLowerCase(), flag = false; $("h3").each(function(){ if($(this).text().indexOf(userinput) &gt;= 0){ //directly remove matched element $(this).remove(); flag = true; } }); //if no one matched alert if(!flag) alert("No match found!"); ... right now you not have matches variable because it is useless, when you remove elements form DOM, you remove them references inside matches.
type: Answer

http://stackoverflow.com/a/26217570
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26217498
type: Answer
has body: You should create an HTML string and append that all at once after the loop. Also use a common class so you only need 1 handler! var buttonList = ""; for(i=1;i&lt;=10;i++){ buttonList += '&lt;input type="button" id="btn_id'+i+'" class="button-list" value="button#'+i+'"&gt;'; } $('.btn_tableform').append(buttonList); $(".button-list").click(function() { alert(this.value); });
accepted answer of: http://stackoverflow.com/q/26217498
score: 0

http://stackoverflow.com/q/26282685
has answer: http://stackoverflow.com/a/26282954
score: 1
has comment: http://stackoverflow.com/comment/41237147
tagged with: javascript
has title: if statement in jQuery not working in Chrome or Safari
has body: I have the following code that is working in IE 8 but not in Chrome or Safari: $(document).ready(function(){ $('.goRedIMG').on('click',function(event){ var ischecked = false; var isOKtoSubmit = true; var alertMessage = 'No tools have been selected'; var statusvar = ''; var transferstatusvar = ''; var action = $('#uTransaction option:selected').html(); $('.chkaction').each(function() { //loop through each checkbox statusvar = $(this).closest('tr').children('.recordStatus').html(); transferstatusvar = $(this).closest('tr').children('.transferstat').html() if($(this).prop('checked')) { ischecked = true; //alert(action); // alert(statusvar); // alert(transferstatusvar); if (action == 'Recover'){ if (statusvar != 'OOS'){ // alert(statusvar); isOKtoSubmit = false; alertMessage = 'One or more records cannot be recoverd due to status not being OOS and Transfer Status not OK'; } } if(isOKtoSubmit &amp;&amp; ischecked !== false &amp;&amp; action !== '--Select One--'){ $('#toolActions').submit(); }else { alert(alertMessage); } }); If a user chooses Recover and chooses a record that has a status that is in 'OOS' they are getting the alert message in Chrome that the record does not have the correct status. In IE if you choose the same record the alert message does not appear and that would be correct.
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41237192
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26282954
has comment: http://stackoverflow.com/comment/41237397
has comment: http://stackoverflow.com/comment/41237196
type: AnsweredQuestion
upvote count: 1
tagged with: google-chrome
type: Question

http://stackoverflow.com/comment/41104904
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26210801
type: Comment
has text: In some old android, it display the image from gallery only. Android 4.4 doesn't display any. Also if i put the same web page locally, I can display both the image correctly without any issue. The only problem is when I host the page remotely

http://stackoverflow.com/a/26355016
has body: You need to use event-delegation on dynamically created elements $(document).on('keypress','.enter_popup',function(){ /*Your code*/ });
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26342690
answers question: http://stackoverflow.com/q/26342690
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4

http://stackoverflow.com/a/26343196
downvote count: 0
upvote count: 6
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26343171
has body: Non-empty strings in JavaScript are truthy. 'captchaTest + captchaInput = 10', when evaluated as Boolean, is true. You need to remove the quotation marks and change = to ==: if (captchaTest + captchaInput == 10)
accepted answer of: http://stackoverflow.com/q/26343171
type: Answer
score: 6

http://stackoverflow.com/comment/41361776
comment on: http://stackoverflow.com/a/26313017
score: 0
type: AnswerComment
has text: So I have tried to implement this solution, using: onload="noBFC()" Then, generating a random number. I cannot figure out how to get this script to run just once. I tried saying: if (window.location == myurl.com){//Runs this script} But that just doesn't work at all.
type: Comment

http://stackoverflow.com/a/26286970
accepted answer of: http://stackoverflow.com/q/26286579
downvote count: 0
has comment: http://stackoverflow.com/comment/41276126
has comment: http://stackoverflow.com/comment/41276023
score: 4
type: AcceptedAnswer
has body: Yea tymeJV's answer works but in my opinion it's not ideal. (function(){ var inputCollection = document.getElementsByTagName("input"); for (var i = 0; i &lt; inputCollection.length; i++) { inputCollection[i].addEventListener("change", handleFunction , false); } })(); function handleFunction(event){ console.log("name: " + event.srcElement.name + ', value: ' + event.srcElement.value); } jsfiddle Getting the values off of the event.srcElement is much cleaner. Should be using the inputCollection only to assign the listener, not for output values.
answers question: http://stackoverflow.com/q/26286579
has comment: http://stackoverflow.com/comment/41275922
has comment: http://stackoverflow.com/comment/41276143
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41240503
has text: I will try `timeout`, but it seems like a hack. I'm really trying to get a better sense for the best way to solve the overall problem as I'm just learning Angular.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26284059

http://stackoverflow.com/comment/41330950
score: 0
type: Comment
type: QuestionComment
has text: So I just learned that the storage API is asynchronous... How can I modify my function to wait for the data, then return it?
comment on: http://stackoverflow.com/q/26333764

http://stackoverflow.com/q/26223957
upvote count: 2
has answer: http://stackoverflow.com/a/26224181
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41143714
score: 2
has answer: http://stackoverflow.com/a/26224176
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41129711
downvote count: 0
tagged with: javascript
has body: Here I have a login field, a password, username and login button. As you can see it is very verbose. Login Enter a valid email Enter a password Log in I am repeatedly using expressions of the kind ((form.username.$touched || form.$submitted) && form.username.$invalid) || showError Is there a smart way to minify the amount of code in this example? Is there any best practise?
favorite count: 0
has comment: http://stackoverflow.com/comment/41143680
has title: How to make the directives less verbose?
tagged with: twitter-bootstrap-3
tagged with: angularjs

http://stackoverflow.com/comment/41306038
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26318969
has text: No, because this selector is for attribute. and the only way to access the element's text via selector is :contains and :empty.
type: AnswerComment

http://stackoverflow.com/q/26339812
downvote count: 0
has body: I using express to build web app. I have problems with routes or static files. I added reference to static files: app.use(express.static(path.join(__dirname, 'public'))); and set routes: app.use('/', routes); app.use('/users', users); app.use('/blog', blog); In my blog router: var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { res.render('blog/index'); }); /* GET registration form. */ router.get('/registration', function(req, res) { res.render('blog/registration'); }); module.exports = router; So my problem: When I go to /blog my static files loading correctly (without blog in path). But when I go to /blog/registration I get error (with blog in path): GET /blog/stylesheets/css/bootstrap.min.css registration:1 GET /blog/stylesheets/lib/og-component.css registration:1 GET /blog/stylesheets/lib/venobox.css registration:1 GET /blog/stylesheets/lib/zocial.css registration:1 GET /blog/stylesheets/lib/font-awesome.css registration:1 GET /blog/stylesheets/lib/animate.css registration:1 GET /blog/stylesheets/css/style.css registration:1 GET /blog/stylesheets/css/scheme/light-blue.css registration:1 GET /blog/js/lib/modernizr.custom.js registration:1 GET /blog/images/jssolutions-logo.png 404 (Not Found) How I can fix this problem: load static files without blog in path: /stylesheets/css/bootstrap.min.css
tagged with: javascript
tagged with: express
favorite count: 0
possible better answer: http://stackoverflow.com/a/26339881
has answer: http://stackoverflow.com/a/26339881
tagged with: node.js
has comment: http://stackoverflow.com/comment/41341963
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26340003
has title: Load static files in express.js
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26340003
answer count: 2
has comment: http://stackoverflow.com/comment/41342304

http://stackoverflow.com/comment/41363347
comment on: http://stackoverflow.com/q/26351488
score: 0
type: Comment
type: QuestionComment
has text: don't want to include it twice? then don't include it twice

http://stackoverflow.com/a/26276321
score: 1
answers question: http://stackoverflow.com/q/26276169
has body: Use timers: var interval = 1000; function doPosts() { if (arr.length == 0) return; data = arr.pop(); request.post( 'http://localhost:3000/post', { form: { from: data[0], to: data[1]} }, function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(body) } } ); setTimeout(doPosts, interval); } doPosts();
upvote count: 2
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41198551
has text: Thanks. There you go. victoralexandre.fr/assemblee5.json
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26261035
type: Comment

http://stackoverflow.com/comment/41236442
score: 0
type: Comment
type: QuestionComment
has text: `monitorEvents(element, event)` for example, `monitorEvents(document.body)` however, there's an even better option: http://stackoverflow.com/questions/10213703/how-do-i-view-events-fired-on-an-element-in-chrome-web-developer
comment on: http://stackoverflow.com/q/26282239

http://stackoverflow.com/comment/41134979
score: 0
type: Comment
type: QuestionComment
has text: I'm using Chrome. I can't quite figure out what the difference would be between the two. A single button click seems to call the function twice though.
comment on: http://stackoverflow.com/q/26226875

http://stackoverflow.com/comment/41355560
has text: The expected output is in the question: `baz foobar`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26347038

http://stackoverflow.com/a/26245316
has comment: http://stackoverflow.com/comment/41208401
has body: I think you'd have to accomplish this in pieces. First replace the comma+space within quotations so it doesn't mess up your split operation. Here I've replaced the space with an underscore. str.replace(/(".*,)( )(.*")/g, '$1_$3'); // 'test@test.com, "Ragland Raja,_II" &lt;moses.jelsey@gmail.com&gt;, ' Then you just run a regular split operation: str.split(", "); // ["test@test.com", ""Ragland Raja,_II" &lt;moses.jelsey@gmail.com&gt;", ""] After that, go back and swap out the ,_ within quotes in each item. Here's the full code below. Solution var str = 'test@test.com, "Ragland Raja, II" &lt;moses.jelsey@gmail.com&gt;, '; str = str.replace(/(".*,)( )(.*")/g, '$1_$3'); var arr = str.split(", "); arr.forEach(function(el, i, array){ array[i] = el.replace(",_", ", "); }); // arr = ["test@test.com", ""Ragland Raja, II" &lt;moses.jelsey@gmail.com&gt;", ""]
accepted answer of: http://stackoverflow.com/q/26244568
score: 1
answers question: http://stackoverflow.com/q/26244568
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41280919
has comment: http://stackoverflow.com/comment/41280842
type: Answer
has comment: http://stackoverflow.com/comment/41208479

http://stackoverflow.com/comment/41234682
comment on: http://stackoverflow.com/a/26281411
has text: @Balder True... `toggle` though ;)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26336895
has body: 500 means there is a problem internal to the server. There's nothing you can do about that other than contact the people who run it and ask whats going on.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41336698
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26336849

http://stackoverflow.com/q/26298474
has answer: http://stackoverflow.com/a/26298561
score: 0
linked to: http://stackoverflow.com/q/3582671
has answer: http://stackoverflow.com/a/26299384
has body: Could you please tell me whether there is any way of reading and displaying the value from the text file using Javascript when I open the HTML page? The file is in the local system and it needs to be picked up automatically when the HTML page opens up and the result should be displayed in alert message as well as in the HTML page.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41266022
has comment: http://stackoverflow.com/comment/41265883
type: Question
has comment: http://stackoverflow.com/comment/41266093
duplicate of: http://stackoverflow.com/q/3582671
has comment: http://stackoverflow.com/comment/41265806
has title: Read Text file using Javascript
answer count: 2
has comment: http://stackoverflow.com/comment/41265839
tagged with: javascript

http://stackoverflow.com/comment/41216687
type: Comment
has text: There is a `site.posts_by_language`. check here: http://jekyll-langs.liaohuqiu.net/#variables
score: 1
comment on: http://stackoverflow.com/a/26270524
type: AnswerComment

http://stackoverflow.com/comment/41319177
has text: @rafaelcastrocouto: Your answer is exactly my third solution. Also, it's important to understand what the problem is.
comment on: http://stackoverflow.com/a/26327433
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26286257
has body: Assuming last_user_action is a global variable, that means it's actually a property of window and you can define a getter for that property. Object.defineProperty(window, 'last_user_action', { get: function() { return new Date().getTime(); } }); last_user_action; // 1412882205169 last_user_action; // 1412882206490 This would normally be a bad idea, but given you are hacking here, it doesn't seem so bad.
answers question: http://stackoverflow.com/q/26286183
type: Answer
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/comment/41345438
type: QuestionComment
has text: `now` is a string (Since you put in in quotes (`""`)). How can it possibly have a `Name` property?
score: 2
comment on: http://stackoverflow.com/q/26341650
type: Comment

http://stackoverflow.com/a/26290689
score: 0
has body: Yep, onclick takes a function - simply passing alert() will execute immediately. You need to do: button.onclick = function() { alert("Button has been pressed"); }
answers question: http://stackoverflow.com/q/26290660
type: Answer

http://stackoverflow.com/q/26330761
has comment: http://stackoverflow.com/comment/47296293
downvote count: 0
answer count: 1
has body: So it turns out that while you can animate the background-color of an element via jQuery UI, you cannot do the same for elements which use a background: linear-gradient() function as it is rendered as an image - you can however set linear gradients using jQuery's .css() method. Therefore a simple solution to this problem is to create a pseudo animation which rapidly sets the linear-gradient via the css method over 10-30 milliseconds each for a particular duration. With this, you can actually create linear gradient animations. Here's an example. I have done exactly this, but I'm encountering a problem. At the same time as I'm animating my linear gradients, I'm also animating another background-color with the same start and end values via the native jQuery animate() method, and these animations are not executing at the same time, despite specifying the duration as equal for both. The linear gradient animation is being started and completed visibly after the native jQuery animation, despite actually calling it slightly earlier in my code (about 4 lines). // Call to custom linear gradient animation animateGradient(RGBstartColor, RGBstopColor, 300); ... // Native jQuery animation $('#stage').animate({ backgroundColor: RGBstopColor }, 300, 'linear'); I wondered if it was an easing problem disguised as a time problem, but even when specifying the easing on the jQuery anim, it's still visible. Here's my code for animateGradient(): animateGradient = function(startString, stopString, duration) { // Convert an rgb() string to an array: [r, g, b] RGBStringToArray = function(string) { return string.substring(4, string.length-1).replace(/ /g, '').split(',') } // The looping function where the magic happens animationLoop = function() { diff = [parseInt(start[0]) + (diffStep[0] * i), parseInt(start[1]) + (diffStep[1] * i), parseInt(start[2]) + (diffStep[2] * i)]; var diffString = 'rgb(' + Math.round(diff[0]) + ',' + Math.round(diff[1]) + ',' + Math.round(diff[2]) + ')'; $('#serrate…
favorite count: 0
type: UnansweredQuestion
tagged with: animation
tagged with: css
has title: Why is my custom pseudo-animation out of sync with jQuery's native animate function?
has comment: http://stackoverflow.com/comment/41325981
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/29604382
has comment: http://stackoverflow.com/comment/46550532
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41325647
score: 4

http://stackoverflow.com/q/26351475
answer count: 1
has title: assigning date values to input fields using date picker
has body: I have a url parameter called commencing date in the format of dd-mm-yyyy. I have input fields in my html field and I need to set dates to those input fields. I need to dates to be set like this. If the commencing date(url parameter string) is 01-01-2014 , the first input field should have the date of 15-02-2015. That means 1 month and 2 weeks later. Then the next input field should have the date 1 month and 2 weeks after the 15-02-2014. This should happen say 10 times. I am doing it using a for loop.I have assigned jquery datepicker for my input fields. var initialDate = "01-01-2014"; var x; for(x=1; x&lt;= 10;x++){ var dateArray = initialDate.split("-"); var dateObj = new Date(dateArray[2],dateArray[1],dateArray[0]); dateObj.setMonth(dateObj.getMonth()+1); dateObj.setDate(dateObj.getDate()+14); // Assign the new date value to input field. $("#dateOf_installment_"+x).val(dateObj.getDate()+"-"+dateObj.getMonth()+"-"+dateObj.getFullYear()); } But this does not give me the required values. How to solve this problem, Thanks all!
has answer: http://stackoverflow.com/a/26352006
accepted answer: http://stackoverflow.com/a/26352006
type: AnsweredQuestion
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
tagged with: jquery-ui-datepicker
linked to: http://stackoverflow.com/q/3818193
score: 0

http://stackoverflow.com/comment/85754254
type: QuestionComment
has text: Did you get answer for it? As i am also trying to implement scrollbar with zoom.
comment on: http://stackoverflow.com/q/26231804
score: 0
type: Comment

http://stackoverflow.com/comment/41261178
type: AnswerComment
has text: Thanks James. Din't know I should put dynamic stuff on the right side.
type: Comment
comment on: http://stackoverflow.com/a/26295545
score: 0

http://stackoverflow.com/comment/41153955
type: Comment
type: QuestionComment
has text: @ James Montagne --- and ie 7 8 not delay tooo
score: 0
comment on: http://stackoverflow.com/q/26237261

http://stackoverflow.com/comment/41285354
type: QuestionComment
has text: What is the content of the requests in your network tab, are there duplicates sent by the server?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26233127

http://stackoverflow.com/q/26331504
tagged with: debouncing
downvote count: 0
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/26331663
favorite count: 0
has title: angular conditional watch to call a debounced method or not is not working
tagged with: angularjs
has body: I have the following angular watch to watch for a scoped variable, and I perform the following. I use debounce to bundle the request to the backend. var myWatch = $scope.$watch('myQuery', _.debounce(loadMyData, 1000),true); When this myQuery returns undefined, I don't need this debounceand instead I need to execute the backend call directly. var myWatch = $scope.$watch('myQuery', function(oldquery,newquery){ if(newquery){ _.debounce(loadMyData(newquery), 2000,true); }else{ loadMyData(newquery); } },true); now the debounce doesn't properly bundle my request.
upvote count: 1
type: AnsweredQuestion
tagged with: underscore.js
score: 1
accepted answer: http://stackoverflow.com/a/26331663
type: Question

http://stackoverflow.com/q/26257023
type: Question
has body: Let's say I have this function in a javascript on my web page that loads a url from an textfield with id url: function loadUrl() { var url = document.getElementById('url').value; window.open(url, 'urlwindow'); } If I open two tabs in my browser and opens my web page in both tabs, I want both tabs to open the url in the same window, not two separate windows. Is this possible? In other words, I want to target window opened from another tab.
has answer: http://stackoverflow.com/a/37175104
has title: Open URL in same window from different tabs
upvote count: 4
answer count: 2
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26257688
has comment: http://stackoverflow.com/comment/41189748
linked to: http://stackoverflow.com/q/37175028
type: UnansweredQuestion

http://stackoverflow.com/q/26221002
has body: I am working with jsp and I need to convert it into json: In javascript: listas = "&lt;%=ics.GetVar("ListasConsumo")%&gt;"; The result console.log(listas); is the next string: LtEmConsumptionPerHourResponseDTO [ billedConsumptionActive=ConsumptionDTO [ consumptionHour00=99.17600000000000, consumptionHour01=105.77600000000000, consumptionHour02=115.45600000000000, consumptionHour03=121.30800000000000 ], billedConsumptionReactive=ConsumptionDTO [ consumptionHour00=0.00000000000000, consumptionHour01=0.00000000000000, consumptionHour02=0.00000000000000, consumptionHour03=0.00000000000000 ], registersTotal=24 ] Which is the best way to do the convertion to json?
type: Question
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/41125155
has comment: http://stackoverflow.com/comment/41124110
score: 0
has title: Convert jsp object to json
type: UnansweredQuestion
answer count: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26208754
has body: I'm using Gridfs to store files and allow the possibility of storing the same file but incrementing a version variable in the file's metadata. I'm using gridfs-stream to access the collection. So I'm trying to get the latest version out of the collection and I know I can use: {sort: 'uploadDate', 'desc'} but I'd like to sort by the metadata version field that is named '__v'. I'm guessing the format to do that is this: gfs.collection().findOne({'metadata.fd': fd}, {sort: 'metadata.__v', 'desc'}, function(err, file) {}
tagged with: node.js
tagged with: mongodb-query
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26210921
type: Question
score: 0
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/26210921
answer count: 1
tagged with: javascript
tagged with: gridfs
has title: Sorting by metadata Mongodb's Nodejs driver

http://stackoverflow.com/comment/41189766
type: Comment
has text: I didn't tought about the hidden mirror field. Looks the best solution. I'm giving it a try, thanks!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26256355

http://stackoverflow.com/comment/42062058
type: Comment
has text: No longer works with the latest FireFox. There seems to be no straightforward way to detect it anymore.
comment on: http://stackoverflow.com/a/26280473
score: 1
type: AnswerComment

http://stackoverflow.com/a/26269288
score: 0
type: Answer
has body: I'm sure that the problem from your path to js file. I made a a sample as same you but with different path for my js file. With as same as angular.js, mt_sim.js, css file and jsp. But you must consider about Deploy Assembly, check Deploy Assembly to see how your project deploy with individual path, when your project is built and deploy it will wrap your file with only /mt_sim/... So if must define source of js file like this: Coffee Tea Milk Coke Pepsi RC Cola It run for me: I tested it and it run properly. I definitely confirmed that your problem come from source of js file not css file. Give a try and good luck
answers question: http://stackoverflow.com/q/26269026

http://stackoverflow.com/comment/41213042
has text: Jozin, Can I have your skype ID? Can we make friend?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26269172

http://stackoverflow.com/comment/41311465
comment on: http://stackoverflow.com/a/26323303
score: 0
type: AnswerComment
has text: Thank you!That was silly. I should have looked at code better. Could you also answer the second part of my question? How do I get those dats show up in the x-axis & in the tooltip. Thanks.
type: Comment

http://stackoverflow.com/a/26297293
has comment: http://stackoverflow.com/comment/41264034
score: 0
has body: try to add the !important on your color css. body { background: #f00 !important; }
has comment: http://stackoverflow.com/comment/41263661
type: Answer
has comment: http://stackoverflow.com/comment/41263964
answers question: http://stackoverflow.com/q/26296881

http://stackoverflow.com/comment/41276185
comment on: http://stackoverflow.com/q/26302177
type: QuestionComment
type: Comment
has text: It's working: http://jsfiddle.net/robertrozas/ax98jm2w/10/
score: 0

http://stackoverflow.com/comment/41322511
type: Comment
has text: hey georgi when i enter "1" it output please enter a number, where is should said you may travel for free
comment on: http://stackoverflow.com/a/26329141
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41305311
type: QuestionComment
comment on: http://stackoverflow.com/q/26291387
has text: @jfriend00 you can't right-click, but inspector icon (magnifying glass) works just fine for me.
score: 0
type: Comment

http://stackoverflow.com/a/26241072
type: Answer
accepted answer of: http://stackoverflow.com/q/26225672
has comment: http://stackoverflow.com/comment/41162228
has body: toDataURL produces a base64 string of the PNG. You need the raw data (or blob), though. From this link: By using canvas.toDataURL(), you preclude the possibility of easily using another application to view a saved drawing. Saving the drawing as a PNG file has the benefit of allowing a number of standard applications, including the browser, to display the drawing. By switching to canvas.msToBlob(), we can save the file directly to PNG... So: canvg(canvas, svg); image = canvas.msToBlob(); if (navigator.msSaveBlob) { return navigator.msSaveBlob(new Blob([image], {type:"image/png"}),"file23.png"); } Update fiddle. EDITS For a more universal way to convert base64 images to blobs see this answer here. And an example of how to do it in this workflow: var image = canvas.toDataURL( "image/jpeg" ); image = b64toBlob(image.replace("data:image/jpeg;base64,",""),"image/jpeg") if (navigator.msSaveBlob) { return navigator.msSaveBlob(image,"file23.jpeg"); }
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41166068
answers question: http://stackoverflow.com/q/26225672

forms
tags question: http://stackoverflow.com/q/26315296
tags question: http://stackoverflow.com/q/26273505
tags question: http://stackoverflow.com/q/26277317
tags question: http://stackoverflow.com/q/26347236
tags question: http://stackoverflow.com/q/26299419
tags question: http://stackoverflow.com/q/26349474
tags question: http://stackoverflow.com/q/26290998
tags question: http://stackoverflow.com/q/26209969
tags question: http://stackoverflow.com/q/26253305
type: Tag
tags question: http://stackoverflow.com/q/26291138
tags question: http://stackoverflow.com/q/26236260
tags question: http://stackoverflow.com/q/26239911
tags question: http://stackoverflow.com/q/26208743
tags question: http://stackoverflow.com/q/26213083
tags question: http://stackoverflow.com/q/26211995
tags question: http://stackoverflow.com/q/26220313
tags question: http://stackoverflow.com/q/26209799
tags question: http://stackoverflow.com/q/26316793
tags question: http://stackoverflow.com/q/26291540
tags question: http://stackoverflow.com/q/26264876
tags question: http://stackoverflow.com/q/26239552
tags question: http://stackoverflow.com/q/26200299
tags question: http://stackoverflow.com/q/26321405
tags question: http://stackoverflow.com/q/26256689
tags question: http://stackoverflow.com/q/26290467
tags question: http://stackoverflow.com/q/26321805
tags question: http://stackoverflow.com/q/26343159
tags question: http://stackoverflow.com/q/26323889
tags question: http://stackoverflow.com/q/26269133
tags question: http://stackoverflow.com/q/26276469
tags question: http://stackoverflow.com/q/26250758
tags question: http://stackoverflow.com/q/26343289
tags question: http://stackoverflow.com/q/26232265
tags question: http://stackoverflow.com/q/26226706
tags question: http://stackoverflow.com/q/26241365
tags question: http://stackoverflow.com/q/26279080
tags question: http://stackoverflow.com/q/26275123
tags question: http://stackoverflow.com/q/26291880
tags question: http://stackoverflow.com/q/26284204
tags question: http://stackoverflow.com/q/26256127
tags question: http://stackoverflow.com/q/26212391
tags question: http://stackoverflow.com/q/26335979
tags question: http://stackoverflow.com/q/26278639
tags question: http://stackoverflow.com/q/26238419
tags question: http://stackoverflow.com/q/26209637
tags question: http://stackoverflow.com/q/26329315
tags question: http://stackoverflow.com/q/26275307
tags question: http://stackoverflow.com/q/26211337
tags question: http://stackoverflow.com/q/26288026
tags question: http://stackoverflow.com/q/26314073
tags question: http://stackoverflow.com/q/26327989
tags question: http://stackoverflow.com/q/26265352
tags question: http://stackoverflow.com/q/26198583
tags question: http://stackoverflow.com/q/26320278
tags question: http://stackoverflow.com/q/26255872
tags question: http://stackoverflow.com/q/26240651
tags question: http://stackoverflow.com/q/26204799
tags question: http://stackoverflow.com/q/26240520
tags question: http://stackoverflow.com/q/26321714
tags question: http://stackoverflow.com/q/26312375
tags question: http://stackoverflow.com/q/26247230
tags question: http://stackoverflow.com/q/26322558
tags question: http://stackoverflow.com/q/26331622
tags question: http://stackoverflow.com/q/26350725
tags question: http://stackoverflow.com/q/26203925
tag name: forms
tags question: http://stackoverflow.com/q/26244669
tags question: http://stackoverflow.com/q/26245335
tags question: http://stackoverflow.com/q/26300917
tags question: http://stackoverflow.com/q/26271767
tags question: http://stackoverflow.com/q/26320689
tags question: http://stackoverflow.com/q/26253248
tags question: http://stackoverflow.com/q/26350916
tags question: http://stackoverflow.com/q/26287498
tags question: http://stackoverflow.com/q/26213425
tags question: http://stackoverflow.com/q/26319180
tags question: http://stackoverflow.com/q/26235318
tags question: http://stackoverflow.com/q/26341383
tags question: http://stackoverflow.com/q/26274537

http://stackoverflow.com/a/26231528
score: 0
type: Answer
has body: You can use Snap SVG and your code will look something like this : // Tux image is from creative commons, I didn't create it! var s = Snap("#svgout"); var g = s.group(); var tux = Snap.load("Dreaming_tux.svg", function ( loadedFragment ) { g.append( loadedFragment ); g.hover( hoverover, hoverout ); g.text(300,100, 'hover over me'); } ); var hoverover = function() { g.animate({ transform: 's2r45,150,150' }, 1000, mina.bounce ) }; var hoverout = function() { g.animate({ transform: 's1r0,150,150' }, 1000, mina.bounce ) }; You have a working example here : http://svg.dabbles.info/snaptut-load-animate.html The library is Snap SVG with a lot of documentation &amp; examples here : http://snapsvg.io/
answers question: http://stackoverflow.com/q/26230629

http://stackoverflow.com/a/26326169
has comment: http://stackoverflow.com/comment/41316885
answers question: http://stackoverflow.com/q/26325937
type: Answer
downvote count: 0
score: 2
has comment: http://stackoverflow.com/comment/41316786
has comment: http://stackoverflow.com/comment/41316979
upvote count: 2
has comment: http://stackoverflow.com/comment/41316796
type: AcceptedAnswer
has body: I've tested your code with good results. Here is my testing fiddle: YOUR SLIDESHOW FIDDLE You only have to make sure that: the paths to the images are correct you are loading jquery Hope this helps!
accepted answer of: http://stackoverflow.com/q/26325937
has comment: http://stackoverflow.com/comment/41316657

http://stackoverflow.com/a/26333690
has body: In my opinion, use ajax, and seperate the concerns better. Let PHP handle the updload and return some data on what has happened. Let javasctipt perform the ajax request and update the DOM as appropriate when the request is complete, using the data returned. Let CSS handle the styling. Do you really want to have to change javascript and PHP if you want to change the styling of your message container? My PHP is a little rusty and I normally use jQuery for ajax so the following may need some "massaging" to get right but it should get you on your way. PHP &lt;?php $allowedExts = array("zip", "rar"); if (@$_FILES['file'] == null) { $dataOut["success"] = false; $dataOut["message"] = 'Please choose a file before clicking upload'; $dataOut["baseName"] = ''; exit(); } else { $fileName = $_FILES["file"]["name"]; $fileTmpLoc = $_FILES["file"]["tmp_name"]; $fileType = $_FILES["file"]["type"]; $fileSize = $_FILES["file"]["size"]; $fileErrorMsg = $_FILES["file"]["error"]; $temp = explode(".", $_FILES["file"]["name"]); $name = pathinfo($_FILES["file"]["name"], PATHINFO_FILENAME); $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION); $i = ''; $dataOut["success"] = false; $dataOut["message"] = ''; $dataOut["baseName"] = ''; } //Check for fucking max file size breach //OR NOT: stop it on JS side to prevent long file upload //and then alerting user that their file is too big! //(Also prevents sidestepping ugly PHP error kickout if file is too big. if ((($_FILES["file"]["type"] == "application/zip") || ($_FILES["file"]["type"] == "application/x-zip") || ($_FILES["file"]["type"] == "application/x-zip-compressed") ) &amp;&amp; ($_FILES["file"]["size"] &lt; 52428800) &amp;&amp; in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] &gt; 0) { echo "Upload error! Please notify site administrator"; } else { if (file_exists("upload/" . $name . $i . '.' . $extension)) { while(file_exists("upload/" . $name . $i . '.' . $extension)) { $i++; } $basename = $name . $i . '.…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41363935
score: 0
has comment: http://stackoverflow.com/comment/41364257
type: Answer
has comment: http://stackoverflow.com/comment/41337210
has comment: http://stackoverflow.com/comment/41363623
has comment: http://stackoverflow.com/comment/41363101
accepted answer of: http://stackoverflow.com/q/26332366
answers question: http://stackoverflow.com/q/26332366
has comment: http://stackoverflow.com/comment/41364179
has comment: http://stackoverflow.com/comment/41335489
has comment: http://stackoverflow.com/comment/41336415
has comment: http://stackoverflow.com/comment/41342811

http://stackoverflow.com/comment/41083950
score: 1
type: Comment
type: QuestionComment
has text: put `var self = this;` at the start of the submit-handler, and then in the success-function `self.submit();`
comment on: http://stackoverflow.com/q/26199766

http://stackoverflow.com/q/26296290
type: Question
tagged with: javascript
score: 0
has title: How to add swipe feature to images within modal
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26297534
has body: I could not find solution for swiping images in Twitter Bootstrap modal. Right now I am using // Swipe feature $('#myCarousel').swiperight(function() { $('#myCarousel').carousel('prev'); }); $('#myCarousel').swipeleft(function() { $('#myCarousel').carousel('next'); }); for Carousel which is basically loaded into Twitter Modal with ('.modal-trigger img').click(function(e) { $('#myModal img').attr('src', $(this).attr('data-img-url')); }); And this is my HTML structure. So how can I add swipe effect to images even in modal window and load all images in that modal window?
tagged with: twitter-bootstrap
type: UnansweredQuestion

multidimensional-array
tags question: http://stackoverflow.com/q/26260449
type: Tag
tags question: http://stackoverflow.com/q/26245091
tags question: http://stackoverflow.com/q/26323356
tags question: http://stackoverflow.com/q/26202082
tags question: http://stackoverflow.com/q/26200300
tag name: multidimensional-array

http://stackoverflow.com/q/26245356
tagged with: html5-video
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26245742
has title: Link button with video time
has answer: http://stackoverflow.com/a/26245742
has comment: http://stackoverflow.com/comment/41169450
has comment: http://stackoverflow.com/comment/41169356
has body: I'm trying to show a button only when the user reaches at a certain time of video, like button would appear only when the user has seen 20 minutes of video. Have no idea about it, would really appreciate inputs. Thanks
tagged with: video
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26245605
accepted answer: http://stackoverflow.com/a/26245605
type: Question
tagged with: video-streaming
has comment: http://stackoverflow.com/comment/41169442
tagged with: javascript

http://stackoverflow.com/comment/41194205
type: Comment
has text: Agreed; my point wasn't that your code wouldn't work, just pointing out that it wouldn't return an array (though, of course, it does return a [`NodeList`](https://developer.mozilla.org/en-US/docs/Web/API/NodeList), which is, in many ways, very similar). I was aiming for clarity, rather than criticism; but my language choices sometimes fail.
type: AnswerComment
comment on: http://stackoverflow.com/a/26253938
score: 0

http://stackoverflow.com/comment/41215241
type: AnswerComment
type: Comment
has text: @BhushanKawadkar : I agree .
score: 1
comment on: http://stackoverflow.com/a/26270571

http://stackoverflow.com/comment/41213360
type: QuestionComment
comment on: http://stackoverflow.com/q/26268875
score: 0
has text: if your body or any of these elements has a padding/margin/border it could affect the calculation - see [this](http://jsfiddle.net/arunpjohny/cajpsdp7/1/) & [this](http://jsfiddle.net/arunpjohny/cajpsdp7/2/)(jsfiddle gives a default margin of 8px to body)
type: Comment

http://stackoverflow.com/comment/41137872
type: Comment
has text: If there is an Error, it will still be an error and some pending processes might still be interrupted... i.e: if the user was to enter a wrong `Email` Id format, you don't expect the `form` to jump that field and deliver others... what if out 10 important `field`s the user only enters 1 which is the last one... if you can't `catch` those Nine(9) before heading to the server, that might be a Dangerous and Huge BUG in your codes
type: AnswerComment
comment on: http://stackoverflow.com/a/26228388
score: 0

http://stackoverflow.com/q/26200033
type: Question
tagged with: jquery-animate
has answer: http://stackoverflow.com/a/26322943
tagged with: javascript
has answer: http://stackoverflow.com/a/26200098
score: 0
has comment: http://stackoverflow.com/comment/41084441
answer count: 2
tagged with: jquery
tagged with: height
has body: My developer and I are stuck with a drop down lead form using Jquery. http://nextinlinefilms.com.au/index.php here is the link. It is the "make an enquiry today" part when you click the open tab the .animate isnt working. Here is the code: jQuery( ".jscript" ).click(function() { jQuery( ".enquiry" ).animate({height: "100%"},1000); }); jQuery( ".jscript2" ).click(function() { jQuery( ".enquiry" ).animate({height: "255px"},1000); }); Please help we are not sure. You can use px but on phones and other screen sizes it needs a smaller or larger px height. Auto doesnt work either. The close button works fine as it has a px height that is needed.
tagged with: joomla3.0
has title: Jquery .animate 100% height not working?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41084422
has comment: http://stackoverflow.com/comment/41084414

http://stackoverflow.com/comment/41085130
type: QuestionComment
has text: Why don't you just hire someone who knows how to program in jQuery to do it for you? B/c I'm not, and doubt anyone else will.
score: 0
comment on: http://stackoverflow.com/q/26200309
type: Comment

http://stackoverflow.com/a/26232933
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26232828
score: 2
has body: Try this : create javascript function and call it on change event of select box. this is the uk this is the us this is the eu JSFiddle DEMO
downvote count: 0

http://stackoverflow.com/q/26261369
favorite count: 0
accepted answer: http://stackoverflow.com/a/26261401
has body: i have this html code, how can i get the text which has selected="selected" option with jquery ? m n o p q r s t u v thanks
type: Question
has comment: http://stackoverflow.com/comment/41197752
linked to: http://stackoverflow.com/q/1643227
tagged with: gettext
upvote count: 2
duplicate of: http://stackoverflow.com/q/1643227
has title: get selected="selected" text with jquery
answer count: 1
has answer: http://stackoverflow.com/a/26261401
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/comment/41400027
score: 0
type: Comment
has text: What are other syntax's for searching for an <element> with a attribute of a certain value?
comment on: http://stackoverflow.com/a/26350776
type: AnswerComment

http://stackoverflow.com/comment/41186438
type: AnswerComment
has text: Thanks pal..this is awesome... almost a day i've searching for this but now i got it..this is absolute what i need..
type: Comment
comment on: http://stackoverflow.com/a/26254393
score: 0

http://stackoverflow.com/comment/41242721
comment on: http://stackoverflow.com/q/26285023
type: Comment
type: QuestionComment
has text: this is a function based off of the condition a certain class exists on a product. i inherited the code and don't know it 100% yet. reading deeper into it, my issue is actually more complex than i initially thought... i may have to close the question for my purpose, but im sure somebody else may find it useful.
score: 0

http://stackoverflow.com/comment/41361405
score: 0
type: QuestionComment
type: Comment
has text: @Icepickle: Yes. That's correct
comment on: http://stackoverflow.com/q/26350331

http://stackoverflow.com/comment/41268680
type: Comment
has text: Do you have any way of viewing the page?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26299482

http://stackoverflow.com/a/26247574
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26246971
has body: Syntax error &lt;script type\="text/javascript"&gt; Use &lt;script&gt; or &lt;script type="text/javascript"&gt; instead
has comment: http://stackoverflow.com/comment/41190538

http://stackoverflow.com/comment/41140570
has text: for that i have also done a server side validation so no worries
comment on: http://stackoverflow.com/q/26229579
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26314943
answer count: 1
has comment: http://stackoverflow.com/comment/41296218
tagged with: http://stackoverflow.com/tag/json
has body: I am developing my first website. At this time i am generating a new html design that would be a ticket. From my main page, i will load this html when the user clicks the "See ticket" button. This html has a table which is filled on document.ready with javascript. The data used is a JSON created in the main page. I coded a working solution using localStorage. The problem is that the next step is to convert that HTML website to PDF and the software i am using does not work properly with localStorage, so i need to pass the JSON from main page to the ticket page. I can't neither use URL encoding cause string could be sometimes longer than 2000 characters and it is not productive. So i thought that maybe i could do and $.get call from the ticket.html to index.html and get the needed JSON. Is this approach correct, or is there any better solution? Regards
has answer: http://stackoverflow.com/a/26316304
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26316304
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41296040
type: Question
has comment: http://stackoverflow.com/comment/41295954
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: javascript ajax post/get from one html-javascript to another
score: 0
has comment: http://stackoverflow.com/comment/41296094

http://stackoverflow.com/q/26289897
type: AnsweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/26290385
type: Question
has title: Replace Vote Count with a Percentage System for Jquery upVote
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26290385
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: I want to replace the vote counts of 0 for default, 1 for an upvote, and -1 for a down vote into Not Rated for Default, 100% for an upvote, and 0% for a down vote. Note: I need to accomplish this without going into server side, so basically a frontside solution involving jquery, javascript, html, and css only. Here's the Fiddle: http://jsfiddle.net/3ec67gne/3/ HTML: Javascript: function gen(target, cssClass, params) { var obj = $('#templates .upvote').clone(); obj.addClass(cssClass); $(target).append(obj); return obj.upvote(params); } $(function() { function gen_examples(params) { gen('#examples', '', params); } function gen_unix(params) { gen('#unix', 'upvote-unix', params); } function gen_programmers(params) { gen('#programmers', 'upvote-programmers', params); } function gen_serverfault(params) { gen('#serverfault', 'upvote-serverfault', params); } var functions = [gen_examples, gen_unix, gen_programmers, gen_serverfault]; for (var i in functions) { var fun = functions[i]; fun(); } }); ;(function($) { "use strict"; var namespace = 'upvote'; var dot_namespace = '.' + namespace; var upvote_css = 'upvote'; var dot_upvote_css = '.' + upvote_css; var upvoted_css = 'upvote-on'; var dot_upvoted_css = '.' + upvoted_css; var downvote_css = 'downvote'; var dot_downvote_css = '.' + downvote_css; var downvoted_css = 'downvote-on'; var dot_downvoted_css = '.' + downvoted_css; var star_css = 'star'; var dot_star_css = '.' + star_css; var starred_css = 'star-on'; var dot_starred_css = '.' + starred_css; var count_css = 'count'; var dot_count_css = '.' + count_css; var enabled_css = 'upvote-enabled'; function init(dom, options) { return dom.each(function() { var jqdom = $(this); methods.destroy(jqdom); var count = parseInt(jqdom.find(dot_count_css).text(), 10); count = isNaN(count) ? 0 : count; var initial = { id: jqdom.attr('data-id'), count: count, upvoted: jqdom.find(dot_upvoted_css).size(), downvoted: jqdom.find(dot_downvoted_css).size(), starred: jqdom.find(dot_starred_css).…

http://stackoverflow.com/a/26298517
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26297997
has body: Try this: // generate a random number from 0 to max - 1. function rand(max) { return Math.floor(max * Math.random()); } // generate a random number from min to max. function range(min, max) { return min + rand(1 + max - min); } // the loop function function next(n, callback) { var m = range(n, 100); if (m &lt; 100) setTimeout(next, 1000, m + 1, callback); callback(m); } var span = document.getElementById("rand"); next(0, function (m) { span.innerHTML = "Random number: " + m; }); &lt;span id="rand"&gt;&lt;/span&gt;

codeigniter
tags question: http://stackoverflow.com/q/26229527
tags question: http://stackoverflow.com/q/26312456
tags question: http://stackoverflow.com/q/26248890
type: Tag
tags question: http://stackoverflow.com/q/26226779
tags question: http://stackoverflow.com/q/26311029
tags question: http://stackoverflow.com/q/26276881
tags question: http://stackoverflow.com/q/26250545
tag name: codeigniter
tags question: http://stackoverflow.com/q/26275782
tags question: http://stackoverflow.com/q/26314272
tags question: http://stackoverflow.com/q/26335451

date
tags question: http://stackoverflow.com/q/26216341
tags question: http://stackoverflow.com/q/26327059
tag name: date
tags question: http://stackoverflow.com/q/26221602
tags question: http://stackoverflow.com/q/26250636
tags question: http://stackoverflow.com/q/26250402
tags question: http://stackoverflow.com/q/26211649
tags question: http://stackoverflow.com/q/26239140
tags question: http://stackoverflow.com/q/26281540
tags question: http://stackoverflow.com/q/26311489
tags question: http://stackoverflow.com/q/26310518
tags question: http://stackoverflow.com/q/26286518
tags question: http://stackoverflow.com/q/26213100
tags question: http://stackoverflow.com/q/26300316
tags question: http://stackoverflow.com/q/26256145
type: Tag
tags question: http://stackoverflow.com/q/26351632
tags question: http://stackoverflow.com/q/26220277
tags question: http://stackoverflow.com/q/26352873
tags question: http://stackoverflow.com/q/26342405
tags question: http://stackoverflow.com/q/26285846
tags question: http://stackoverflow.com/q/26274879
tags question: http://stackoverflow.com/q/26294089

http://stackoverflow.com/q/26291051
possible better answer: http://stackoverflow.com/a/26291474
score: 1
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26291474
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41253048
has body: I have a scenario to add a class name dynamically to a specific element based on a condition in helper handler. Below is the code I am using &lt;table class="table table-striped" id="mytab"&gt; &lt;tbody&gt; {{#each records}} &lt;tr id="abc"&gt; {{ showMore $this }} &lt;td&gt;{{formatDate this.StartDateTime }} &lt;/td&gt; &lt;/tr&gt; {{/each}} &lt;/tbody&gt; &lt;/table&gt; I want to pass '&lt;tr&gt;' element as a parameter to 'showMore' helper handler. Added -- Below is my handler code : Handlebars.registerHelper('showMore', function(ele,options) { var index = options.data.index; }); In the above function i need to access html element
accepted answer: http://stackoverflow.com/a/26291369
has title: how can we pass html element as parameter in handlebar helper to achieve show more/less functionality
tagged with: handlebars.js
has answer: http://stackoverflow.com/a/26291369
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26235011
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41150113
has body: Aim of my code: Draw a small rectangle on a HTML canvas whenever a user clicks the canvas. The rectangle should have a small number representing the number of rectangles made by the user. The user should be able to connect any two rectangles using a straight line. (Preferably by just pressing left mouse button, and taking the mouse from first rectangle to second rectangle) Approach and my attempt As you can see in this jsFiddle , I have been able to achieve the first part of above very well. On clicking on the canvas, a rectangle with a number inside of it is made. But I am really clueless about the second part. How do I make the user connect any two made rectangles? I want the connection to be made only if a rectangle is there ( So I would need to store coordinates of every rectangle that has been made, that's okay as I can use an array for that ). Basically, I just want to check if the mousedown was at one place and mouseup at the other. How do I get these two different coordinates ( one of mousedown and other of mouseup ) , and draw a line between them? I have given the Fiddle above but still here's my jquery: $(function () { var x, y; var globalCounter = 0; $('#mycanvas').on("click", function (event) { x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; x -= mycanvas.offsetLeft; y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; y -= mycanvas.offsetLeft; // alert("x:"+x+"y: "+y); drawRectangle(x, y); }); function drawRectangle(x, y) { var acanvas = document.getElementById("mycanvas"); var context = acanvas.getContext("2d"); context.strokeRect(x, y, 25, 25); globalCounter++; writeNo(x, y, globalCounter); } function writeNo(x, y, n) { var acanvas = document.getElementById("mycanvas"); var context = acanvas.getContext("2d"); context.font = "bold 14px sans-serif"; context.fillText(n, x + 8, y + 12.5); } }); The main question is therefore: connecting the two made rectangles by mousedrag How do I achieve t…
has comment: http://stackoverflow.com/comment/41152941
score: 6
has comment: http://stackoverflow.com/comment/41156142
has comment: http://stackoverflow.com/comment/41152922
type: Question
has title: Get coordinates of two different places on HTML canvas
has comment: http://stackoverflow.com/comment/41150828
has comment: http://stackoverflow.com/comment/41151397
has comment: http://stackoverflow.com/comment/41149437
tagged with: javascript
has comment: http://stackoverflow.com/comment/41151053
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26235945
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41149522
upvote count: 6
has answer: http://stackoverflow.com/a/26235945

http://stackoverflow.com/comment/41290914
comment on: http://stackoverflow.com/q/26311783
has text: Hi Jason, couple of things. 1)If your KO ViewModel is declared in a separate js file, make sure you included it in the js references. 2) Is the html you provided inside a hierarchical html. When you bind KO to something inside a hierarchy, you will not be in the scope of the viewModel. So, you might have to do something like $parent.spamFlavor or $root.spamFlavor depending on what your html hierarchy is set up as. If you think its set up properly, could you paste your html in there.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26325437
has comment: http://stackoverflow.com/comment/41316075
has comment: http://stackoverflow.com/comment/41315499
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has body: I have two directives, dropdown and panel. Panels contain dropdowns. Using require : "^panel", and specifying a controller, I can make both communicate. You can see an example here http://plnkr.co/edit/rqBsZ26JiQKzFMRpBmKD?p=preview {{test}} My question is about how to make the dropdown directive independent too, so I want this two: 1) The dropdown directive to work by itself, so I can put in my html and 2) Sometimes, inside other directives like panel I was thinking that I could generate the returned directive object and, if needed, add to that object the controller mention when needed. Is that the right way to remove the tight coupling that now I have between panel and dropdown while allowing me still the flexibility to use dropdown in any other scenario? Please find the updated plunkr containing the rahil recommendations, fully working http://plnkr.co/edit/rqBsZ26JiQKzFMRpBmKD?p=preview
tagged with: javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/41315743
favorite count: 0
has title: directive communication and coupling
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41315388
has comment: http://stackoverflow.com/comment/41315441

http://stackoverflow.com/a/26223781
type: Answer
has comment: http://stackoverflow.com/comment/41130098
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26223599
answers question: http://stackoverflow.com/q/26223599
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41639982
has body: https://developers.facebook.com/docs/apps/changelog Apps requesting more than public_profile, email and the user_friends permission must be reviewed by Facebook before those permissions can be requested from people. Meaning, user_birthday needs to get approved before it can be used by users, else it will only work for users with a role in the App (Admin, Developer, Tester). There should be a very visible message telling you about that when you open the login dialog as Admin/Developer of the App. More information: https://developers.facebook.com/docs/apps/review/login
score: 2

http://stackoverflow.com/a/26216480
has comment: http://stackoverflow.com/comment/41115039
score: 0
has comment: http://stackoverflow.com/comment/41114743
type: Answer
has body: events will not trigger the ondoubleclick attr. ondoubleclick can be fired by $(elm).click().click(); but this is realy dirty!
answers question: http://stackoverflow.com/q/26215506

http://stackoverflow.com/comment/41094732
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26204691
type: AnswerComment
has text: yes i know is not part of HTML. Second question: why can't I use tags for this code (poundOne.pound) to make the font larger by using css or html code such as , , ... or ?

http://stackoverflow.com/a/26277088
has body: That seems possible using pseudo classes. CSS div { display: inline; position: relative; } div:before { content:""; position: absolute; left: 0px; right: 0px; bottom: -5px; top: -5px; background-color: blue; z-index:-1; } div:after { content:""; display: block; } p { display: inline-block; background-color: red; } Working Fiddle
answers question: http://stackoverflow.com/q/26276579
type: Answer
score: 0

http://stackoverflow.com/comment/41300687
comment on: http://stackoverflow.com/q/26314841
score: 0
type: Comment
type: QuestionComment
has text: I use console.log and return: name=&surname=&password=&phone=&paidMail= and these are the values i need to work.

http://stackoverflow.com/a/26327447
upvote count: 2
has comment: http://stackoverflow.com/comment/41319012
has comment: http://stackoverflow.com/comment/41319124
type: Answer
score: 2
downvote count: 0
has body: Prefer using querySelector var children = document.querySelectorAll('div .child'); for (var i = 0; i &lt; children.length; i++) children[i].parentNode.removeChild(children[i]);
answers question: http://stackoverflow.com/q/26327368

http://stackoverflow.com/a/73843941
score: 0
type: Answer
has body: We have a table ABC. In that table we have a column which contains dropdown as select having value as blank, option a, option b. Now, with change with this dropdown I want to update the input field accordingly, i.e; if a is chosen, input field value will be 100, if b is chosen, input field will be 0 and if blank is chosen, input field will be blank , readonly. The input field id is set to input_ where i is 1 to no of rows in the table. Below is the code for implementing this. HTML : Javascript: function changeEvent(chosen) { var table = document.getElementById("ABC"); var rows = document.querySelectorAll('tr'); var rowsArray = Array.from(rows); table.addEventListener('change', (event) => { var target = event.target.toString(); var rowIndex = rowsArray.findIndex(row => row.contains(event.target)); var x = table.rows.length; var id = "input_"+(parseInt(rowIndex) - 2).toString(); if(chosen === "a") { table.rows[rowIndex].cells.item(3).innerHTML=" "; return; }else if(chosen === "b"){ table.rows[rowIndex].cells.item(3).innerHTML=" "; return; }else{ table.rows[rowIndex].cells.item(3).innerHTML=" "; return; } }) }
answers question: http://stackoverflow.com/q/26292710

http://stackoverflow.com/comment/41315840
type: AnswerComment
comment on: http://stackoverflow.com/a/26325214
type: Comment
has text: You have two options. Download the sample you want and convert it to r68 or if you want to see the sample running download the r63 version of three.js from https://github.com/mrdoob/three.js/releases/tag/r63 (bottom of the page)
score: 0

http://stackoverflow.com/q/26312441
favorite count: 0
upvote count: 2
has body: I have been trying to clone and drop a draggable at the position in a droppable at the coordinates where the drop happens. I have found examples online that deal with appending draggables to droppables, but they all seem to move the draggable to a specific part of the droppable on the initial drop. Here is an example that does just that: - http://jsfiddle.net/scaillerie/njYqA/ //JavaScript from the jsfiddle jQuery(function() { jQuery(".component").draggable({ // use a helper-clone that is append to 'body' so is not 'contained' by a pane helper: function() { return jQuery(this).clone().appendTo('body').css({ 'zIndex': 5 }); }, cursor: 'move', containment: "document" }); jQuery('.ui-layout-center').droppable({ activeClass: 'ui-state-hover', accept: '.component', drop: function(event, ui) { if (!ui.draggable.hasClass("dropped")) jQuery(this).append(jQuery(ui.draggable).clone().addClass("dropped").draggable()); } }); }); Is there anyway I can make the draggable stay at the coordinates where the drop occured?
tagged with: css
possible better answer: http://stackoverflow.com/a/26312689
has answer: http://stackoverflow.com/a/26312689
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26312598
has answer: http://stackoverflow.com/a/26312603
type: Question
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
score: 2
accepted answer: http://stackoverflow.com/a/26312603
tagged with: http://stackoverflow.com/tag/html
has title: Dropping a draggable in a droppable at the drop position

http://stackoverflow.com/comment/41173437
has text: `qaz.execute = function(){ console.log( "qaz: ", this ); };` Depending on your browser you should not log objects as strings unless you're using IE as that browser is unable to log an object in any kind of useful way.
comment on: http://stackoverflow.com/q/26244635
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26226059
type: Answer
answers question: http://stackoverflow.com/q/26225903
has body: It's an image. It can be copied, someone can do a screenshot, so you don't need more security than to make them undiscoverable. Once someone learns the url of a given image, while logged in, it doesn't matter whether he is logged in or not. Therefore, this is an ok solution: Use the hard-to-guess filenames as lxg suggests in the other anwer. Configure the server to not allow the listing of files. On Apache and others compatible this can be done with a .htaccess file containing the following line: Options -Indexes Put that file in the directory you want to disable listings in. When client enters url to directory www.example.com/assets/img Instead of list of files and subdirectories he gets error 403 Forbidden Now it's impossible to view the file listing, and your files are named like this: 3210983j11kjdhasda980132132.jpg so it's impossible to guess their names. Thats not tight security, but it's simple and it works well enough for very basic privacy.
score: 0

http://stackoverflow.com/comment/41351070
score: 0
type: QuestionComment
has text: Here is [fiddle](http://jsfiddle.net/ac8y41tk/) and it works. If you wonder why `Link` doesn't have link - it's because there already is element with ID `video_link2` on page (`<a id="video_link2" href="" rel="lightbox[video]" ...`).
type: Comment
comment on: http://stackoverflow.com/q/26344621

http://stackoverflow.com/comment/41244316
score: 0
comment on: http://stackoverflow.com/q/26279891
type: QuestionComment
has text: So, how are you appending what I assume is the y-value to the legend?
type: Comment

http://stackoverflow.com/comment/41217426
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26271767
score: 1
has text: If you want both `numerical` and `textual` values, you will have to use `text` type instead. The `number` type will only accept numerical value.(literally)

http://stackoverflow.com/a/26292101
downvote count: 0
answers question: http://stackoverflow.com/q/26292036
has body: You should use the word-wrap property of CSS to force the text to stay inside div without overflowing. word-wrap: break-word See the DEMO here Check without this property and with it to see the difference.
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/26329695
accepted answer: http://stackoverflow.com/a/26330004
favorite count: 0
has comment: http://stackoverflow.com/comment/43366593
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion
has title: Textarea's and syllable counter. [JQuery/Javascript]
has body: I have 2 text areas; Textarea #1 contains standard text, Textarea #2 contains the total syllable count they work fine but they dis-align on line breaks. I have a feeling the snippet of code here contains my issue; function $count_how_many_syllables($input) { $("[name=set_" + $input + "]").keyup(function () { var lines = $("[name=set_" + $input + "]").val().split(/\n/); var arrayOfLines = []; for (var i=0; i &lt; lines.length; i++) { arrayOfLines.push($.trim(lines[i])); } var $content; var $word = 0; var $syllable_count = ""; var $result = ""; for (var i = 0; i &lt; arrayOfLines.length; i++) { $content = arrayOfLines[i].toLowerCase(); word = $content.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, '') .replace(/^y/, '') .match(/[aeiouy]/g).length; if ($content.length &lt; 1) { $result = $result + "0\n"; } else { $syllable_count = word.toString(); $result = $result + $syllable_count + "\n"; } } $("[name=set_" + $input + "_syllable_count]").val($result); // set scrolling $("[name=set_" + $input + "_syllable_count]").scrollTop = $("[name=set_" + $input + "]").scrollTop; $("[name=set_" + $input + "_syllable_count]").scrollLeft = $("[name=set_" + $input + "]").scrollLeft; }); } setInterval(function ($) { $count_how_many_syllables("a"); },100)(jQuery); Here is a JsFiddle: http://jsfiddle.net/tq3zzhna/ (type something and you'll see my issue)
type: Question
has answer: http://stackoverflow.com/a/26330004
tagged with: javascript
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41323868
tagged with: jquery
has comment: http://stackoverflow.com/comment/41323574

sequelize.js
type: Tag
tag name: sequelize.js
tags question: http://stackoverflow.com/q/26275854
tags question: http://stackoverflow.com/q/26204178

http://stackoverflow.com/comment/41241418
comment on: http://stackoverflow.com/q/26284815
has text: @Jonathan I know right, but I'd still like to find a solution if I can. @KevinB I am using `AngularJS v1.2.16`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26217098
tagged with: d3.js
type: AnsweredQuestion
has title: Map X-values to a Date in d3.time.scale()
type: Question
has body: I have a d3 chart that draws out a number of rectangles over an x-axis. The x-axis represents a timeline and I currently use d3.time.scale in order to map the dates of each datapoint to a point on the x-axis. This is all straight forward. var xAxis = d3.time.scale(); data.forEach(function(d){ d.xValue = xAxis(d.startDate); }); Then drawing it out using that specific xValue in a css transform. Now, if I would like to get the date based on a given x-value (say for instance when a user clicks on the graph I want to check which date that x-value corresponds to) I have not found how to do this using the xAxis variable that I have created. How can I achieve this? Would I have to use the xAxis.domain() and the width of the element to calculate the chosen date?
has comment: http://stackoverflow.com/comment/41116281
has answer: http://stackoverflow.com/a/26231012
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26231012
answer count: 1

http://stackoverflow.com/comment/41168956
has text: I've noticed that too. We've had trouble in the past trying to get InDesign to process XML well without crashing or choking.
type: Comment
comment on: http://stackoverflow.com/a/26218384
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41256626
score: 0
has text: Can you give more context and perhaps preceed each code snippet with what works or doesn't work. I a not clear because when I run each of those code snippets in IE and FF, they are working as they should.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26293316

http://stackoverflow.com/comment/41076471
has text: @Gary: I've made the above *slightly* more efficient, but you may find that Sizzle's `:last` implementation is just as efficient or more so. (Or, of course, not. :-) )
type: Comment
comment on: http://stackoverflow.com/a/26195470
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41356720
comment on: http://stackoverflow.com/a/26343371
has text: If decodeURIComponent is used to convert it to `punk�d`, then it will be encoded back to its original value when it passes through encodeURIComponent.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41229766
score: 0
type: AnswerComment
type: Comment
has text: Did you add the Users class to your model (via a relationship) or via App::uses() in your MetasController?
comment on: http://stackoverflow.com/a/26278468

http://stackoverflow.com/q/26294203
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41258943
has comment: http://stackoverflow.com/comment/41259810
has comment: http://stackoverflow.com/comment/41258188
has comment: http://stackoverflow.com/comment/41258281
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41258359
has comment: http://stackoverflow.com/comment/41258251
score: 0
has comment: http://stackoverflow.com/comment/41258161
has body: I am using jQuery dataTables to fetch data from the server. here is my code: &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#myDataTable').dataTable({ "bServerSide": true, "sAjaxSource": "Device/AjaxHandler", "bProcessing": true, "aoColumns": [ { "sName": "AccountCode" }, { "sName": "User" }, { "sName": "Signal Strength" "render": renderSignal(data) } ] }); function renderSignal(val) { return '&lt;p&gt;' + val + '&lt;/p&gt;'; } }); &lt;/script&gt; This doesn't work, but I have the feeling it is a syntax error. Im not sure if render is the correct function name to use. What I want to do, is take a value 1-3 and then display a different image for each value. So I want to define that columns layout in my render function.
has comment: http://stackoverflow.com/comment/41258653
tagged with: datatables
has comment: http://stackoverflow.com/comment/41258234
tagged with: jquery
has title: How to render a column with jQuery dataTables
tagged with: ajax
has comment: http://stackoverflow.com/comment/41258212

http://stackoverflow.com/comment/41390715
type: AnswerComment
comment on: http://stackoverflow.com/a/26351069
has text: Welcome @MazrimTaim! Accept answer please if it worked for you.
type: Comment
score: 2

http://stackoverflow.com/q/26331470
tagged with: javascript
score: 0
answer count: 1
has title: Tracking an google analytics event in an iframe
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26333280
type: UnansweredQuestion
tagged with: iframe
type: Question
tagged with: google-analytics
has body: Okay so I'm a google analytics &amp; js noob so I know the absolute basics. On my site http://www.wildseasonthegame.com I have some humble bundle widgets which are Iframes. I'm still trying to understand analytics but as I understand it Theoretically I should be having a code like this &lt;a href="#" onClick="_gaq.push(['_trackEvent', 'cateogry', 'action', 'label name']);"&gt; something goes here &lt;/a&gt; Now my question is = Can I replace href with iframe and will it just work? Or will i need to do other stuff (like add some extra JS) to make it work, seeing as how iframes are funny little things Or do I wrap each iframe in its own a href with a # destination and track conversions that way? HOw do i differentiate between clicks made to input their email and clicks to purchase? Any other suggestions how I can track the conversion offsite. Humble bundle has an off site thank you page, but It doesnt look like it redirects back to myne, let alone guarantee tha tpeople will arrive at my page instead of closing their browser after the transaction.

http://stackoverflow.com/a/26333482
answers question: http://stackoverflow.com/q/26333308
has body: Don't use center at all. Stick to css. Put the table in a 'div' or 'span' and center that with css, making sure you have set the margins as mentioned by Sachi above.
score: 0
type: Answer

http://stackoverflow.com/a/26326015
accepted answer of: http://stackoverflow.com/q/26323011
upvote count: 2
has comment: http://stackoverflow.com/comment/41670687
has body: When you select the line to transition with new data (after the button click), you're creating a new path: var dynamoBar = svg.append('svg:path')... Instead, select the existing path: var dynamoBar = svg.select('.dataline')... See this fiddle: http://jsfiddle.net/henbox/L2hehcry/
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26323011
score: 2

http://stackoverflow.com/a/26243943
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26243746
has comment: http://stackoverflow.com/comment/41168952
has comment: http://stackoverflow.com/comment/41168917
score: 3
has comment: http://stackoverflow.com/comment/41167901
has comment: http://stackoverflow.com/comment/41167162
has comment: http://stackoverflow.com/comment/41168425
has body: You can access the listOf collection property using its name: json.listOf So if you wanted to sort the array you could try using the .sort() javascript method: json.listOf.sort(function(a, b) { if (a.fname &gt; b.fname) { return 1; } else if (a.fname &lt; b.fname) { return -1; } return 0; }); // At this stage json.listOf will contain the sorted in-place array using the `fname` property and here's a sample jsfiddle illustrating this in action.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41168920
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41168371
has comment: http://stackoverflow.com/comment/41167731
answers question: http://stackoverflow.com/q/26243746
has comment: http://stackoverflow.com/comment/41167334

http://stackoverflow.com/comment/41233882
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26280975
has text: but clearly it isn't, as he was able to log to see that it was undefined.
score: 0

http://stackoverflow.com/a/35860615
type: Answer
score: 0
type: AcceptedAnswer
has body: Firebug has an extension called ConsoleExport, which does exactly that. This extension exports the messages logged to Firebug's console in XML format. In the current released version 0.5b5 it only auto-exports to a server URL. Though, in the meantime code landed already (see issue 9) to auto-export to the file system, which will (hopefully) be released soon (see issue 21).
accepted answer of: http://stackoverflow.com/q/26335776
answers question: http://stackoverflow.com/q/26335776

http://stackoverflow.com/a/26199107
has comment: http://stackoverflow.com/comment/41088301
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41088244
upvote count: 2
answers question: http://stackoverflow.com/q/26198680
has body: First, pass your main app to your modules, don't create 2 express apps, you can handle the rest using routes. You should create a small API and use AJAX calls to fill up your main view : On the server side : app.get('/weather', function(req,res){ res.render(__dirname + '/views/sticks.jade'); }); Client jade: div#weather Client JS (using jQuery): $.ajax({ url: '/weather', type: 'get', success: function(view) { $('#weather').html(view); } });
has comment: http://stackoverflow.com/comment/41088678
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26198680

http://stackoverflow.com/comment/117489832
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26348974
has text: this solution didn't work for me, but adding an empty tag at the end of body did.

http://stackoverflow.com/comment/60212601
score: 0
comment on: http://stackoverflow.com/q/26238419
type: Comment
type: QuestionComment
has text: Possible duplicate of [CasperJS/ Javascript Selecting Multiple Options](http://stackoverflow.com/questions/30986521/casperjs-javascript-selecting-multiple-options)

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/26259789

http://stackoverflow.com/q/26273246
has answer: http://stackoverflow.com/a/26273315
downvote count: 0
tagged with: javascript
has body: I have this code: if (!window.location.href.match(/\?snake=/)) { Which redirects the user if you go to site.com/snake. The problem is that it matches another URL starting with the same keyword and I get an endless loop: site.com/snake-mobile How can I avoid that? And only match a URL which ends with snake?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41219941
has title: Match only one URL with Javascript
has answer: http://stackoverflow.com/a/26273300
type: Question
answer count: 2
score: 2

http://stackoverflow.com/a/26290748
score: 0
type: Answer
has body: If you're specifically interested in images being loaded, then you can try imagesLoaded, which seems to cover the example case that you mention.
answers question: http://stackoverflow.com/q/26290701

http://stackoverflow.com/q/26236542
type: Question
has answer: http://stackoverflow.com/a/26236865
tagged with: javascript
has body: I am trying to make a simple search engine that compares user input to a bunch of elements in an html document, the idea being that the elements are movie titles. When a user types in a movie title completely or partially, the script should find the nearest matching title and highlight it using style.Backgroundcolor. I have been trying to do it like this: HTML &lt;input type="text" title="Zoekbalk" id="userinput" placeholder="Typ hier om te zoeken" class="input_box" onkeydown="if (event.keyCode == 13) document.getElementById('search_button').click()"/&gt; &lt;input class="search_button" onsubmit="return false;" type="button" value="Zoek" id="search_button" onclick="Search()"/&gt; JS function Search() { userinput = document.getElementById("userinput").value; if (!userinput.replace(/\s+/g, '')) { alert('U heeft geen zoekterm ingevuld!'); return; } // userinput = userinput.toLowerCase(); var list = document.getElementsByTagName("h3"); var i = list.length, html, flag = false, matches = []; while (i--) { var html = list[i].innerHTML.toLowerCase; if (-1 &lt; html.indexOf(userinput)) { flag = true; matches.push(html); } } if (!flag) { alert('No match found !'); } else { alert('Matched: ' + matches.join(', ')); matches.style.backgroundColor = "#ff6d6d"; matches.scrollIntoView(); } }; The problem is this: The first If() which checks if the user has actually filled in anything works perfectly fine. But if I do fill in anything at all, nothing happens! I took a look in the Chrome Debug console and it said that it had found an uncaught type error at line 22 of my JS (which is the first if statement after the While() loop). Does anyone know how to fix this problem?
has comment: http://stackoverflow.com/comment/41152229
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26237186
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41152193
has comment: http://stackoverflow.com/comment/41152308
favorite count: 0
has comment: http://stackoverflow.com/comment/41152426
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26237186
has title: JavaScript: Making a simple search engine which searches through elements
upvote count: 1
possible better answer: http://stackoverflow.com/a/26236865
downvote count: 1

http://stackoverflow.com/comment/41131769
score: 0
type: QuestionComment
has text: Do you have any errors in the console?
type: Comment
comment on: http://stackoverflow.com/q/26224088

http://stackoverflow.com/comment/41100976
score: 1
has text: I agree, one liner in this instance is just showing off, but I like to try and read them as I find them hard to compile.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26209028

http://stackoverflow.com/a/26213601
has comment: http://stackoverflow.com/comment/41110715
has comment: http://stackoverflow.com/comment/41109402
type: Answer
has comment: http://stackoverflow.com/comment/41110091
score: 3
answers question: http://stackoverflow.com/q/26212920
upvote count: 3
has body: Based on the comments in your start topic, you could simply detect/rewrite the missing function: Date.prototype.toLocaleFormat = Date.prototype.toLocaleFormat || function(pattern) { return pattern.replace(/%Y/g, this.getFullYear()).replace(/%m/g, (this.getMonth() + 1)).replace(/%d/g, this.getDate()); }; the rewrite would then be globally available, you could test it with this jsfiddle
has comment: http://stackoverflow.com/comment/41109834
has comment: http://stackoverflow.com/comment/41110004
has comment: http://stackoverflow.com/comment/41110946
downvote count: 0
has comment: http://stackoverflow.com/comment/41109545
has comment: http://stackoverflow.com/comment/41109474

http://stackoverflow.com/comment/41152216
comment on: http://stackoverflow.com/q/26233009
score: 0
type: Comment
has text: Seems like a bug. I would submit the issue to Tumblr.
type: QuestionComment

http://stackoverflow.com/a/26405811
score: 0
answers question: http://stackoverflow.com/q/26305251
type: Answer
has body: I found a solution for my problem. I have to create another factory to do the job: .factory('ClientJobs', ['$resource', 'Api', function ($resource, Api) { var ClientJobs = $resource(Api.url() + 'client/:clientId/job/:jobId', { clientId: '@Id', jobId: '@Id' }, { 'query': { method: 'GET', isArray: true }, 'update': { method: 'PUT' } } ); return ClientJobs; } ]); And, i can use the factory like this: ClientJobs.save({clientId:clientId, jobId:job.id}, job, function (result) { deferred.resolve(result); }, function (reason) { deferred.reject(reason); }); Now, everything is working. And for help those people who are working with UI-ROUTER, there is this question with an excellent answer about complex states like mine and nested views: Nested Views with Nested States

http://stackoverflow.com/comment/41106315
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26211771
score: 0
has text: get the un-compressed version of jquery-mobile and modify the code for your needs; looked in the config and there seems to be no way to set this.

http://stackoverflow.com/q/26341270
accepted answer: http://stackoverflow.com/a/26341492
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/26341638
has answer: http://stackoverflow.com/a/26341638
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/5253084
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26341492
has title: Rotating a HTML element with the use of JavaScript and setTimeout to simulate a constantly moving object
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 3
has body: I've spent a little time trying to figure this specific bit of Javascript out and why it seems to be so infuriating. As it stands i currently have two functions. Which are shown as follows. function startUpProc(id) { var log = window.document.getElementById(id); log.style.transform = "rotate(0deg)"; var i = 10; while ( i &lt;= 360) { setTimeout('changeRotate(' + id + ',' + i + ')', 100); i = i + 10; } } function changeRotate(item, val) { item.style.transform = "rotate(" + val + "deg)"; item.style.webkitTransform = "rotate(" + val + "deg)"; item.style.mozTransform = "rotate(" + val + "deg)"; //alert(item.style.transform); } Relatively simple bit of Javascript that rotates a HTML element, in this case it's an image, this code is called with the use of a body onLoad handler as follows : &lt;body onLoad="startUpProc('logo');"&gt; My intention as it stands is to have the image spin 360 degrees once which is regulated with the use of my while loop. Where my confusion lies is in the fact that despite the timeout being set for this to take a total of 3.6 seconds to complete, it doesn't seem to even work, and there is no error being thrown, hence the alert that i placed in the function in an attempt to see what was occurring. The alert was triggered 36 times, and visually i could see the image rotating on the page. I found the following SO Q&amp;A, but to no avail, the answer just wasn't applicable for the specific event i am trying to create, as the image is being rotated no matter what browser i attempt the code on, the only difference being, it only rotates when there is an alert or something in there to stop the flow of code... Rotating a div element Unfortunately for me, all other answers i find, seem to reference the use of JQuery, which for the moment i would like to stay away from and learn to proficiently develop in JavaScript without the use of third party extensions and plugins.

http://stackoverflow.com/a/26311421
type: Answer
downvote count: 0
score: 1
has body: As mentioned in this jshint-eclipse issue: You have to explicitly enable JSHint for your project. You can do so by adding a file pattern on the JSHint page in your project's preferences. The main contributor to jshint-eclipse, ralfstx, comments: Maybe it's not obvious. I wanted to avoid checking all files by default for performance reasons. JSHint is written in JavaScript, and running large scripts is not exactly fast. OTOH, checking all *.js files by default (maybe excluding .min.js files) would not affect non-JS projects, and for JS-only workspaces, checking all projects is probably useful...
upvote count: 1
answers question: http://stackoverflow.com/q/26309397

http://stackoverflow.com/q/26286884
has comment: http://stackoverflow.com/comment/41246545
has body: I need to determine if a jQuery object has the jQuery .click() event, if not I need to use the JavaScript one: $("#Call")[0].click() Basically I need a way to this (this is pseudo code): if ($("Call").click() == valid){ $("Call").click() } else { $("Call")[0].click() }
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41245656
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41245348
tagged with: jquery-events
has comment: http://stackoverflow.com/comment/41246817
has comment: http://stackoverflow.com/comment/41246475
has title: How to determine what (if) there are jQuery events tied to an object
answer count: 1
has comment: http://stackoverflow.com/comment/41248049
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26287142
has comment: http://stackoverflow.com/comment/41246885
has comment: http://stackoverflow.com/comment/41245302
linked to: http://stackoverflow.com/q/2008592

http://stackoverflow.com/a/26320988
has body: You can let users access the files, or you can not let users access the files. There is no way to let users access the files from a web app without being able to see or download the files.
answers question: http://stackoverflow.com/q/26320941
score: 0
type: Answer

http://stackoverflow.com/q/26287228
has title: Which to use - recursive query or specific regex
has comment: http://stackoverflow.com/comment/41247197
downvote count: 1
has answer: http://stackoverflow.com/a/26287589
accepted answer: http://stackoverflow.com/a/26287589
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41246155
type: Question
upvote count: 1
linked to: http://stackoverflow.com/q/1293147
has body: I have a CSV line, that looks like: foo, bar, baz, "england, scotland, wales, ireland", sith and need to convert it into "foo", "bar", "baz", "england, scotland, wales, ireland", "sith" I've decided to replace all commas between double quotes with 'comma', but after picking up a substirng between the double quotes I have a problem with regex to do so, because while using a replace(/(.+)(,)(.+)/g, "'comma'") I take next substring "england, scotland, wales'comma' ireland" instead of "england'comma' scotland'comma' wales'comma' ireland" I don't want to use regex with more complicated structure like /(.+)(,)(.+)(,)(.+)(,)(.+)/g and wish to group word with comma sign but can't pick a right regex for it, so I use a recursive substring search with match in for loop. Am I doing right, or there is a regex that fits but I haven't find it yet. Thank you.
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41246067
has comment: http://stackoverflow.com/comment/41246038
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/csv
tagged with: regex

http://stackoverflow.com/comment/41129002
score: 0
comment on: http://stackoverflow.com/q/26222786
type: QuestionComment
type: Comment
has text: @demas What the scheme of web page the runs the script? If it's `file://`, that's your problem. If so, this is a duplicate of [Origin null is not allowed by Access-Control-Allow-Origin](http://stackoverflow.com/questions/8456538/origin-null-is-not-allowed-by-access-control-allow-origin)

http://stackoverflow.com/q/26330134
tagged with: javascript
has comment: http://stackoverflow.com/comment/41326332
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41324240
has body: Is there a way to get a reference to the container of a Javascript function? To give an example: &lt;div&gt; &lt;script&gt; var thisDiv = ??? doSomething(thisDiv); &lt;/script&gt; &lt;/div&gt; It seems that the this keyword only refers to the containing element when it is triggered by direct event such as onClick(). Otherwise this refers to the containing window element. Is there any equivalent way to get the parent or containing element of a &lt;script&gt; snippet ?
has title: Get DOM element containing a Javascript snippet
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26330167
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/403967

http://stackoverflow.com/comment/41278515
comment on: http://stackoverflow.com/a/26287788
score: 0
type: Comment
has text: You indicated that "the model value is updated before the options get a chance to get loaded", this is because setting country causes a service to be called which fills all the states. The solution I suggest will set the state value AFTER the country service has setup all the states such that the value is proper AND SET AFTER all the values are loaded. If that is not what you are trying to do then I am misunderstanding the problem.
type: AnswerComment

http://stackoverflow.com/a/27060136
has body: With regard to speech recognition: First, you should set your SpeechRecognition object's continous property to false (or not set it to true, since false is the default value) recognition.continuous = false; (this should enable end-of-speech detection, i.e. recognizer will stop after detecting end-of-speech) Also, your click-handler code seems strange: the Web Speech API defines start() and stop(), but you seem to use speechstart() and speechend()... I would suggest, you use recognition.start() and recognition.stop() also these function do not have a return value, so no need using return recognition.start(). In order to keep your button label in sync, I would suggest to add handlers for onend and onerror e.g. recognition.onend = function(event){ $('#startStopButton').text('Start'); }; For more details have a look at the Web Speech API
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26198415
downvote count: 0

http://stackoverflow.com/comment/41239683
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26282432
score: 0
has text: @GameAlchemist, thanks again for your comments. Let's focus on questions. Can you help with some of these?

http://stackoverflow.com/q/26283241
type: AnsweredQuestion
has title: Angular Service throws exception when returning a promise
accepted answer: http://stackoverflow.com/a/26283575
has comment: http://stackoverflow.com/comment/41238295
linked to: http://stackoverflow.com/q/26263395
type: Question
has body: In my app.js code I'm running some init code which pulls session vars from the server. Good so far; however I'm now trying to add an additional call to pull data for a treeview widget. This new call is causing the JavaScript exception : "Cannot read property 'then' of undefined" The startup code is: 1) app.run gets called first, 2) call into 'userService' to init various $rootScope vars 3) userService makes API calls to a server and returns data. $q.defer() and $http is used ** NEXT STEPS CAUSES AN EXCEPTION 4) call into userService.getUserReportsTreeFromDataContext() from app.run 5) userService.getUserReportsTreeFromDataContext then calls down into datacontext.js (THIS SOMEHOW CAUSES AN EXCEPTION). Here is my app.run() code within app.so app.run(['$route', '$rootScope', 'common', 'userService', function ($route, $rootScope, common, userService) { // initialize session vars userService.openUserSession(razorEnvJson).then(function (data) { var sessionID = data.data[0]; $rootScope.rageSessionVars.sessionID = sessionID; // **** THROWS EXCEPTION HERE **** userService.getUserReportsTreeFromDataContext().then(function (data){ // var myData = data; }); }); }]); and a snippet from userContext.js service : this.openUserSession = function (razorEnvParams) { _razorEnvParams = razorEnvParams; _// some vars ommitted here for brevity var url = "http://" + _domain + ":" + _port + controllerpath + "?userid=" + user + "&amp;pass=" + pass; var deferred = $q.defer(); deferred.notify("Opening user session..."); var retval = []; $http({ method: 'GET', encoding: 'JSON', headers: { 'Access-Control-Allow-Origin': 'true', 'Content-Type': 'application/json' }, withCredentials: true, url: url }).success(function (data, status, headers, config) { retval = data; deferred.resolve(retval); }).error(function (data, status, headers, config) { log("Cannot open a user session via api call. Errors details: " + data); }); return deferred.promise; } this.getUserReportsTreeFromDataContext = function (user…
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26283575
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41238695
tagged with: angular-promise

http://stackoverflow.com/q/26324184
tagged with: javascript
tagged with: jquery
has title: swap values of two autotext boxes by clicking a button
has answer: http://stackoverflow.com/a/26424964
favorite count: 0
score: 0
has body: I have two autocomplete text boxes. I have used jquery-ui widget for autocomlete textboxes. I need to swap their values by clicking a button. Autocomplete text boxes are working fine. But click on the button it can't do swap. Here is the code. From: To: Simple textboxes swapping without autocomplete is working fine.
has comment: http://stackoverflow.com/comment/41481653
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41317124
accepted answer: http://stackoverflow.com/a/26424964
upvote count: 1
downvote count: 1
type: AnsweredQuestion
tagged with: jquery-ui
type: Question
answer count: 1

http://stackoverflow.com/a/26282636
type: AcceptedAnswer
type: Answer
has body: All you have to do is listen to the select and react when it changes. // Listen to the change of the &lt;select&gt; element $("#typeofworkday").on("change", function() { // Check the option value for "ferie" and disable the checkbox if ($(this).val() === "ferie") { $("#check1").attr("disabled", "disabled"); // For all other options, enable the checkbox } else { $("#check1").removeAttr("disabled"); } }); Here's a JSFiddle of it working
accepted answer of: http://stackoverflow.com/q/26282488
answers question: http://stackoverflow.com/q/26282488
score: 0

http://stackoverflow.com/comment/41188356
score: 0
comment on: http://stackoverflow.com/a/26256355
type: Comment
has text: @AndroidGuy Only by using JavaScript.
type: AnswerComment

http://stackoverflow.com/comment/41388704
score: 0
type: AnswerComment
type: Comment
has text: you nailed it! The tests in the gist pass after I ```$('#container').remove()```! Thank you! Would you create an answer so I can pick it as the correct one? Thank you very much!
comment on: http://stackoverflow.com/a/26361323

http://stackoverflow.com/a/26303060
has comment: http://stackoverflow.com/comment/41274590
has comment: http://stackoverflow.com/comment/41274675
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41274709
type: Answer
answers question: http://stackoverflow.com/q/26302991
has body: Because Javascript operates using JSON, you should JSON serialize your list: @using Newtonsoft.Json var list = @Html.Raw(JsonConvert.SerializeObject(ViewBag.List)); list = list || []; In general, @Html.Raw(JsonConvert.SerializeObject(obj)) is the proper way to inject a C# object obj into a view as JSON. IHtmlString Html.Raw(string) simply returns the string it is passed and renders it without any HTML escaping, which is what you want when you are rendering an object as JSON into a block of Javascript code.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41274660
accepted answer of: http://stackoverflow.com/q/26302991

http://stackoverflow.com/q/26285846
linked to: http://stackoverflow.com/q/3075577
score: 0
has body: I have a datetime coming from the database that looks like: 2014-10-09 14:14:27 I am pulling it with angular and trying to format it in a way that I can work with. This is what I currently have: $http.get('/ajax/get-feedings.php') .success(function(data) { $scope.listing = []; for (var i = 0; i &lt; data.length; i += 1) { $scope.listing.push({ date: new Date(data[i].date), feeding: data[i].feeding }); } }) But javascript is saying that the date is invalid? I have no idea what is going on. This is the json that is coming in if that helps [ { "date":"2014-10-09 14:14:27", "feeding":[ { "id":"13", "amount":"0" } ] } ]
has comment: http://stackoverflow.com/comment/41243462
has comment: http://stackoverflow.com/comment/41243411
tagged with: angularjs
tagged with: time
has title: datetime from db isnt being parse by javascript
has comment: http://stackoverflow.com/comment/41243203
has comment: http://stackoverflow.com/comment/41243225
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41243398
tagged with: javascript
tagged with: date

http://stackoverflow.com/comment/41117977
type: Comment
type: QuestionComment
has text: *""lang" html5 attribute doesn't help."* Then I suspect either you're using it incorrectly (if you showed us what you'd tried, we might be able to help), or you should file a bug with Apple or whoever is showing the relevant text (are you sure it's iOS/Safari?), as [that's what it's for](http://www.w3.org/TR/html5/dom.html#attr-lang).
score: 0
comment on: http://stackoverflow.com/q/26218178

http://stackoverflow.com/a/26265037
answers question: http://stackoverflow.com/q/26263925
accepted answer of: http://stackoverflow.com/q/26263925
has comment: http://stackoverflow.com/comment/41275184
has body: Typed this out in notepad and tested. It essentially searches for the string value buttonred and replaces it with buttonblue and vice versa. &lt;input type="image" id="start" src="buttonred.png" width="50px" height="50px" onClick="colorChange(this.id)"/&gt; &lt;input type="image" id="stop" src="buttonred.png" width="50px" height="50px" onClick="colorChange(this.id)"/&gt; &lt;input type="image" id="slow" src="buttonred.png" width="50px" height="50px" onClick="colorChange(this.id)"/&gt; &lt;input type="image" id="fast" src="buttonred.png" width="50px" height="50px" onClick="colorChange(this.id)"/&gt; &lt;script&gt; function colorChange(id) { var btn = document.getElementById(id); if (btn.src.match(/buttonred/gi) != null) { btn.src = btn.src.replace("buttonred.png","buttonblue.png"); } else { btn.src = btn.src.replace("buttonblue.png","buttonred.png"); } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41206703
has comment: http://stackoverflow.com/comment/41205688
has comment: http://stackoverflow.com/comment/41247594
has comment: http://stackoverflow.com/comment/41275682
has comment: http://stackoverflow.com/comment/41306340
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/41271048
comment on: http://stackoverflow.com/q/26301106
type: Comment
type: QuestionComment
score: 0
has text: When a variable is used in a **`boolean` context** -- correct me if I am wrong -- it should be read as, **is Defined?** thereby resulting in `true`, if defined or `false`, if not defined.

http://stackoverflow.com/q/26288837
answer count: 1
has answer: http://stackoverflow.com/a/26308175
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: Ajax - Django getting pages without refresh
accepted answer: http://stackoverflow.com/a/26308175
tagged with: django
type: Question
has body: I'm trying to use ajax in my web app. I have a html code like this: {% for bas in bslklr %} {{ bas }} {% endfor %} [code] [code] and I use this js code: function ajax_get_update() { $.get(url, function(results){ var segment = $("div.ajaxli-segment", results); var main = $("div.ajaxli-main", results); $('.ajaxli-segment').html(segment); $('.ajaxli-main').html(main); }, "html"); } $( document ).ready( function() { $( '.basliklinki .item#baslikl' ).click( function(e) { e.preventDefault(); url = ($( '.basliklinki .item#baslikl' )[0].href); ajax_get_update(); }); }); $( document ).ajaxStop( function() { $( '.basliklinki .item#baslikl' ).click( function(e) { e.preventDefault(); url = ($( '.basliklinki .item#baslikl' )[0].href); ajax_get_update(); }); }); I have all fields for objects in ajaxli-segment and ajaxli-menu divs in their templates. I want to get them without refreshing the page but my code doesn't work. When I click one of the objects, it empties the ajaxli-segment and ajaxli-main divs but it doesn't get new content from the page with same divs, that I want to see. You may see it in action at munhasir.com, just open the left sidebar and click one of the lines in there. How can I make this work? Thanks.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41260544
has comment: http://stackoverflow.com/comment/41262087
has comment: http://stackoverflow.com/comment/41264463

http://stackoverflow.com/comment/41285962
has text: @Derek朕會功夫 Could be, but he shouldn't use `file:///` anyway. Relative paths should work from anywhere.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26308868
type: Comment

http://stackoverflow.com/q/26328294
has answer: http://stackoverflow.com/a/53110806
has answer: http://stackoverflow.com/a/26328383
has comment: http://stackoverflow.com/comment/41320608
has comment: http://stackoverflow.com/comment/41320587
has title: Call function dynamically in Javascript
linked to: http://stackoverflow.com/q/14396647
favorite count: 0
has comment: http://stackoverflow.com/comment/41320881
has answer: http://stackoverflow.com/a/26328455
score: 11
tagged with: node.js
has comment: http://stackoverflow.com/comment/41320600
answer count: 4
accepted answer: http://stackoverflow.com/a/26328383
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41320592
has comment: http://stackoverflow.com/comment/41320692
has comment: http://stackoverflow.com/comment/41320595
has comment: http://stackoverflow.com/comment/41323857
has comment: http://stackoverflow.com/comment/41320670
has body: I want to dynamically call a function from a string like "User.find". A script would call the function find() in the object User if the function exists. Here's what I tried: var User = {}; User.find = function(){ return 1; } var input = 'User.find'; var some_data_array = {name: 'John Doe'}; var method = input.toString().split('.'); var nameObj = method[0].substring(0,1).toUpperCase() + method[0].substring(1); var methodToCall = method[1]; nameObj.call(methodToCall, some_data_array); But it always returns: nameObj.call(methodToCall, some_data_array); TypeError: Object User has no method 'call' Any idea? I can't use window since it is a node.js problem, the script is not executed in the browser.
downvote count: 1
type: Question
upvote count: 12
has comment: http://stackoverflow.com/comment/41320702
possible better answer: http://stackoverflow.com/a/26328483
tagged with: javascript
has comment: http://stackoverflow.com/comment/41320855
has answer: http://stackoverflow.com/a/26328483
has comment: http://stackoverflow.com/comment/41320605

http://stackoverflow.com/comment/41171699
type: AnswerComment
comment on: http://stackoverflow.com/a/26246202
score: 0
type: Comment
has text: @davidp027 - you are confusing two different levels of web technology: "POST" is HTTP, while "href" is HTML.

http://stackoverflow.com/comment/41244794
type: QuestionComment
comment on: http://stackoverflow.com/q/26286623
score: 10
has text: IDs **must** be unique.
type: Comment

http://stackoverflow.com/q/26222753
has comment: http://stackoverflow.com/comment/41127486
has comment: http://stackoverflow.com/comment/41127183
has answer: http://stackoverflow.com/a/26223202
has title: Javascript does'nt switch div visibility
tagged with: iframe
has body: I'm working on a script that would allow me to change which div is visible, but right now it does'nt work and i can't figure out why. Could someone help me to find a solution ? html Previous Next script Page1.style.visibility="visible" Page2.style.visibility="hidden" Page3.style.visibility="hidden" Page4.style.visibility="hidden" Page5.style.visibility="hidden" function SwitchPageForward() { var Page1 = document.getElementById("send1"); var Page2 = document.getElementById("send2"); var Page3 = document.getElementById("send3"); var Page4 = document.getElementById("send4"); var Page5 = document.getElementById("send5"); if (Page4.style.visibility == "visible") { Page4.style.visibility="hidden"; Page5.style.visibility="visible"; } if (Page3.style.visibility == "visible") { Page3.style.visibility="hidden"; Page4.style.visibility="visible"; } if (Page2.style.visibility == "visible") { Page2.style.visibility="hidden"; Page3.style.visibility="visible"; } else if (Page2.style.visibility == "visible") { Page2.style.visibility="hidden"; Page3.style.visibility="visible"; } if (Page1.style.visibility == "visible"){ Page1.style.visibility="hidden"; Page2.style.visibility="visible"; } else if (Page1.style.visibility == "visible") { Page1.style.visibility="hidden"; Page3.style.visibility="visible"; } else if (Page1.style.visibility == "visible") { Page1.style.visibility="hidden"; Page4.style.visibility="visible"; } } function SwitchPageBackward() { var Page1 = document.getElementById("send1"); var Page2 = document.getElementById("send2"); var Page3 = document.getElementById("send3"); var Page4 = document.getElementById("send4"); var Page5 = document.getElementById("send5"); if (Page2.style.visibility == "visible") { Page2.style.visibility="hidden"; Page1.style.visibility="visible"; } if (Page3.style.visibility == "visible") { Page3.style.visibility="hidden"; Page2.style.visibility="visible"; } else if (Page3.style.visibility == "visible") { Page3.style.visibility="hidden"; Page1.st…
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41127073
possible better answer: http://stackoverflow.com/a/26222907
score: -1
has answer: http://stackoverflow.com/a/26222907
accepted answer: http://stackoverflow.com/a/26223202
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
favorite count: 0
tagged with: visibility
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41278716
score: 0
has text: I've seen that you've modified the post, will check to see if these patches are installed.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26305210

http://stackoverflow.com/a/26205195
accepted answer of: http://stackoverflow.com/q/26205178
has body: That isn't how you escape a $ for replace. Backslash escaping works at the parser level, functions like replace cannot give special meaning to new escape sequences like \$ because they don't even see the \$. The string "\$" is exactly equivalent to the string "$", both produce the same string. If you wanted to pass a backslash and a dollar sign to a function, it's the backslash itself that requires escaping: "\\$". Regardless, replace expects you to escape a $ with $$. You need "$1$woop[$$$2]$3"; a $$ for the literal $, and $2 for he capture group. Read Specifying a string as a parameter in the replace docs.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26205178
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/a/26222954
type: AcceptedAnswer
has body: Your problem is not in discs.click but in changeSlide(). With this edit it will works: function changeSlide() { slideAnimating = true; console.log( "slide out =&gt; " + slideNumber ); console.log( "slide IN =&gt; " + nextSlide + "\n" ); currentDisk = nextSlide; // Edit #1 TweenMax.to( discs.eq(slideNumber), 1, {backgroundColor:"#ffffff", borderColor:"#f10000"}); TweenMax.to(slides[slideNumber], duration, { left:"-100%", onComplete:function() { slideAnimating = false; timerFunction.restart(true); if( wrapper.hasClass( "mouse-over" ) ) { timerFunction.pause(); } TweenMax.set(this.target, {left:"100%"}); } }); TweenMax.fromTo( discs.eq(currentDisk), 1, {backgroundColor:"#ffffff", borderColor:"#f10000"}, {backgroundColor:"#f10000", borderColor:"#ffffff"}); TweenMax.to(slides[nextSlide], duration, { left:"0%" }); if( nextSlide &lt; totalSlides -1 ) { slideNumber = nextSlide; nextSlide++; } else { slideNumber = nextSlide; nextSlide = 0; console.log("first slide!!"); } }
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26222567
answers question: http://stackoverflow.com/q/26222567
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/41335163
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26335645
type: Comment
has text: OP left out the small detail that `$current` is both a jQuery variable and not initialised, so will crash on `[0]`.

http://stackoverflow.com/a/37805534
answers question: http://stackoverflow.com/q/26309513
has body: first check Jetbrains IDE Support install on your chrome then right click on icon go to option check port, I use routing in my angular application for this reason in URL of webstorm javascript debug not selected the specific html file just for example (http://localhost:63342/sampleproject/) write on urlbox then breakpoint in controllers worked . this solution worked for me
type: Answer
score: 0

http://stackoverflow.com/comment/41091599
comment on: http://stackoverflow.com/a/26204140
type: Comment
has text: Basicly yes, but what if there are children elements in `li`s?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41223840
has text: It's not what I meant. Those are two different elements, one of which I have no control of. The first element should be shown when the other is focused but I cannot name the one being focused.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26275381
type: AnswerComment

http://stackoverflow.com/comment/41237344
type: QuestionComment
type: Comment
has text: You might need understand more about [`this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this).
score: 0
comment on: http://stackoverflow.com/q/26281908

http://stackoverflow.com/q/26297997
downvote count: 0
has answer: http://stackoverflow.com/a/26298111
accepted answer: http://stackoverflow.com/a/26298111
has comment: http://stackoverflow.com/comment/41267056
has title: Generate incremented random numbers between 0 to 100 every second where new number should be greater than the previous nymber
type: Question
score: 1
tagged with: counter
has comment: http://stackoverflow.com/comment/41266190
tagged with: random
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26298517
tagged with: javascript
has comment: http://stackoverflow.com/comment/41266003
favorite count: 0
has answer: http://stackoverflow.com/a/26298210
has body: I need a javascript where with every second call i get a random number between 0-100 where current number should be greater than previous number. I wrote a code to get random numbers every second but stuck at generating it with increment. &lt;script&gt; var span = document.getElementsByTagName("span")[3]; var i = 100; (function randNumber() { var a = Math.floor((Math.random() * i) + 1); span.innerHTML = "RandNumber: " + a; setTimeout( randNumber, 1000); })(); Note : The numbers should generate randomly. example result may be : 2,5,7,8,22,23,34,56,78,88.....
has comment: http://stackoverflow.com/comment/41265282
has comment: http://stackoverflow.com/comment/41266601
tagged with: increment
possible better answer: http://stackoverflow.com/a/26298210
type: AnsweredQuestion

http://stackoverflow.com/comment/41335021
has text: Can you please share with us the attempts you have made so far? As it currently stands, it just looks like you're asking us to do your work for you - this is not how [so] operates.
score: 0
comment on: http://stackoverflow.com/q/26335979
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26340419
has comment: http://stackoverflow.com/comment/41932885
has comment: http://stackoverflow.com/comment/41343639
answers question: http://stackoverflow.com/q/26339984
score: 0
has comment: http://stackoverflow.com/comment/41343708
type: Answer
has body: Try something like this: Auth Second Third Fourth drop: function (e, ui) { var $field = "<" + ui.draggable.data("type") + " " + // the rest } Better would be something like: drop: function (e, ui) { var $element = $("<" + ui.draggable.data("type") + ">"); $element.addClass("someClass"); }
has comment: http://stackoverflow.com/comment/41939845

http://stackoverflow.com/a/26218455
has comment: http://stackoverflow.com/comment/41118628
has body: If the code is actually running, you should be able to view response headers from the Post URL using Chrome or Firefox dev tools. That should give you what the actual response is and help you debug the answer, I imagine its simply returning something close to what you have, but not exactly what you have.
answers question: http://stackoverflow.com/q/26217740
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26228804
has comment: http://stackoverflow.com/comment/41139694
answers question: http://stackoverflow.com/q/26228761
downvote count: 0
score: 1
has body: $("input:radio[name='group']").click(function() { var value = $(this).val(); if (value == 'Scheduled Payment'){ $("#div").show(); } else { $("#div").hide(); } }); and put your date input inside the div: Effective Date*
upvote count: 1
type: Answer

http://stackoverflow.com/a/26294504
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26293473
has body: The following code works for me. Please check this. // This code will returns all the based on the selector and split them based on empty seperator var arr = jQuery(a).attr('class').split(' '); //Removes all empty strings arr = jQuery.grep(arr, function( a ) { return a !== ''; }); // This condition will be satisfied on if the selector contains multiple classes if(arr.length &gt; 1){ //Code to execute }

http://stackoverflow.com/comment/41296411
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26315136
has text: @charlietfl that does not work either. I might have to use pure css for those click events
score: 0

http://stackoverflow.com/comment/41360782
score: 0
comment on: http://stackoverflow.com/q/26350063
type: QuestionComment
type: Comment
has text: @jorblume the videos are in a public folder.

http://stackoverflow.com/a/26307290
answers question: http://stackoverflow.com/q/26306971
has body: Here is the "loop" you are asking for. But this is still wrong. If tnl is not assigned after $find('mylist'); returns, it is not going to become assigned later. You likely have error thrown by $find call. window.onload = function () { try { var tnl = $find('mylist'); var timer = setInterval(function() { if (tnl) { clearInterval(timer); tnl.selectFirstItem(); } }, 1000); } catch (exception) { alert(exception); } }
type: Answer
has comment: http://stackoverflow.com/comment/41282503
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41282476
accepted answer of: http://stackoverflow.com/q/26306971

http://stackoverflow.com/comment/41235258
comment on: http://stackoverflow.com/q/26281548
type: Comment
type: QuestionComment
has text: Simple answer: Don't make it local.
score: 1

http://stackoverflow.com/comment/41079007
has text: any easy way to identify the declaration? I have so many (4-5 ) libs
score: 0
comment on: http://stackoverflow.com/q/26196983
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26237922
has title: Logic Flow Flaw in custom html builder
has comment: http://stackoverflow.com/comment/41155185
has comment: http://stackoverflow.com/comment/41156241
accepted answer: http://stackoverflow.com/a/26241512
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41155921
type: Question
upvote count: 4
has body: I set out to create a simple html builder for myself basically it works like this: My syntax is as follows: id1,id2 <- comma separated would produce 2 div groups You can also do inner classes with clearfix added to its inner parent as such: (* denotes class, ! denotes id) id1*class1*class2,id2!id1!id2 The problem happens when I try to mix adding inner classes (*) and ids (!) such as this: id1*class1!id1 This SHOULD create the following block - however I am at a loss now for how to get there. Live preview my script: http://labs.remixdesigninc.com/builder/index.html Code Reference: $(document).ready(function(){ window.buildIT = function(htmlItems){ count = htmlItems.length; // First character remove special characters (Allow Letters, Number) for (i=0; i<count; i++){ htmlItems[i] = htmlItems[i].replace(/^[^a-z]/i, ""); } // build HTML for (x=0; x<count; x++){ var currentItemClass = htmlItems[x].indexOf("*"); var currentItemID = htmlItems[x].indexOf("!"); // Check for Sub Class or Sub ID if ((currentItemClass >= 0) || (currentItemID >= 0)){ // Check for Sub Class if (currentItemClass >= 0){ // For Classes var splitSubClass = htmlItems[x].split('*'); makeString = ' \n\t \n'; for (y=1; y<splitSubClass.length; y++){ makeString += '\t\t \n'; } makeString += '\t \n\ \n\n'; $("code").append(document.createTextNode(makeString)); } // Check for Sub ID if (currentItemID >= 0){ // For IDs var splitSubID = htmlItems[x].split('!'); makeString = ' \n\t \n'; for (z=1; z<splitSubID.length; z++){ makeString += '\t\t \n'; } makeString += '\t \n\ \n\n'; $("code").append(document.createTextNode(makeString)); } } else { alert(htmlItems[x] + " does not have an * in it"); // No Sub Child makeString = ' \n\t \n\t \n \n\n'; $("code").append(document.createTextNode(makeString)); } } } $("#btnCreate").click(function(){ $("code").html(""); var htmlItems = $("#text").val(); if (htmlItems){ htmlItems = htmlItems.replace(/ /g, ""); //remove all spaces htmlItems = htmlItems.replace(/[^a-z0-9,\-_*!]/g…
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41155066
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/41156498
favorite count: 0
has answer: http://stackoverflow.com/a/26241512
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26248258
answers question: http://stackoverflow.com/q/26248215
has body: Should be able to write it in: &lt;% Response.Write(".. .. var myLatlng = new google.maps.LatLng(" &amp; latitude &amp; ", " &amp; longitude &amp; "); .. ")%&gt;
has comment: http://stackoverflow.com/comment/41174774
score: 0
type: Answer

http://stackoverflow.com/comment/92745484
has text: you asked for images/files but just sending images is answered
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26331787
score: 2

http://stackoverflow.com/comment/41336813
score: 0
has text: They both do the same thing. If `window.jQuery` is not present, inject an alternate URL for jQuery. The first is a common pattern in JS code (if something is missing/undefined evaluate the expression on the right instead).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26336934

http://stackoverflow.com/comment/41308612
score: 0
type: Comment
has text: Opps! Sorry my bad and Thanks!
comment on: http://stackoverflow.com/a/26321757
type: AnswerComment

http://stackoverflow.com/comment/41151876
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26236017
type: AnswerComment
has text: Thanks for answering! what I want is that whenever a certain page is loaded, a certain css class changes so it is compatible with the page preferences. From your answer, i can't see how that helps me.. :/

http://stackoverflow.com/comment/41101856
has text: @bloodseeker: Please read [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26209301
type: QuestionComment

http://stackoverflow.com/comment/41368215
has text: It is/was there all along, just not formatted correctly for SO
comment on: http://stackoverflow.com/q/26353690
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/60204030
type: Answer
has body: I had the same problem. I used sitemesh and decorators. the problem solved when I injected the JS script's links twice both in the decorator and the webpage! The order is important too ,use following order :
answers question: http://stackoverflow.com/q/26252938
score: 0

http://stackoverflow.com/comment/41253673
score: 0
type: AnswerComment
has text: Which other elements would you be adding a hidden class to?
type: Comment
comment on: http://stackoverflow.com/a/26291369

video
tags question: http://stackoverflow.com/q/26315234
type: Tag
tags question: http://stackoverflow.com/q/26245049
tags question: http://stackoverflow.com/q/26308403
tags question: http://stackoverflow.com/q/26244112
tags question: http://stackoverflow.com/q/26254298
tags question: http://stackoverflow.com/q/26312489
tags question: http://stackoverflow.com/q/26302339
tags question: http://stackoverflow.com/q/26243187
tags question: http://stackoverflow.com/q/26264277
tags question: http://stackoverflow.com/q/26232715
tag name: video
tags question: http://stackoverflow.com/q/26350552
tags question: http://stackoverflow.com/q/26257395
tags question: http://stackoverflow.com/q/26245356
tags question: http://stackoverflow.com/q/26217509

http://stackoverflow.com/comment/41224081
comment on: http://stackoverflow.com/a/26275622
type: AnswerComment
score: 0
type: Comment
has text: :grins: I was just editing comment to acknowledge poor tags - you beat me to it. :)

http://stackoverflow.com/comment/41346996
type: AnswerComment
score: 0
type: Comment
has text: @Frogmouth sooo what? Let me explain you one thing. SO doesn't restrict viewing and answering same question by multiple users simultaneously. So it is possible to get into situation when several users can give similar answer to a question. And my answer is not the same - see link to jsfiddle.
comment on: http://stackoverflow.com/a/26342229

http://stackoverflow.com/comment/41340282
has text: What doesn't work? What route alternatives are you unable to get? Examples?
comment on: http://stackoverflow.com/q/26338733
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26327503
possible better answer: http://stackoverflow.com/a/26327587
has title: Change background image of a div
type: Question
tagged with: javascript
answer count: 6
score: 0
has answer: http://stackoverflow.com/a/26327705
has answer: http://stackoverflow.com/a/26327587
has body: I have 4 pages. for example: here.com/, here.com/page1/, here.com/page2/, here.com/page3/ all 4 pages is using the same template (i didn't write the template), and it has a top box with a background image. something like this: some text here the css: #topbox {background:url('path/to/image/here.jpg') no-repeat}; Problem is all 4 pages is using the same image since it has the same id #topbox, and I'm not able to go in and change the structure of the pages. Is there a way that I can use js to detect the url path, say if it's at root then background will be defaultpic.jpg, if /page1/ will use picture1.jpg, /page2/ will use picture2, /page3/ will use picture3.jpg
has answer: http://stackoverflow.com/a/26328088
accepted answer: http://stackoverflow.com/a/26328088
has answer: http://stackoverflow.com/a/26359674
has answer: http://stackoverflow.com/a/26327788
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26327994

http://stackoverflow.com/a/26242497
has comment: http://stackoverflow.com/comment/65073880
upvote count: 2
downvote count: 0
type: Answer
has body: As Rob said, it's primarily to get around cross-domain issues not supported in older browsers. However, as of recently GA has added support for the navigator.sendBeacon() method, which actually is cheaper, allows for retries on error, and doesn't have the problem of failing when the page is being unloaded (like when trying to send an event when a user clicks on an outbound link). As browser support increases, this will likely become the default method for sending hits to GA. Here's the documentation on how to use sendBeacon with analytics.js: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#useBeacon
answers question: http://stackoverflow.com/q/26241831
score: 2

http://stackoverflow.com/q/26300966
possible better answer: http://stackoverflow.com/a/26301123
type: Question
has answer: http://stackoverflow.com/a/26301035
has comment: http://stackoverflow.com/comment/41271537
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41270756
answer count: 3
has comment: http://stackoverflow.com/comment/41271591
has title: Why does this click function not work after clicking a second item?
score: -2
has comment: http://stackoverflow.com/comment/41271425
accepted answer: http://stackoverflow.com/a/26301035
favorite count: 0
has answer: http://stackoverflow.com/a/26301221
has comment: http://stackoverflow.com/comment/41271723
has comment: http://stackoverflow.com/comment/41271473
downvote count: 2
has comment: http://stackoverflow.com/comment/41270740
has comment: http://stackoverflow.com/comment/41271694
linked to: http://stackoverflow.com/q/1359018
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26301123
has comment: http://stackoverflow.com/comment/41271054
has body: I'm having some issues figuring out why my click function isn't working. I have a JSFiddle for it here: http://jsfiddle.net/adbakke/ve9oewvh/ My html breaks down like so (condensed for posting here): title Description click to close Now my JQuery gets all that HTML under "project" like so: $('.project').click( function() { var newGet = $(this).html(); Then there's a bunch of functions (that all work beautifully) to add this data to , and replace it all if there's already something there. Then when I want to close the project by hitting click to close, it works fine when I click the first item, but if I click a second before closing it does not work. Edit: Click one image, then (before hitting close), click a second image in the project list, and then attempt to click "close project". My close function looks like so: $('.closeMe').click( function() { $('.projectDisplay').fadeOut(500); } ); I have tried putting it both inside and outside the scope of my click function itself. Neither will allow me to have it close upon clicking a second time to open up a different project. What am I missing? Update: Updated JSFiddle base so you can tell the different sections are different.
has comment: http://stackoverflow.com/comment/41271071

http://stackoverflow.com/q/26253858
score: -1
has comment: http://stackoverflow.com/comment/41184964
type: AnsweredQuestion
has title: AngularJS ngRepeat loop variables
tagged with: loops
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41184094
has comment: http://stackoverflow.com/comment/41184171
has answer: http://stackoverflow.com/a/26254000
answer count: 2
upvote count: 0
tagged with: javascript
favorite count: 0
has body: I have the following code: $scope.links = { home: {text:'Home', link:'#'}, about: {text:'Contact', link:'#'}, handeMade: {text:'Contact', link:'#'}, shirts: {text:'Contact', link:'#'}, design: {text:'Contact', link:'#'}, photography: {text:'Contact', link:'#'}, blog: {text:'Contact', link:'#'}, contact: {text:'Contact', link:'#'} } I want to loop the variable inside the scope links using the directive ngRepeat to get the text and the link of each object, is it possible to do that? Thanks.
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26254536
accepted answer: http://stackoverflow.com/a/26254000
has answer: http://stackoverflow.com/a/26254536
tagged with: angularjs-ng-repeat

http://stackoverflow.com/comment/41337643
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26337290
has text: @Satpal With your statement i am getting length as 2 .
score: 0

http://stackoverflow.com/a/37002941
score: 167
type: Answer
has comment: http://stackoverflow.com/comment/101249829
has body: Easiest, if you are using ES6. initialArray = [1, 2, 3]; newArray = [...initialArray, 4]; // --&gt; [1,2,3,4] New array will be [1,2,3,4] to update your state in React this.setState({ arrayvar: [...this.state.arrayvar, newelement] }); Learn more about array destructuring
has comment: http://stackoverflow.com/comment/76996947
has comment: http://stackoverflow.com/comment/118253765
has comment: http://stackoverflow.com/comment/76915492
answers question: http://stackoverflow.com/q/26253351
downvote count: 3
upvote count: 170
has comment: http://stackoverflow.com/comment/90739972
has comment: http://stackoverflow.com/comment/94703290
has comment: http://stackoverflow.com/comment/102193614

import
type: Tag
tag name: import
tags question: http://stackoverflow.com/q/26289397

mysql
tags question: http://stackoverflow.com/q/26279579
tags question: http://stackoverflow.com/q/26329278
tags question: http://stackoverflow.com/q/26336844
tags question: http://stackoverflow.com/q/26248320
tags question: http://stackoverflow.com/q/26203969
tags question: http://stackoverflow.com/q/26240561
tags question: http://stackoverflow.com/q/26276499
tags question: http://stackoverflow.com/q/26331908
tags question: http://stackoverflow.com/q/26353649
tags question: http://stackoverflow.com/q/26335451
tags question: http://stackoverflow.com/q/26267324
tags question: http://stackoverflow.com/q/26235524
tag name: mysql
tags question: http://stackoverflow.com/q/26250090
tags question: http://stackoverflow.com/q/26239566
tags question: http://stackoverflow.com/q/26338254
tags question: http://stackoverflow.com/q/26204571
tags question: http://stackoverflow.com/q/26231105
tags question: http://stackoverflow.com/q/26285965
tags question: http://stackoverflow.com/q/26319864
tags question: http://stackoverflow.com/q/26350128
tags question: http://stackoverflow.com/q/26342314
tags question: http://stackoverflow.com/q/26212896
tags question: http://stackoverflow.com/q/26200858
tags question: http://stackoverflow.com/q/26214900
tags question: http://stackoverflow.com/q/26231208
tags question: http://stackoverflow.com/q/26218130
tags question: http://stackoverflow.com/q/26235715
tags question: http://stackoverflow.com/q/26350666
tags question: http://stackoverflow.com/q/26250505
tags question: http://stackoverflow.com/q/26344185
tags question: http://stackoverflow.com/q/26345537
tags question: http://stackoverflow.com/q/26271890
tags question: http://stackoverflow.com/q/26213503
type: Tag
tags question: http://stackoverflow.com/q/26253023
tags question: http://stackoverflow.com/q/26259229
tags question: http://stackoverflow.com/q/26225731
tags question: http://stackoverflow.com/q/26204488
tags question: http://stackoverflow.com/q/26335435
tags question: http://stackoverflow.com/q/26331228
tags question: http://stackoverflow.com/q/26335905
tags question: http://stackoverflow.com/q/26305937
tags question: http://stackoverflow.com/q/26325248
tags question: http://stackoverflow.com/q/26327022
tags question: http://stackoverflow.com/q/26348813
tags question: http://stackoverflow.com/q/26202499
tags question: http://stackoverflow.com/q/26236136

http://stackoverflow.com/comment/69056508
score: 0
type: Comment
comment on: http://stackoverflow.com/a/40921885
has text: This would be a much better answer if you included more than just a code dump: http://stackoverflow.com/help/how-to-answer
type: AnswerComment

http://stackoverflow.com/a/26198957
has body: RegExp.prototype.exec returns an array containing the matched text and then one item for each capturing parentheses. On "I AM BOB": t.exec(a) returns ["I AM BOB", "BOB", undefined]. It returns undefined because the second capturing parentheses did not captured anything. On "MY NAME IS BOB": t.exec(a) returns ["MY NAME IS BOB", undefined, "BOB"] To fix it you would have to access t.exec(a)[2]. Ted Hopp's solution to fix this is what you want to do though.
answers question: http://stackoverflow.com/q/26198869
score: 0
type: Answer

http://stackoverflow.com/comment/41390704
comment on: http://stackoverflow.com/a/26318211
has text: Yes, you are right, but they are in an asp:Login control. If I convert them into an input type=text, then in the code behind they are HtmlInputText which when used within an asp:Login control throws exceptions. I can get the change or keyup events to fire. It's that when the form controls are autocompleted, I can't catch the events. I'm looking for a novel solution using Dojo.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41301355
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26317769
has text: for numbers with decimal point, like prices, it's better to use `parseFloat` to preserve that decimal (unless you don't want to of course)
score: 0

http://stackoverflow.com/a/26197267
answers question: http://stackoverflow.com/q/26196889
has body: The reason it shoots right to 100% is because there is no intermediary between document-ready to window-loaded. Your JS doesn't have an event to say "Im XYZ% done loading the objects". The browser does - but it's still doing a LOT of work to do that integration (getting the headers for all elements on the page, their file sizes, and the sum as it all comes in). But none of that is exposed to the javascript - that's internal browser engine code. So you have just one step - from dom-ready to window-loaded - that's why it fires up. The other guy answering your question using a setTimeOut is just simulating a percentage loading - it's not a true representation of the actual percentage. Unfortunately, you'll never get it. Unless you're doing a lot of REST calls, AJAX calls and loading your objects atomically -- you can sort of simulate it by "I'm loading 10 objects via REST/AJAX/OWIN [please don't] -- trigger a bump up each time one is done" sort of thing.
type: Answer
has comment: http://stackoverflow.com/comment/41079650
has comment: http://stackoverflow.com/comment/41079400
has comment: http://stackoverflow.com/comment/41079435
score: 0

http://stackoverflow.com/comment/41324463
type: QuestionComment
comment on: http://stackoverflow.com/q/26329402
score: 0
type: Comment
has text: Maybe: Jquery.('#datepickers').hide(); yourFunction(dateText);

http://stackoverflow.com/q/26257734
has comment: http://stackoverflow.com/comment/41194948
tagged with: css
type: UnansweredQuestion
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/41190897
tagged with: javascript
has title: featherlight.js in Wordpress custom template
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41190797
tagged with: jquery
has body: I made a custom template in wordpress, and everything works good, except featherlight.js, which worked in the non-wordpress version of the website, but doesn't work in the Wordpress template. All of the files are loaded successfully from the server. Right now, the images are opened in a new window, instead of the lightbox. featherlight.min.css - loaded by @import url('css/featherlight.min.css');in the style.css file. featherlight.min.js - loaded before the &lt;/body&gt;tag - &lt;script src="&lt;?php bloginfo('template_url') ?&gt;/js/featherlight.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; Image example: &lt;a href="&lt;?php bloginfo('template_url'); ?&gt; /img/ss/scrsht2-big.jpg" data-featherlight="image"&gt;&lt;img src="&lt;?php bloginfo('template_url'); ?&gt; /img/scrsht2.jpg" /&gt;&lt;/a&gt;
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26537797

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/26315885

http://stackoverflow.com/a/28247247
answers question: http://stackoverflow.com/q/26331419
type: Answer
upvote count: 1
has body: Woah, this is quite an old post. I am also implementing bar graph using this plugin. I was having this trouble yesterday. I managed to solve this issue by taking a look at their page source. I found out that the person was able to clear the modification made on the graph. Hence, is this line of code that reset the values. $('#DivforGraph').html(''); //reset graph during dynamic change :) *I will post the solution here.Maybe it might benefit someone who is facing the same problem as us! Cheers! ^_^
score: 1
downvote count: 0

http://stackoverflow.com/comment/41110372
type: QuestionComment
has text: What browser are you using? I tried with chrome, set a breakpoint in the if(Request.QueryString["pb"] != null) and the code stopped there.
comment on: http://stackoverflow.com/q/26214086
score: 0
type: Comment

http://stackoverflow.com/comment/41183372
type: QuestionComment
has text: isn't `Cars` key an array `[]` or if its object, `0` `285` are dynamic keys or static ?
comment on: http://stackoverflow.com/q/26253156
score: 0
type: Comment

http://stackoverflow.com/a/26291439
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26291181
has body: Triggering key events, will be received by anything listening for them, but they will NOT affect the input. I've tested your code and the event is actually being fired. That said, I have in the passed used a jQuery plugin called jquery.sendkeys.js (see https://github.com/dwachss/bililiteRange/blob/master/jquery.sendkeys.js) to simulate keystrokes. NOTE: The jquery.sendkeys.js requires bililiteRange.js. https://github.com/dwachss/bililiteRange/blob/master/bililiteRange.js.

http://stackoverflow.com/a/26204912
accepted answer of: http://stackoverflow.com/q/26204743
downvote count: 0
score: 1
has body: JS Fiddle html &lt;form action="javascript:ale()"&gt; &lt;div&gt; &lt;input type="text" id="find"&gt; &lt;input type="submit"&gt; &lt;/div&gt; &lt;/form&gt; javascript function ale() { a = document.getElementById("find").value if (a == 'Spark' || a == 'Fire') { var monster = 40 var damage = Math.floor(Math.random() * 10) alert('Enemy has ' + (monster - damage) + ' Health!'); } else{ alert('worng keyword'); } }
type: AcceptedAnswer
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26204743

http://stackoverflow.com/comment/41123365
type: QuestionComment
comment on: http://stackoverflow.com/q/26209652
has text: Thanks for the response but I am actually rendering the chart on the server side by inputting my own JavaScript file into the highcharts-convert.js running with PhantomJS. Is it possible to still create divs and style them using CSS?
score: 0
type: Comment

http://stackoverflow.com/a/26317810
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26317733
accepted answer of: http://stackoverflow.com/q/26317733
has comment: http://stackoverflow.com/comment/41302173
has body: Typically in such situation you just disable a button until request is complete. For this you will need to provide a callback function. For example: $("#friendsDiv").on("click", "#aFriend", function (event) { // reference the button var button = this; // disable the button this.disabled = true; // provide a callback to be invoked when post is done retrieveMessages(function() { button.disabled = false; }); }); function retrieveMessages(callback) { $.post("PHP/chat.php", { action: 'retrieveMessages', last_message: last_message, conversation_id: conversation_id }, function (data) { $("#messages").append(data); last_message = $("#messages").find(".aMessage:last").attr("id"); $("#messages").animate({ scrollTop: $("#messages")[0].scrollHeight }, 1000); // execute callback which enables button again callback(); }); } Demo: http://jsfiddle.net/9t8fLdjn/

http://stackoverflow.com/q/26207069
has comment: http://stackoverflow.com/comment/41097512
has answer: http://stackoverflow.com/a/26207460
has comment: http://stackoverflow.com/comment/41097924
score: 1
upvote count: 1
type: Question
tagged with: rotation
tagged with: canvas
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26207460
has comment: http://stackoverflow.com/comment/41097518
has title: How can I increment the rotation angle for a JS object in HTML5 canvas?
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
has body: My problem is that the inintialization of the red line is rotated by an angle equal to the yellow line ... I want to make this angle equal zero (red line angle ) in the begining only. ** then rotate as the mouse move. . here how I draw the line var x = W / 2; var y = H / 2; var lineLength = 900; ctx.save(); ctx.translate(x, y); ctx.rotate(((0.003 * (mouse.x - p.w))/2)) ; // how to increment the angle ?? ctx.moveTo(-lineLength / 2,0, 0); ctx.lineTo(lineLength / 2.0, 0); ctx.stroke(); ctx.restore();
type: AnsweredQuestion

http://stackoverflow.com/comment/41409700
comment on: http://stackoverflow.com/a/26335085
score: 0
type: AnswerComment
has text: above two code also not working. i think i have to change in css file. by using option if i change it is not reflecting
type: Comment

http://stackoverflow.com/comment/41132178
score: 1
has text: hmm give me some time to work it please. But tommorow is kinda late here :)
comment on: http://stackoverflow.com/a/26225319
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26279811
tagged with: asynchronous
has answer: http://stackoverflow.com/a/26280327
accepted answer: http://stackoverflow.com/a/26280327
has body: I am trying to push some values to array by fetching data from Jenkins APIs, like below. buildNum = 14; async.waterfall([ function(callback){ for ( var i = buildNum; i &gt; (buildNum-5); i--) { (function(){ jenkins.build_info('BuildDefinitionRequest', i, function(err, data) { if (err){ return console.log(err); } var tmpObj = {}; tmpObj.jobID = data.fullDisplayName; tmpObj.result = data.result; tmpObj.dateTime = data.id; console.log(tmpObj); finalArray.push(tmpObj); }); })(); } callback(null, finalArray, 1); }, function(finalArray, value, callback){ console.log(finalArray, value); callback(null, 'done'); } ],function(err, result){ }); But "callback(null, finalArray, 1);" is getting called before the for loop finish its execution. When I am printing the value of "finalArray" inside the for loop I am able to see all the values.
tagged with: node.js
has title: NodeJS console.log executing before executing the FOR LOOP
type: AnsweredQuestion
favorite count: 0
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
score: 0
downvote count: 1

http://stackoverflow.com/a/26303454
has comment: http://stackoverflow.com/comment/41283325
score: 0
has body: Solution 1 Put your javascript code in the PHP page and echo the variable value, ie: c = a(' Image Title http://imagelink.com/thisimage.jpg Image description <a href="main.php?location=<?php echo urlencode($variable) ?>" class="btn btn-primary btn-sm">Go to Artist Delete '), d = a(' '); Solution 2: In you JS file do something like var MYAPP = MYAPP || (function(){ var _vars = {}; return { init : function(variables) { _vars = variables; // ... you other code }, superBox : function() { //.. your other code c = a(' Image Title http://imagelink.com/thisimage.jpg Image description Go to Artist Delete '), d = a(' '); //.. your other code } }; }()); then in your php file:
type: Answer
answers question: http://stackoverflow.com/q/26303253

http://stackoverflow.com/comment/41263388
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26277577
has text: I hope your code isn't formatted like this in your project as well... If you use proper indentation, it'll be a lot more readable and maintainable!

http://stackoverflow.com/q/26249264
has comment: http://stackoverflow.com/comment/41176521
has comment: http://stackoverflow.com/comment/41176412
has answer: http://stackoverflow.com/a/26249374
has body: I am trying to write javascript code that will emulate a program that prints ping for numbers divisible by three, pong for numbers divisible by five, and ping-pong for numbers divisible by both, otherwise just printing the number. I've got it to work but I know I should probably use jQuery to make this more efficient. I been following a tutorial on the prepend method and read up on it a bit but I can't figure out how to implement it into my code yet. Any pointers?
type: Question
has answer: http://stackoverflow.com/a/26249331
has title: How do I use the prepend function in jQuery to make my code more efficient?
has comment: http://stackoverflow.com/comment/41176429
tagged with: javascript
has comment: http://stackoverflow.com/comment/41176388
score: 0
answer count: 2
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/41322877
has text: for(var i=0;i<jsObj.names.length;i++) { alert(jsObj.names[i].name); if(name.value==jsObj.names[i].name) { //do additional stuff } }
comment on: http://stackoverflow.com/a/26329405
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26236894
score: 0
type: Answer
has body: With that continue and the spare temp = [] reset your control flow is really messed up. Before g3p = 0; is executed and the innermost loop (that pushes to result and resets temp), the flow jumps back to temp.push(g2[g2p]); which is called twice on a the same temp array. I'm not going into detail here… If you need to know, use a debugger and step through the execution. I've made a working version that uses continue, but I'm not really lucky with it: outerloop: while (g1p &lt; g1len) { temp.push(g1[g1p]); while (g2p &lt; g2len) { temp.push(g2[g2p]); while (g3p &lt; g3len) { temp.push(g3[g3p]); result.push(temp); temp = []; g3p++; continue outerloop; } g3p = 0; temp = []; g2p++; continue outerloop; } g2p = 0; temp = []; g1p++; // continue outerloop; (implicit) } You can see the symmetric structure here, on every level the same things happen. And whenever we enter the outerloop to get the sequence temp.push(g1[g1p]); temp.push(g2[g2p]); temp.push(g3[g3p]); result.push(temp); executed, we reset temp before. The usual idea to create permutations is to use no continue, but nest normal for loops that mutate an array, and take snapshots of each state to append to the result: temp = []; g1p = 0; while (g1p &lt; g1len) { temp[0] = g1[g1p]; g2p = 0; while (g2p &lt; g2len) { temp[1]= g2[g2p]; g3p = 0; while (g3p &lt; g3len) { temp[2] = g3[g3p]; result.push(temp.slice()); g3p++; } g2p++; } g1p++; }
answers question: http://stackoverflow.com/q/26236149

http://stackoverflow.com/q/26250461
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41178350
has body: a bit of a specific question. I've been reading about how to target ie10 and below but really haven't found any concrete answer that works for my situation. I'm using a framework for my website that does not support ie10 (google's polymer) very well so I have an alternate page set up for when the user is using ie10 and below. I'm running into the issue that when I open my webpage in ie10, the resource required to get polymer to run platform.js is causing so many errors that it's preventing the rest of my resources from loading somehow. platform.js is at the top of my loading order, and I'm not loading asynchronously. I'm trying to target ie10 in a js file that has to load underneath platform.js but my code isn't registering at all due to platform.js causing so many errors. I am wondering if there is a way to only load platform.js if the browser is !ie10 while still putting it at the top of the load order. Ugh this is driving me insane. Even a link to where I can read about how to make my resources load only on certain events would be helpful. Thanks for any info!
type: Question
tagged with: polymer
has comment: http://stackoverflow.com/comment/41178434
score: 1
has answer: http://stackoverflow.com/a/26289596
has comment: http://stackoverflow.com/comment/41178500
linked to: http://stackoverflow.com/q/19999388
has comment: http://stackoverflow.com/comment/41178380
has title: How to prevent resource from being loaded if ie10 and below?
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26293982
has answer: http://stackoverflow.com/a/26296648
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a dropdown select form element. When an option is selected, I want to do something. Even if the value that is chosen from the dropdown is the already-selected option. So "on change" won't work in this case. How can I do that?
accepted answer: http://stackoverflow.com/a/26296648
has comment: http://stackoverflow.com/comment/41257794
has comment: http://stackoverflow.com/comment/41257982
has comment: http://stackoverflow.com/comment/41257814
linked to: http://stackoverflow.com/q/15452103
type: AnsweredQuestion
has title: Jquery callback when any select box option is chosen (not changed)
type: Question
has comment: http://stackoverflow.com/comment/41258020

http://stackoverflow.com/comment/41237538
comment on: http://stackoverflow.com/q/26282242
type: Comment
type: QuestionComment
has text: Your fiddle does not seem to match your question.
score: 0

http://stackoverflow.com/a/26332781
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26331622
accepted answer of: http://stackoverflow.com/q/26331622
has body: As per @unidentified: There is a syntax error in your code, missing , after the messages property. Please check How can I debug my JavaScript code? $(document).ready(function() { $("#log-form").validate({ errorElement: 'div', rules: { "username": { required: true, minlength: 5 }, "password": { required: true, minlength: 5 } }, messages: { username: { required: "Provide a username,sire", minlength: "Username with length 5 atleast,is required" }, password: { required: "Provide a password,sire", minlength: "Minimum length of 5 is required for password,sire" } }, // syntax error, comma was missing here submitHandler: function(form) { form.submit(); } }); });
type: AcceptedAnswer

http://stackoverflow.com/comment/41114425
comment on: http://stackoverflow.com/a/26211599
score: 0
type: AnswerComment
has text: Thanks. But How do you know this is an usual issue? Is it just because of these kind of questions are posting up in here a lot?
type: Comment

http://stackoverflow.com/comment/41329133
type: AnswerComment
comment on: http://stackoverflow.com/a/26332628
score: 0
type: Comment
has text: @jitendragarg "doesn't work" is a pretty broad term...there's no reason why registering a script block on page load should not work. However, usually, it is recommended to register script blocks at a later stage of the page lifecycle such as `OnPreRender`...especially if you need to query server controls that might change value during a request

http://stackoverflow.com/q/26196027
answer count: 1
has body: This javascript slideshow works perfect locally, but when put live it shows all 4 images static on page. What do I need to add/change to make this work?? Now I can't post this unless I have more "detail" trying to write more so that this post can be accepted. window.addEventListener('load', slideShow, false); function slideShow() { /* GLOBALS **********************************************************************************************/ var globals = { slideDelay: 2750, // The time interval between consecutive slides. fadeDelay: 35, // The time interval between individual opacity changes. This should always be much smaller than slideDelay. wrapperID: "slideShowImages", // The ID of the &lt;div&gt; element that contains all of the &lt;img&gt; elements to be shown as a slide show. buttonID: "slideShowButton", // The ID of the &lt;button&gt; element that toggles the slide show on and off. buttonStartText: "Start Slides", // Text used in the slide show toggle button. buttonStopText: "Stop Slides", // Text used in the slide show toggle button. wrapperObject: null, // Will contain a reference to the &lt;div&gt; element that contains all of the &lt;img&gt; elements to be shown as a slide show. buttonObject: null, // If present, will contain a reference to the &lt;button&gt; element that toggles the slide show on and off. The initial assumption is that there is no such button element (hence the false value). slideImages: [], // Will contain all of the slide image objects. slideShowID: null, // A setInterval() ID value used to stop the slide show. slideShowRunning: true, // Used to record when the slide show is running and when it's not. The slide show is always initially running. slideIndex: 0 // The index of the current slide image. } /* MAIN *************************************************************************************************/ initializeGlobals(); if ( insufficientSlideShowMarkup() ) { return; // Insufficient slide show markup - exit now. } // Assert: there's …
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41077425
has answer: http://stackoverflow.com/a/26202224
has comment: http://stackoverflow.com/comment/41094112
type: Question
has comment: http://stackoverflow.com/comment/41079033
has comment: http://stackoverflow.com/comment/41078288
has comment: http://stackoverflow.com/comment/41077325
tagged with: slideshow
tagged with: javascript
score: 0
has title: Javascript slideshow works locally, but when live it shows all images static
has comment: http://stackoverflow.com/comment/41077283

http://stackoverflow.com/a/26209119
upvote count: 6
downvote count: 0
has body: Not tested, bit this should work var myDiv = document.querySelector('#myDiv'); myDiv.innerHTML = myDiv.innerHTML.split(' ').map(function(word){ return "&lt;b&gt;"+word+"&lt;/b&gt;"; }).join('');
answers question: http://stackoverflow.com/q/26209087
type: Answer
score: 6

http://stackoverflow.com/q/26350369
favorite count: 0
has title: Remove label from custom Highcharts drawing
has body: I've created a custom Highcharts drawing, and I currently have it where it displays a label if the user mouses over an element. However, I want to remove the label on mouseout. This is what I have so far: $('#container').highcharts({ chart: { backgroundColor: 'white', events: { load: function () { var ren = this.renderer; ren.rect(50, 50, 60, 50, 0) .attr({ 'stroke-width': 2 }) .on('mouseover', function() { ren.label('Foo') .attr({ fill: Highcharts.getOptions().colors[0], padding: 10, r: 5, zIndex: 8 }) .css({ color: '#fff' }) .add(); }) .on('mouseout', function() { // need to remove the Foo label here }) .add(); } } } } }); Any ideas?
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/41361336
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26357244
answer count: 1
tagged with: highcharts
downvote count: 0
accepted answer: http://stackoverflow.com/a/26357244

http://stackoverflow.com/a/26290874
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26290435
type: Answer
answers question: http://stackoverflow.com/q/26290435
has body: Fixed it. Fiddle: http://jsfiddle.net/1o1dnpsw/3/ Added 2 variables to function addBox(): var oldX; var oldY; And changed both the drag and dragend events to: .on('drag', function () { oldX = r.attr('x'); oldY = r.attr('y'); x = d3.event.x; r.attr('x', x); y = d3.event.y; r.attr('y', y); }) .on('dragend', function () { if (x == oldX &amp;&amp; y == oldY) { select(); } }));
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41252496

http://stackoverflow.com/q/26305389
score: 0
has body: Trying to crack this little issue I have.. I am using parse.com to store and retrieve data and I have a JSON object I am trying to retrieve a part of to append to an HTML var tempObject = Parse.Object.extend("Dev"); var query = new Parse.Query(tempObject); query.notEqualTo("objectId", "Dan Stemkoski"); query.find({ success: function(results) { alert("Successfully retrieved " + results.length + " receipts"); for (var i = 0; i &lt; results.length; i++) { var object = results[i]; $("#receipts").html(object.get('receipt_title')); console.log(object) //alert(object.id + ' - ' + object.get('receipt_title'));` The result I want to show in &lt;div id = receipts&gt; &lt;div&gt; Unfortunately for some reason I am getting only one line instead of the 10 that I should be getting. I know I should loop somehow to get the results but all my tries have failed me so far. Thanks in advance for help!
has answer: http://stackoverflow.com/a/26305676
has title: Appending to HTML a content of a Javascript object
has answer: http://stackoverflow.com/a/26305544
tagged with: parse-platform
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26305588
answer count: 4
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26305632

http://stackoverflow.com/comment/41246300
type: QuestionComment
type: Comment
has text: You need to wrap the code in `script.js` in one or more functions, then call them once when the page loads, and once each time you reload everything below the header.
score: 1
comment on: http://stackoverflow.com/q/26286566

http://stackoverflow.com/a/37583623
score: -1
answers question: http://stackoverflow.com/q/26270064
upvote count: 0
has body: Hi there are many libraries for mongoose schema validation.some of are listed below. https://github.com/leepowellcouk/mongoose-validator, https://github.com/SamVerschueren/node-mongoose-validator both are good library for mongoose validation..Also mongoose provide custom logic for validation. More if you want to create custom logic then https://github.com/chriso/validator.js helpful to you. for email validation i use this const emailRegex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/ email: { type: String, trim: true, unique: true, required: 'Email address is required', validate: { validator: (email)=&gt; { return emailRegex.test(email) }, message: '{VALUE} is not a valid email' }, match: [emailRegex, 'Please fill a valid email address'] }
type: Answer
downvote count: 1

http://stackoverflow.com/comment/48866926
comment on: http://stackoverflow.com/a/30385401
score: 0
has text: Thanks! Actually can you explain this code? Will this create a pop up search and repalce dialog box?which element of Id is `#openSearch`?
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26279663
has body: I m trying to pass a object to view with viewbag and pass it to javascript parameter in the view But when comes to assign object to script value it looks like string likes its namespace in controller: public ACCIDENT_REPORTS getFilledReportWithEntitiesById(int accidentReport_id) { ACCIDENT_REPORTS report = new ACCIDENT_REPORTS(); report = context.ACCIDENT_REPORTS.Include("ACCR_ENTITIES").Where(a =&gt; a.ID == accidentReport_id).FirstOrDefault(); return report; } ViewBag.Report = DatabaseContext.Current.AccidentReportingRepository.getFilledReportWithEntitiesById(id); //its okey, all data in viewbag in view: &lt;script&gt; debugger var data = '@ViewBag.Report'; &lt;/script&gt; // in debugger value looks like; var data = 'Application.Database.ACCIDENT_REPORTS; Why it looks like string ? how can I pass contents of viewbag to javascript value here is my entity object return type: public partial class ACCIDENT_REPORTS { public ACCIDENT_REPORTS() { this.ACCR_ENTITIES = new HashSet&lt;ACCR_ENTITIES&gt;(); } public decimal ID { get; set; } public decimal FACILITY_ID { get; set; } public Nullable&lt;System.DateTime&gt; START_DATE { get; set; } public Nullable&lt;System.DateTime&gt; END_DATE { get; set; } public string TITLE { get; set; } public Nullable&lt;decimal&gt; ACCIDENT_TYPE { get; set; } public Nullable&lt;decimal&gt; REPORTED_UNDER { get; set; } public Nullable&lt;decimal&gt; SEVESOII_STATUS { get; set; } public Nullable&lt;decimal&gt; INDUSTRIAL_ACTIVITY { get; set; } public string REASON_FOR_REPORTING { get; set; } public string ACCIDENT_DESCRIPTION { get; set; } public string SITE_DESCRIPTION { get; set; } public string UNIT_DESCRIPTION { get; set; } public string CAUSES_OF_ACCIDENT { get; set; } public string CONSEQUENCES { get; set; } public string EMERGENCY_RESPONSE { get; set; } public string LESSONS_LEARNED { get; set; } public string ACCIDENTS_INVOLVING { get; set; } public Nullable&lt;decimal&gt; REPORT_STATUS { get; set; } public virtual ICollection&lt;ACC…
has answer: http://stackoverflow.com/a/26279913
type: Question
answer count: 2
tagged with: asp.net-mvc
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26279913
has answer: http://stackoverflow.com/a/43235385
possible better answer: http://stackoverflow.com/a/43235385
tagged with: viewbag
type: AnsweredQuestion
has title: viewbag object pass to javascript

http://stackoverflow.com/a/26230298
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26230111
has body: You can use split if you know the ID always has that format. var ins = document.getElementsByTagName('input'); for (var i = 0; i &lt; ins.length; i++) { document.write(ins[i].id.split('_')[1]); } // jQuery $('input').each(function() { $('body').append(this.id.split('_')[1]); }); &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input id="list-chk_1" type="checkbox" /&gt; &lt;input id="list-chk_2" type="checkbox" /&gt; &lt;input id="list-chk_3" type="checkbox" /&gt; Split will make an array from the given string, splitting it where you tell it to. "list-chk_1".split('_') // results in ["list-chk", "1"] Other methods could be using var idnr = this.id.replace('list-chk_', '');

http://stackoverflow.com/q/26301811
type: Question
score: 5
has comment: http://stackoverflow.com/comment/41276512
upvote count: 5
tagged with: javascript
has title: Adding worksheet to the excel file using javascript
answer count: 1
downvote count: 0
has body: Just assume I have 3 tables. I want to insert tables in 3 work sheets (per page one table) into a single excel file (without need of ActiveXObject) I tried following code, but its creating only one worksheet var tableToExcel = (function () { var uri = 'data:application/vnd.ms-excel;base64,', template = ' <!--[if gte mso 9]> <x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook> <![endif]--> {table} {table} ', base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))) }, format = function (s, c) { return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; }) } return function (table, name) { if (!table.nodeType) table = document.getElementById(table) var ctx = { worksheet: name || 'Worksheet', table: table.innerHTML } window.location.href = uri + base64(format(template, ctx)) } })();
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26323012
has comment: http://stackoverflow.com/comment/41288474
accepted answer: http://stackoverflow.com/a/26323012
tagged with: excel

http://stackoverflow.com/comment/41317510
score: 0
comment on: http://stackoverflow.com/q/26326666
has text: it returns "undefined"
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26343931
answer count: 0
has body: On my server side (Nodejs + Express) I have a route with long handling: var apiRouter = express.Router(); apiRouter.use(compression()); apiRouter.get("/all", function(req, res, next){ storage.getAllData().then(function(json){ res.json(json) }, next); }); app.use("/api/data", apiRouter); where getAllData reads a number of xml files from the hard drive in "parallel" (I'm using the Q library) and then transform the xml into js (xml2js library): var fs = require("fs"); var path = require("path"); var extend = require("util")._extend; var xmlDir = path.resolve(__dirname, "data"); var q = require("q"); var Parser = require("xml2js").Parser; var readFile = q.denodeify(fs.readFile); /** * Parses input xml-file and return promise with json * @param {String} fileName * @returns {*|Promise} parsed json */ function parse(fileName){ var xmlFile = path.resolve(xmlDir, fileName); var parser = new Parser({ mergeAttrs: true, explicitRoot: false, explicitArray: false }); var parseXml = q.nbind(parser.parseString, parser); var deferred = q.defer(); fs.readFile(xmlFile, function(err, data){ if (err) deferred.reject(err); else deferred.resolve(data); }); var time = process.hrtime(); return deferred.promise.then(parseXml).then(function(json){ var diff = process.hrtime(time); console.log(fileName + ": %d", (diff[0] * 1e9 + diff[1])/1e9) return json; }); } /** * Get xml-file, parses it to json, handle raw result and return a promise with correct json * @param fileName * @returns {Promise|*} result json */ function parseRawItemizedJson(fileName){ return parse(fileName + ".xml") .then(function(rawJson){ var result = {}; result[fileName] = rawJson.item; return result; }); } function parseItemizedArray(fileNames){ return q.all(fileNames.map(parseRawItemizedJson)); } function getAllData(){ return q.spread( parseItemizedArray([ "contractors", "contracts", "districts", "facilities", "facilities_latlon", "info", "scope_of_works", "sequences", "subordinations", "subordinations_ovu", "type_of_works"…
has title: app.get blocks sequential query handling
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41349510
has comment: http://stackoverflow.com/comment/41378750
tagged with: url-routing
tagged with: node.js

http://stackoverflow.com/q/26195403
has comment: http://stackoverflow.com/comment/41077104
has title: Meteor: Synchronous method
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41078481
has answer: http://stackoverflow.com/a/26199789
has body: I'm failing to run a method on the server side synchronously, meaning to wait for it to be done. mymethod: function(par1, par2){ var timer = Meteor.setTimeout(function() { //do something }); } I tried to use Meteor.wrapAsync without success, whether I wrap the timer or the entire method like this: Meteor.wrapAsync(Meteor.call('mymethod', par1, par2));
tagged with: javascript
type: Question
tagged with: meteor
score: 0

http://stackoverflow.com/a/26245089
score: 10
answers question: http://stackoverflow.com/q/26244496
upvote count: 10
has body: I want to the left side div stay unchanged while submitting right side customer form and after done creating customer log, update customer list(drop down) in the left side div(invoice) Based on your description, it sounds like you want to asynchronously POST data, then reload the containing div without performing a full postback: First off, use jQuery Include this line in your HTML: &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; Asynchronously POST with $.ajax() $('#yourForm').submit(function(event) { event.preventDefault(); $.ajax({ type: 'POST', url: 'php/yourPHPScript.php', data: $(this).serialize(), dataType: 'json' }); }); The $(this).serialize() will POST all inputs in the form, so you can access them in your php code-behind with something like this: $yourField = $_POST['yourField]; Dynamically re-load data with $.load() So, you've sent your data back to the server and now you want to reload your div to reflect server-side changes without doing a full postback. We can do this with jQuery's $.load(): Let's write a simple function to call $.load(): function reloadDiv(){ $('#divToReload').load('scriptWithThisDivContent.php'); } We can throw it onto earlier $.ajax() function to execute after the async POST back to the server with a deferred object: $('#yourForm').submit(function(event) { event.preventDefault(); $.ajax({ type: 'POST', url: 'php/yourPHPScript.php', data: $(this).serialize(), dataType: 'json' }).done(function() { reloadDiv(); }); });
downvote count: 0
has comment: http://stackoverflow.com/comment/41170456
type: Answer

http://stackoverflow.com/comment/41200264
type: Comment
type: QuestionComment
has text: [Check this out](http://stackoverflow.com/a/14978745/1188035)
comment on: http://stackoverflow.com/q/26253959
score: 0

http://stackoverflow.com/a/26280551
has body: if relying on file extension is not good enough for you, it is possible to inspect the first bytes of a file and check against some common headers. these are the first bytes of JPEG: FF D8 GIF: 47 49 46 PNG: xx 80 78 71 see: http://www.mikekunz.com/image_file_header.html &amp; http://www.libpng.org/pub/png/book/chapter08.html#png.ch08.div.2 you can read the bytes using the File API: HTML5 File API read as text and binary bare in mind that a client side javascript check can still be modified in the client. so that you would need to re-check on the server. this is why probably just checking the extension on the client might be enough. a user that actively tries to upload a non-image might circumvent both client checks.
accepted answer of: http://stackoverflow.com/q/26280184
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41233490
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26280184

http://stackoverflow.com/comment/41117694
score: 0
type: AnswerComment
type: Comment
has text: @DanFromGermany: Really? I can clearly see `if(prime = false)`.
comment on: http://stackoverflow.com/a/26218063

http://stackoverflow.com/q/26274424
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41223524
has comment: http://stackoverflow.com/comment/41223215
has comment: http://stackoverflow.com/comment/41222909
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41229526
has comment: http://stackoverflow.com/comment/41231106
has comment: http://stackoverflow.com/comment/41223375
score: 2
has body: My application receives data from various source systems. The data are of same nature but different structure. I need to unify the structure and save them into a common repository. What I'm doing now is as below: Define a structure mapping between incoming object and output object. For example, for a source object like: {id:'123', message:'hi', from:{id:'user1', name:'John'}}, its mapping object is as below: var map = {_id:'id', message:'text', 'from.id':'by.id', 'from.name':'by.name'}; Define function as below: function setSubFieldValue(obj, field, value) { if(field &amp;&amp; obj &amp;&amp; value) { var i = field.indexOf('\.'); if( i &gt; 0) { var p = field.slice(0, i); if(!obj[p]) obj[p] = {}; setSubFieldValue(obj[p], field.slice(i+1), value) } else obj[field] = value; } } function getSubFieldValue(obj, field) { if(field) { var i = field.indexOf('\.'); if (i &gt; 0) { var p = field.slice(0, i); if(obj[p]) { var v = field.slice(i+1); return getSubFieldValue(obj[p], v); } } else return obj[field]; } } function mapObject (srcObj, fieldMap) { var obj = {}; Object.keys(fieldMap).forEach(function(k) { var v = getSubFieldValue(srcObj, k); if(v) setSubFieldValue(obj, fieldMap[k], v); }); return obj; }; The code does the trick most of the time but have a few drawbacks: Not supporting structures mapping of objects in array. For example, {arrayproperty:[{a:1, b:2}, {a:2, b:3}]} My code above won't allow me to map this arrayproperty a different structure in the target object, like: {newfield:[{field_a:1, field_b:2}, {field_a:2, field_b:3}]} or {newfield_a_0:1, newfield_b_0:2, newfield_a_1:2, newfield_b_1:3} Using recursive call and not performing well. I'm wondering if anyone has a similar need and some idea of existing libraries to perform such task elegantly.
has comment: http://stackoverflow.com/comment/41230226
has title: JavaScript: Map an object to a different structure

http://stackoverflow.com/a/26297744
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26297481
has body: Try to find the network request for the image using Chrome Dev Tools for instance. Chrome Dev Tools, network tab
answers question: http://stackoverflow.com/q/26297481
type: Answer
score: 1

http://stackoverflow.com/comment/41312917
type: Comment
type: QuestionComment
has text: I Already given whole code ..I will try
score: 0
comment on: http://stackoverflow.com/q/26323948

http://stackoverflow.com/q/26349432
tagged with: numbers
downvote count: 0
linked to: http://stackoverflow.com/q/11966520
score: 1
has answer: http://stackoverflow.com/a/26349561
has answer: http://stackoverflow.com/a/26349492
has comment: http://stackoverflow.com/comment/41359696
type: Question
tagged with: for-loop
tagged with: javascript
has comment: http://stackoverflow.com/comment/41359695
answer count: 3
has title: How do I find all the prime numbers between 1-999 in JavaScript?
upvote count: 1
has body: here is what I have done so far: window.onload = function() { var prime = false; for (var counter = 0; counter &lt; 1000; counter++) { for (var i = 2; i &lt;= counter; i++){ if (counter % i == 0 &amp;&amp; i != counter){ prime = true; } } if (prime == false){ document.write(counter); } } }; This does not give me what I need at all, but I'm not too sure what I am doing wrong. I need to do some stuff with the prime numbers, but right now my issue is getting the prime numbers themselves. Thank you.
has answer: http://stackoverflow.com/a/26349514
has comment: http://stackoverflow.com/comment/41359656
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41211413
has text: Take a look at the availability of features in your version.
comment on: http://stackoverflow.com/q/26266923
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41240387
has text: @jgillich I guess they merge, but I have to override the same attributes (i.e: width: 50px first, width:80px later). And changing the order may work. Thanks!
comment on: http://stackoverflow.com/q/26279789
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26275974
tagged with: javascript
tagged with: fullcalendar
score: 0
has comment: http://stackoverflow.com/comment/41227176
has title: how to get and show date and save into the Database in fullcalendar?
tagged with: php
has body: I try to create a Human resource application using Fullcalendar , users must insert their work hours for each day on it. By clicking on a day a modal (dialog) will open . i was wondering how can i : 1 : get the date user click and show it above the modal (in modal titre)? 2 : how can save that day with other information into DB ? (I am using bootstrap) This is my html code : &lt;div class="modal fade" id="myModal" aria-hidden="true"&gt;&lt;form role="form" method="post" action="#"&gt; (Simple form elements) &lt;/form&gt;&lt;/div&gt; and this is my Fullcallendar : &lt;script&gt; $('#calendar').fullCalendar({ // Italian languge lang: 'it', // Saiz height: 600, dayClick: function(date, jsEvent, view) { // Changing BG color $(this).css('background-color', 'green'); //create window here $('#myModal').modal(); }, header: { left: 'prev', center: 'title', right: 'next', }, editable: true, });&lt;/script&gt;
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41224882
type: Question

http://stackoverflow.com/q/26273405
upvote count: 4
answer count: 2
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/26276924
downvote count: 0
favorite count: 0
has body: Is there a way to retrieve from within my Google Chrome extension the list of all available translations? For instance, my app may contain the following folders: _locales\en\messages.json _locales\fr\messages.json _locales\es\messages.json Is there a way to know that it's en, fr, and es from within the extension itself? And a second question, is there any way to parse a specific messages.json file as the JSON data? I mean a little bit more capabilities than what's provided by chrome.i18n.getMessage().
has answer: http://stackoverflow.com/a/26277026
type: UnansweredQuestion
tagged with: internationalization
tagged with: google-chrome
type: Question
has title: Can I get a list of available locale translations from my Chrome extension?
tagged with: javascript
score: 4

http://stackoverflow.com/q/26267304
type: UnansweredQuestion
has title: Grouping objects of array for knockout binding
answer count: 0
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41251429
has body: I have an objects array that has 27 length: [object(array)] .... .... Each item in this array is empty or consists of an objects of array which has properties as shown below. This could have several loops so it will have many objects. function MainTests(testName, section, totalExpected, totalPasssed, totalDuration, loopExpected, loopPassed, loopDuration) { var self = this; self.sectionName = section; self.testName = testName; self.totalPassExpect = totalExpected; self.totalPassRate = totalPasssed; self.totalDuration = totalDuration; self.loopPassExpected = loopExpected; self.loopPassRate = loopPassed; self.loopDuration = loopDuration; } I want to group by sectionName and testName like this: { section: sectionName, tests: [testName:testName, totalPassExpect: totalExpected........loopDuration:loopDuration..] } I tried this but it only groups it by sectionName: self.GroupMainTest = ko.computed(function () { var mainTestArray = []; for (var i = 0; i &lt; allMainTests.length ; i++) { var group = {}; var result = allMainTests[i]; if (result.length != 0) { for (var j = 0; j &lt; result.length; j++) { if (group[result[j].sectionName] == undefined) { group[result[j].sectionName] = [group[result[j].sectionName]]; } group[result[j].sectionName].push(result[j].sectionName) group[result[j].sectionName].push(result[j].totalPassExpect) group[result[j].sectionName].push(result[j].totalPassRate) group[result[j].sectionName].push(result[j].totalDuration) group[result[j].sectionName].push(result[j].loopPassExpected) group[result[j].sectionName].push(result[j].loopPassRate) group[result[j].sectionName].push(result[j].loopDuration) group[result[j].sectionName].push(result[j].testName) } mainTestArray.push(group); } else { mainTestArray.push(result); } } return mainTestArray; }); My goal is to achieve similar to this plnkr. Can you help?
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41260189
has comment: http://stackoverflow.com/comment/41210093

http://stackoverflow.com/a/26250407
accepted answer of: http://stackoverflow.com/q/26250090
type: Answer
score: 1
upvote count: 1
has body: I hope this will help you $date = "Wed Oct 08 2014 07:40:00"; echo date('Y-m-d h:i:s',strtotime($date)); output 2014-10-08 07:40:00
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26250090

http://stackoverflow.com/comment/41245838
type: Comment
type: QuestionComment
has text: Felix, I was referring to useAge variable.
comment on: http://stackoverflow.com/q/26286927
score: 0

axes
tag name: axes
tags question: http://stackoverflow.com/q/26330775
type: Tag

http://stackoverflow.com/q/26230969
has body: I am trying to make a function where if a specific sequence of keys are pressed then there will result in a redirect function. I know how to do just 1 character but don't know how to redirect after a sequence of them. So far this is the code: document.onkeydown= function(key){ reactKey(key); } function reactKey(evt) { if (evt.keyCode == 73) { if (evt.keyCode == 76) { window.location = "http://www.google.com"; } } } }); } $(document).ready(main); New code: document.onkeydown= function(key){ reactKey(key); } function reactKey(evt) { if(evt.keyCode== 73) { string key1 = 73; }{ if(evt.keyCode== 76) { string key2 = 76; }{ if(key1 === 73 &amp;&amp; key2 === 76) { window.location = "http://www.google.com"; } } } } $(document).ready(main);
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26231474
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41142226
has comment: http://stackoverflow.com/comment/41142316
has title: Javascript sequence of keys redirect function
possible better answer: http://stackoverflow.com/a/26231007
has answer: http://stackoverflow.com/a/26231007
favorite count: 0
has comment: http://stackoverflow.com/comment/41143001
has answer: http://stackoverflow.com/a/26231474
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/26295316
has comment: http://stackoverflow.com/comment/41260646
type: Question
has body: i'm working on a single-page-application. I need the pagecontainerbeforechange event from jQuery-Mobile because i want to check if my site-wrapper has the class "show-nav". When the site-wrapper has this class, the site-menu is opened up and the content moves 350px to the left. So if the user now clicks on register, and before he has the site-menu opened up, my register page is moved away and there is no possiblity to get it back because there is no site-menu on the registerpage. First i tried to use the pagecontainerload event till i saw that it is deprecated. Then i changed it to the pagecontainerloadbeforechange event but i cant get it work. The page i want to check for the class ".show-nav" has the id #registration So, the user is on the main site, he clicks on "register" and before the page changes the class ".show-nav" should be removed. The function for removing the class is already set up, but i don't know how to call it the right way. function toggleNav() { if ($('.site-wrapper').hasClass('show-nav')) { // Do things on Nav Close $('.site-wrapper').removeClass('show-nav'); } More detailed Description -> While i wrote this detailed Description i got the solution and it is so simple that it is embarrassing for me: Removed the site-wrapper from the site #registration...thats all. Thanks for your help and thanks for you edit omar!
tagged with: jquery-mobile
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26295506
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26295506
possible better answer: http://stackoverflow.com/a/28647771
has title: jQuery-Mobile pagecontainerbeforechange does not fire
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28647771

http://stackoverflow.com/comment/41239505
score: 1
has text: Create a fiddle for us... http://jsfiddle.net/
comment on: http://stackoverflow.com/q/26283869
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26332684
type: Question
has body: I've tried my best to solve my own problem but am having trouble getting started with a fairly simple JS script. I'm trying to change the font colour of text which contains the "-" character for a specified element class. This is what I've got: -100 100 What have I done wrong? Edit: this is the final code I went with, which works perfectly well. -100 100
has comment: http://stackoverflow.com/comment/41329031
tagged with: javascript
has comment: http://stackoverflow.com/comment/41329165
answer count: 2
has answer: http://stackoverflow.com/a/26332749
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41329032
favorite count: 0
has title: JavaScript: change style of element specified by class
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26332749
possible better answer: http://stackoverflow.com/a/26332798
upvote count: 2
tagged with: getelementsbyclassname
has answer: http://stackoverflow.com/a/26332798

http://stackoverflow.com/comment/41090737
comment on: http://stackoverflow.com/q/26203691
has text: What does your html code look like? Please post it and make a jsfiddle.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41302711
has text: Thanks for the continous help. Unfortunately gives back "NaN" :(
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26317911

http://stackoverflow.com/comment/41334804
comment on: http://stackoverflow.com/q/26314997
score: 0
type: QuestionComment
type: Comment
has text: I wrote my codes as an answer. Because my codes are too long as don't fit here :)

http://stackoverflow.com/comment/41172191
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26246803
has text: If you're using web forms, you should be using the build in validation controls, they handle clientside and serverside validation, and you should not rely on client side validation only. The extra load serverside for a few lines of validation is negligible. The main advantage of client side validation is a smoother user experience.

http://stackoverflow.com/comment/41137799
score: 0
type: AnswerComment
type: Comment
has text: Could you please answer this question http://stackoverflow.com/questions/26201424/why-do-i-get-two-different-project-context-for-my-spring-mvc-web-application
comment on: http://stackoverflow.com/a/26210076

http://stackoverflow.com/comment/41105553
has text: Thanks. Answer accepted because it answer my particular question. But for later reference, as anonymousxxx said there is a better solution for my root problem described here: http://stackoverflow.com/a/19684440/2955738 (Working code: http://plnkr.co/edit/x2VMhh)
type: AnswerComment
comment on: http://stackoverflow.com/a/26211231
type: Comment
score: 1

http://stackoverflow.com/comment/71677344
type: Comment
score: 0
has text: Cheers for the answer, but if i recall correctly (been a while) i had a missing closing form tag in my code which was screwing everything up.. still thank you for answering :)
type: AnswerComment
comment on: http://stackoverflow.com/a/42259184

http://stackoverflow.com/a/26197633
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41085607
has body: You could use atomic grouping to make your regex work. Unfortunately, the JavaScript regex engine does not support this feature. But there is a trick to mimic its effect using a look-ahead and a back-reference (explained here): (?=(pattern to make atomic))\1 so with your a-b or just a situation, this would become: (?=(a-b|a))\1(?!Z) Note that the longer sub-pattern a-b needs to be mentioned first in the group, otherwise it does not work. The key mechanism is that the look-ahead finds the ealiest, longest-possible sub-match, while the back-reference prevents any backtracking in the engine and moves the position in the string, so the following test (?!Z) can be executed.
has comment: http://stackoverflow.com/comment/41085564
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26197378
has comment: http://stackoverflow.com/comment/41094426

http://stackoverflow.com/comment/41276100
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26303809
has text: so what will be the value of this in functon b ??..suppose if i call the function b with var a = new a() ..will that this point a or somewhat else ??
type: Comment

http://stackoverflow.com/a/26288728
score: 1
has comment: http://stackoverflow.com/comment/41277944
downvote count: 0
answers question: http://stackoverflow.com/q/26288214
type: Answer
has body: I think this is what you are looking for: $("select").on("change", function (e) { var sel = this.selectedIndex; $("#SELECTB option").each(function (i, e) { $(this).prop("disabled", sel > i); }); }); A B C D A B C D And this can be even more general: $("select").on("change", function (e) { var sel = this.selectedIndex; var nextSelect = $(this).parent().find("select").not(this); $(nextSelect).children().each(function (i, e) { $(this).prop("disabled", sel > i); }); }); A B C D A B C D
upvote count: 1

http://stackoverflow.com/comment/41182012
score: 0
type: Comment
type: QuestionComment
has text: Can you give more details like the error etc ?
comment on: http://stackoverflow.com/q/26252587

http://stackoverflow.com/comment/41289980
type: QuestionComment
type: Comment
has text: There are many other things wrong here too. Passing an empty `allWords` variable and expecting that an assignment to that argument will somehow return that value is just wrong and it looks like you have regex problems too.
comment on: http://stackoverflow.com/q/26311456
score: 0

http://stackoverflow.com/comment/41369136
comment on: http://stackoverflow.com/a/26349788
has text: Thanks, didn't know about the infix operators!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26207929
score: 0
type: Answer
has body: First, you need to get the elements using children or querySelectorAll() not childNodes, childNodes will get all nodes including the text. Try the following code: var s = document.body.children; var itemCount = s.length; for (var i = 0; i &lt; itemCount; i++) { if (i % 2 !== 0) { document.body.removeChild(s[i]); } } Here is a JSBin example. Note that in JSBin we get the elements using querySelectorAll(), beacuse it also adds script elemets inside the body, for example: var s = document.querySelectorAll('div'); Also, note that IE8 and below includes comment nodes when using children.
answers question: http://stackoverflow.com/q/26207683

http://stackoverflow.com/comment/41300025
type: AnswerComment
type: Comment
has text: I thought about by reference/by value problem before, and tried initialising `Opt` with its declaration (with `var Opt = {people:[], symbols:[], cities:[]};` in the service) so that a reference to the `Opt.symbols` array could be made instantly -- which could then be updated in the service. However, that too doesn't work, and I don't know why that is the case. Of course I could add a watch, but that's 'last resort' in my opinion.
score: 0
comment on: http://stackoverflow.com/a/26316174

http://stackoverflow.com/q/26353197
favorite count: 0
has answer: http://stackoverflow.com/a/26353238
has comment: http://stackoverflow.com/comment/41366113
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41366104
type: Question
accepted answer: http://stackoverflow.com/a/26353238
has answer: http://stackoverflow.com/a/26353376
answer count: 2
has comment: http://stackoverflow.com/comment/41366097
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: $.getJSON not firing console.log
has body: I have been facing some weird situation in my jQuery $.getJSON event. I'm able to see the JSON response on my console i.e. the file is getting called but console.log does not seem to work. Here is the code that I'm writing: $.getJSON("response.json",function(data){ console.log(data); }); I tried using single quotes as well but it does not seem to work. This was perfectly working a few days back and now when I tried to add a new function I'm not able to. I don't know why this error is popping up and I also changed the double quotes to single quotes but that is not solving the problem. I tried console.log outside the site Any help will be greatly appreciated. Thank you.
possible better answer: http://stackoverflow.com/a/26353376
has comment: http://stackoverflow.com/comment/41366221

http://stackoverflow.com/q/26223339
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
score: 3
downvote count: 0
has body: As Node.js developer knows, node can pipe the stream flow to another resource like http response. Solution #1 http.createServer(function (req, res) { stream = fs.createReadStream(filename); stream.pipe(res); }); Solution #2 There is another way to control flow of streaming and buffer response without piping http.createServer(function (req, res) { stream = fs.createReadStream(filename); stream.on('data', function(data) { if (res.write(data) == false){ stream.pause(); } }); stream.on('end', function(data) { res.end(); }); res.on('drain', function(data) { stream.resume(); }); }); Is solution #2 better than #1 ? I think It's better because we can control the flow of stream to http response. when response buffer is full and stream can't write data, stream will pause and when response become drain stream will resume My Problem When I'm using the solution #2 my node application going to halt station and not response to other clients. this mean it only service to one client at a time ! I think this problem will occurs because node waiting to send res.end() to client and end the response. but I don't understand how to solve this issue. If this solution is absolutely wrong and I just need to use stream.pipe() please show me how can I control the flow of piping with resume and pause functions
has answer: http://stackoverflow.com/a/26223791
tagged with: stream
tagged with: http
type: Question
has title: How control the flow of http streaming in node.js with piping
tagged with: pipe
tagged with: javascript
upvote count: 3
answer count: 1

http://stackoverflow.com/comment/41190684
has text: https://support.google.com/fusiontables/answer/2681556
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26243805
type: Comment

http://stackoverflow.com/comment/41109906
has text: Please also post the contents of your onMouseDown event, or show how you are trying to access the element by ID
score: 0
comment on: http://stackoverflow.com/q/26213570
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41280854
comment on: http://stackoverflow.com/q/26306080
type: Comment
type: QuestionComment
has text: Helpful related (identical?) question on Security.SE: [Why is the Access-Control-Allow-Origin header necessary?](http://security.stackexchange.com/questions/43639/why-is-the-access-control-allow-origin-header-necessary) -- "...what I can't see is what purpose is served by not allowing uncredentialed cross-domain AJAX requests without an Access-Control-Allow-Origin header."
score: 3

http://stackoverflow.com/comment/41277736
has text: More explanation: http://stackoverflow.com/questions/6918509/this-method-function-vs-obj-prototype-method-function
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26304790

http://stackoverflow.com/q/26297431
answer count: 1
tagged with: websocket
has answer: http://stackoverflow.com/a/26300793
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: authentication
has body: I work on web application and I want to have live notifications to a user via websockets. These notifications should be received only by a user whose notifications belong to. I wonder if it's good idea to pass an temporary authentication token (which would be unique for a user) to javascript and the script connects to websocket server and pass the authtoken as a parameter to make a handshake. Is it secure solution to pass auth token to javascript and then login via websocket using this authentication token? Of course web app is secured by ssl and web socket server also.
type: Question
has title: How to make websocket authentication?
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26319186
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41303838
score: 1
has comment: http://stackoverflow.com/comment/41303724
has comment: http://stackoverflow.com/comment/41303884
has comment: http://stackoverflow.com/comment/41303850
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26319170
answers question: http://stackoverflow.com/q/26319170
has body: Try: res.writeHead(200, { 'Content-Type': 'text/html' }); And then: response.setEncoding('utf8'); response.on('data', function(chunk) { body += chunk; });
has comment: http://stackoverflow.com/comment/41303979

http://stackoverflow.com/a/42536370
answers question: http://stackoverflow.com/q/26275881
type: Answer
score: 0
has body: On the Mac, I solved for this issue by finding where apm was installed (on my machine, MacOSX Sierra: /Applications/Atom.app/Contents/Resources/app/apm/bin), then running: ./apm config set python /usr/bin/python2.7 in that folder. This command sets the python config for the apm program installed with atom, and doesn't mess with your global node setup. Or for copy/paste convenience: cd /Applications/Atom.app/Contents/Resources/app/apm/bin ./apm config set python /usr/bin/python2.7

http://stackoverflow.com/comment/41235800
has text: @hindmost In JS there is no difference between integers and floats. There are only numbers.
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26281951
type: Comment

http://stackoverflow.com/a/26234952
accepted answer of: http://stackoverflow.com/q/26226344
has comment: http://stackoverflow.com/comment/41343171
type: Answer
answers question: http://stackoverflow.com/q/26226344
has comment: http://stackoverflow.com/comment/45503254
downvote count: 0
score: 1
has body: I thought the engine handled the transparency if a transparentcolor property was set as it was through Tiled, but apparently not. The problem was solved when just transparent the white color through a software like Photoshop or Gimp.
has comment: http://stackoverflow.com/comment/131417386
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26212357
score: 0
has comment: http://stackoverflow.com/comment/41107275
answers question: http://stackoverflow.com/q/26212169
type: Answer
has comment: http://stackoverflow.com/comment/41107357
has comment: http://stackoverflow.com/comment/41107315
has body: If youre 100% sure the file is getting loaded properly, the error is in here: onload="updateText(), prettyPrint()" You have , instead of ;: onload="updateText(); prettyPrint();" Besides that, you should only specify one encoding, not both ISO and UTF-8.

stringify
tags question: http://stackoverflow.com/q/26238796
tag name: stringify
type: Tag
tags question: http://stackoverflow.com/q/26338910

http://stackoverflow.com/a/26300447
has body: I seem to remember having this issue once, a number of years back (scrolling an inner element to a certain point, versus scrolling the viewport to an element) and I think I resolved it with a jQuery plugin that I found. Made it simple. https://github.com/flesler/jquery.scrollTo
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26300038

http://stackoverflow.com/comment/41172591
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26246038
has text: @Bergi Withdrawn (although your comments _are_ helpful as to the question / `Object.keys()` . Should keep post up for your comments ?) . Thanks !
type: AnswerComment

http://stackoverflow.com/a/26348638
answers question: http://stackoverflow.com/q/26348477
score: 1
upvote count: 1
has body: You can register it as a startup script. protected void okButton_Click(object sender, EventArgs e){ ClientScriptManager cs = Page.ClientScript; string script = "callCenterDailyChartYMC();"; cs.RegisterStartupScript(this.GetType(),"NameOfYourScript",script,true); } http://msdn.microsoft.com/en-us/library/z9h4dk8y(v=vs.110).aspx
accepted answer of: http://stackoverflow.com/q/26348477
downvote count: 0
has comment: http://stackoverflow.com/comment/41358352
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41358201
type: Answer

http://stackoverflow.com/a/26251201
downvote count: 0
type: Answer
has body: It's a label for continue to jump to. Example (from the linked page): loop1: for (i = 0; i &lt; 3; i++) { //The first for statement is labeled "loop1" loop2: for (j = 0; j &lt; 3; j++) { //The second for statement is labeled "loop2" if (i == 1 &amp;&amp; j == 1) { continue loop1; } console.log("i = " + i + ", j = " + j); } } But mind the warning on that same page: Avoid using labels Labels are not very commonly used in JavaScript since they make programs harder to read and understand.
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/26251163

http://stackoverflow.com/comment/41430809
comment on: http://stackoverflow.com/a/26341491
score: 0
type: AnswerComment
type: Comment
has text: Try `var sub_items = items.everyItem().xmlElements;` (untested). This assumes the root element has sub elements... Can you post an example of your xml structure and what you're trying to achieve?

http://stackoverflow.com/a/26232952
upvote count: 0
answers question: http://stackoverflow.com/q/26232907
has body: It's because you get relative url. If you have &lt;img src="images/a.png"&gt;, that means you have images dir under where your file is located. Now that you specify it as empty string, it means your images are located along side with current document.
score: -1
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41146581
comment on: http://stackoverflow.com/a/26233313
type: Comment
has text: I downloaded that Tux.svg and it works. So it seems really an issue of my SVG files. You want me to post the SVG content here?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26234344
answer count: 1
tagged with: ajax
tagged with: angularjs
type: UnansweredQuestion
has title: AngularJS: How can I initialize controller embedded with ajax loaded template?
type: Question
has answer: http://stackoverflow.com/a/26234840
tagged with: javascript
score: 0
has body: I am loading an angular 'template' using ajax. This template renders a bootstrap modal form when I call $compile ... this works, everything fine here. But what I need is support of embedding controllers within this lazy loaded 'template' (Preferably I want to handle this client side so on server side everything can just look normal). The thing is when I use ng-controller inside this template and define a function controller inside a script tag it fails. It tells me it cant find the controller function. I understand why this is happening, the script has not yet been initialized. I am just looking for a solution. How can I make the embedded script tags initialize first? Should I extract them, inject them somewhere and then compile the remainder? Or is there a more elegant way?

http://stackoverflow.com/a/26251020
has comment: http://stackoverflow.com/comment/41213464
has comment: http://stackoverflow.com/comment/41180703
has comment: http://stackoverflow.com/comment/41182448
has comment: http://stackoverflow.com/comment/41182240
has comment: http://stackoverflow.com/comment/41180961
has comment: http://stackoverflow.com/comment/41215987
has comment: http://stackoverflow.com/comment/41179437
score: 0
has comment: http://stackoverflow.com/comment/41180579
has body: This is an encoding problem, somewhere you wrote the UTF-8 (°) as LATIN1. There is already the wrong value in your database. Set the table’s column collation to utf8_general_ci and don’t forget to update database with correct value “°C”. UPD HTML should use the UTF-8 encoding: &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt; In ajax request there might be contentType: "charset=utf-8", explicitly specified. Try to ptint out the $_REQUEST['temp_unit'] value to see if the value is corrupted before saving into the database. UPD2 As a hotfix I could suggest to call utf8_decode on _REQUEST['temp_unit'], but this sounds lame. BTW, the problem might be in internal MySQL encoding. Try to set the client charset explicitly.
has comment: http://stackoverflow.com/comment/41179372
has comment: http://stackoverflow.com/comment/41183765
has comment: http://stackoverflow.com/comment/41187229
has comment: http://stackoverflow.com/comment/41182705
has comment: http://stackoverflow.com/comment/41218390
answers question: http://stackoverflow.com/q/26250556
type: Answer
has comment: http://stackoverflow.com/comment/41182016
has comment: http://stackoverflow.com/comment/41229866

http://stackoverflow.com/q/26327864
answer count: 1
tagged with: facebook-javascript-sdk
favorite count: 0
has answer: http://stackoverflow.com/a/26328132
type: AnsweredQuestion
upvote count: 1
tagged with: google-chrome
downvote count: 1
has body: When I try to load this script in Firefox, it gives me this error: Reference Error: onListFriends is not defined. The code works fine in Safari and Chrome. listFriends(onListFriends); function onListFriends() { console.log("friends were listed."); setOnline(); } And here is the listFriends function defined later in the file: function listFriends(callback) { FB.api( "me/friends", function (response) { console.log("Got FB.api response"); var numOnline = 0; var numFriends = response.data.length; for (var i = 0; i &lt; numFriends; i++) { isOnline(i, response.data, gotOnline); var callbackInc = 0; function callbackIfYouCan(callback) { callbackInc++; if (callbackInc == numFriends) { interiorCallback(callback); } } function gotOnline(res, ind, data) { console.log("Got response from isOnline: " + res); var id = data[ind].id; var checkbox = document.createElement('input'); checkbox.type = "checkbox"; checkbox.name = "friends"; checkbox.id = id; checkbox.value = data[ind].name; console.log("For user " + checkbox.value); var label = document.createElement('label'); label.htmlFor = id; label.appendChild(document.createTextNode(data[ind].name)); if (res == 1) { document.getElementById("online").appendChild(checkbox); document.getElementById("online").appendChild(label); document.getElementById("online").appendChild(document.createElement('br')); numOnline++; } else { document.getElementById("offline").appendChild(checkbox); document.getElementById("offline").appendChild(label); document.getElementById("offline").appendChild(document.createElement('br')); } callbackIfYouCan(callback); } } function interiorCallback(callback) { if (numOnline &gt; 0) { var textField = document.createElement('input'); textField.setAttribute('type', 'text'); textField.id = "message"; textField.value = "I would like to hang out at this place in 15 minutes."; var button = document.createElement('button'); button.setAttribute('type', 'button'); console.log("Created tagging button."); button.onclick = fun…
accepted answer: http://stackoverflow.com/a/26328132
type: Question
has comment: http://stackoverflow.com/comment/41377403
tagged with: javascript
has title: ReferenceError: function is not defined in Firefox
linked to: http://stackoverflow.com/q/7609276
score: 0
tagged with: firefox

http://stackoverflow.com/q/26261891
tagged with: internet-explorer-10
accepted answer: http://stackoverflow.com/a/26262904
type: Question
has comment: http://stackoverflow.com/comment/41199069
tagged with: javascript
has answer: http://stackoverflow.com/a/26262904
tagged with: ie8-compatibility-mode
answer count: 2
upvote count: 1
favorite count: 0
has body: I maintain a legacy web application that has a lot of old quirks mode pages, and a lot of newer standards mode pages. In IE10, if our domain name is in IEs compatibility list, I am getting a mixed message from IE. the dev tools report that the page is in Browser Mode IE10 Compat View. the appearance of the page suggests it's in standards mode. the userAgent says it MSIE 10.0, Trident/6.0 (suggesting NOT Compat View) If I change Browser Mode in dev tools from IE10 Compat View to IE10 and then back to Compat View, I get: the dev tools report that the page is in IE10 Compat View (as before) the appearance of the page suggests it is in compat view. the userAgent says it MSIE 7.0, Trident/6.0 (suggesting it IS in Compat View) Do IE10 dev tools misrepresent the browser mode sometimes? For example guessing the mode based on the Compatibility list or other criteria, when the page in fact enters standards mode because of the doctype and X-UA-Compatible set to IE=edge? Or is the documentMode and userAgent not reliable to test what mode we're in? Basically, we want to tell users "hey, you don't need to put our site in your Compatibility View list anymore" if we detect they are in that mode.
has answer: http://stackoverflow.com/a/26262037
has title: How does IE10 dev tools report compatibility view?
tagged with: cross-browser
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26262037
score: 1

http://stackoverflow.com/comment/41238852
has text: Wow. If it were a snake... Thank you very much!
comment on: http://stackoverflow.com/a/26283451
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26313693
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26313616
type: Answer
answers question: http://stackoverflow.com/q/26313616
score: 2
downvote count: 0
has body: This is happend because modal is child element of overlay, and you hide it's parent element (.abovepage) on click so it hides modal too. One solution is this: $(document).ready(function () { //when .modals is clicked $(".modals").click(function () { //.abovepage should appear $(".abovepage").show(); $(".pagecontent").show('slow'); }); $(".abovepage").click(function () { $(".pagecontent").hide(); $(this).hide(); }); }); #maincontent { height:60px; } #innercontent { height:40px; margin:10px; } .modals { height:40px; background-color: #6596EE; border:solid 1px #3B7EF7; border-radius: 3px; } .modals a { text-decoration: none; font-weight: bold; font:16px arial; color: white; } .modals:hover { background: #122A55; } .abovepage { position:fixed; left:0; top:0; right:0; bottom:0; background-color: #3D3C3C; opacity: 0.6; display:none; } .pagecontent { height:100px; margin-top: 52px; margin-bottom: 30px; display:none; } .large { width:900px; margin-left: 230px; margin-right: 222px; } .small { width:250px; margin-left: 511px; border-radius: 3px; } .element { height:100px; background-color: white; box-shadow:3px 3px 8px 3px #030303; position:relative; top:0px; left:0px; border:solid 1px #1D1B1B; border-radius: 5px; } .upper { height:50px; border-bottom: solid 1px #D3C8C8; } .lower { height:50px; } .uppercontent { height:25px; padding-top: 15px; padding-left: 14px; padding-right: 9px; font-weight:bold; font:18px arial; } .lowercontent { height:25px; padding-top: 15px; padding-left: 14px; } #closebutton { float:right; } #closebutton a { text-decoration:none; color:#C4BBBB; font-weight: bold; font-size:18px; } #closebutton a:hover { color:#333232; } Large Modal Small Modal Large Modal x ... Remove modal content from overlay (.abovepage).

http://stackoverflow.com/comment/41268823
type: Comment
type: QuestionComment
has text: @Omar posted the function in the post
comment on: http://stackoverflow.com/q/26299359
score: 0

http://stackoverflow.com/q/26240448
has comment: http://stackoverflow.com/comment/41159620
possible better answer: http://stackoverflow.com/a/26240848
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Accessing json data in javascript strange error
tagged with: http://stackoverflow.com/tag/json
has body: I am returning json string from web service and I can easily access it but sometime it behave strange and I can not find why. Here is json string that I am getting through web service {"current":"2014-10-07T17:53:03+02:00","T1":{"0":[null],"1":[null],"2":[null],"3":[null],"4":[null],"5":[null],"6":[{"name":"ABC","value":63}]},"T2":{"0":[null],"1":[null],"2":[null],"3":[null],"4":[null],"5":[null]},"T3":{"0":[null],"1":[null],"2":[null],"3":[null],"4":[null],"5":[null]},"T4":{"0":[null],"1":[null],"2":[null],"3":[null],"4":[null],"5":[null]},"T5":{"0":[null],"1":[null],"2":[null],"3":[null],"4":[null],"5":[null]}} I can access them easily and it is working fine except when there is null on 0th position of any T1,T2,T3...etc. It return this error TypeError: Cannot read property '0' of undefined This is how I am accessing data if(json.T1 != undefined) { for (var i = 0; i &lt; len; i++) { if(json.T1[i][0] == null) { t1.push(NaN) } else { t1.push(json.T1[i][0]["value"]) } } } I dont understand why this works in all the cases excpet having null of 0th position of T1, T2...etc
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26241110
upvote count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/41159901
tagged with: javascript
has answer: http://stackoverflow.com/a/26240848
favorite count: 0
has answer: http://stackoverflow.com/a/26241110

http://stackoverflow.com/comment/41205891
has text: hm... strange. works for me (if i understand what you want actually) :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26265433
type: AnswerComment

http://stackoverflow.com/q/26199388
score: 0
has comment: http://stackoverflow.com/comment/41083262
has comment: http://stackoverflow.com/comment/41083186
tagged with: jquery
has body: I have a registration form with several inputs fields. I scan through between them, and if I find an input value with a value of "" I set the returnFalse variable to 1. At the end of the script I examine if that variable is 1, if yes, return false. But it doesn't seem to return false, even though the variable's value is clearly 1. var emptyFieldScanner = function(){ /********************/ /*First name /*******************/ if($("input#first_name").val() == ""){ $("div#first_name_check").fadeIn(); $("div#first_name_check").html("Please enter your first name"); $("input#first_name").click(function(){ $("div#first_name_check").fadeOut(); }); returnFalse = 1; } /*******************/ /********************/ /*Last name /*******************/ if($("input#last_name").val() == ""){ $("div#last_name_check").fadeIn(); $("div#last_name_check").html("Please enter your last name"); $("input#last_name").click(function(){ $("div#last_name_check").fadeOut(); }); returnFalse = 1; } /*******************/ if(returnFalse == 1){ return false; } } But of course, if I put return = false at the start of the function it works: var emptyFieldScanner = function(){ return false; Form tag: I have no idea why it is not working, I have used the same structure several times. My question is, why isn't the function returning false? Thank you very much!
has title: Function called with onsubmit not returning false
answer count: 0
has comment: http://stackoverflow.com/comment/41083179
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41083253
tagged with: javascript
has comment: http://stackoverflow.com/comment/41083197

http://stackoverflow.com/q/26324035
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/26324051
type: AnsweredQuestion
tagged with: image
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/26324051
answer count: 2
has answer: http://stackoverflow.com/a/26324070
accepted answer: http://stackoverflow.com/a/26324070
tagged with: javascript
score: 0
has body: I am working on a project and I need to be able to call a java script function when double clicking on a image. So far, for testing, I was using the On Click function and it was working perfectly, but now that I added the "Double" work it doesn't seem to work. Please see below the code on the asp image: &lt;asp:Image href="#" ID="MapImage" runat="server" Height="601px" Width="469px" OnDoubleClick="javascript:MapImage_Click()"/&gt; This is the java script function code: function MapImage_Click() { alert('hello'); } Do anyone have any idea why this is happening? Thanks!
has title: onDoubleClick asp image not working

http://stackoverflow.com/a/26209655
downvote count: 0
has body: As I explained in my comment, your service returns JSON, while jQuery expects JSONP. This is an issue because the response will be evaluated as JavaScript, but you are not sending back valid JavaScript. Since you have control over the server, you have three possible solutions: 1. Tell jQuery to expect JSON If there are no cross-domain issues because the site itself is also served from that domain, simple let jQuery make a real Ajax request, by changing dataType to json and removing callback=? from the URL. 2. Enable CORS (and tell jQuery to expect JSON) If there are cross-domain issues, you can still do what I said in the first solution, but in addition, enable CORS on your server. In short, this allows other sites to make Ajax requests to your server. Have a look at http://enable-cors.org/ to learn how to enable it for your server. 3. Return JSONP JSONP is all about including JavaScript dynamically. This works across domains because &lt;script&gt; elements don't have the same-origin restriction that Ajax has. However, it is still something that the server has to support because it has to return valid JSON. If your JSON response was {"foo": 42} then the JSONP response would be func({"foo": 42}); The name of the function (func) in this example, is taken from some GET parameter that you could choose arbitrarily, but most common is callback. jQuery will actually choose a random function name so it will send something like callback=jQuery123135343456456 your service has to take that value and use it as function name for JSONP, i.e. jQuery123135343456456({"foo": 42}); See also What is JSONP all about? What are the differences between JSON and JSONP?
has comment: http://stackoverflow.com/comment/41125294
accepted answer of: http://stackoverflow.com/q/26196820
has comment: http://stackoverflow.com/comment/89114263
answers question: http://stackoverflow.com/q/26196820
type: Answer
score: 2
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41132815
comment on: http://stackoverflow.com/q/26225764
score: 0
has text: Where is your javascript?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26250852
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41179580
has comment: http://stackoverflow.com/comment/41179561
tagged with: php
has answer: http://stackoverflow.com/a/26251061
type: Question
has comment: http://stackoverflow.com/comment/41179001
tagged with: javascript
has title: Call PHP function in particular class via Ajax
has comment: http://stackoverflow.com/comment/41179278
has comment: http://stackoverflow.com/comment/41179233
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41178962
has answer: http://stackoverflow.com/a/26250896
has body: I am using Zend Framework. I have PHP class as: FileName : AdminController.php Path : /admin/AdminController.php Ajax Function : function exportToExcel() { $.ajax({ url: "/admin/AdminController/testFunction", type: "POST", success: function(output){ alert("Sucess "+output); } }); } PHP Class: class AdminController extends AbstractActionController { public function testFunction() { return 'Its a test!!!'; } } But i am not getting alert in sucess as: Sucess Its a test!!! What can be mistake? How to call php function in particular phpclass/file???

http://stackoverflow.com/comment/46884056
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26210801
type: Comment
has text: Have you managed to solve the issue? I have exactly the same problem at the moment.

http://stackoverflow.com/comment/41305344
has text: @wonie That's bad advice. If array methods are being polyfilled in e.g. older IEs, those names will pop up in the for-in loop. Avoid it.
type: Comment
comment on: http://stackoverflow.com/a/26319928
score: 1
type: AnswerComment

http://stackoverflow.com/a/26284054
answers question: http://stackoverflow.com/q/26283869
type: Answer
has comment: http://stackoverflow.com/comment/41242342
has comment: http://stackoverflow.com/comment/41242757
has comment: http://stackoverflow.com/comment/41239957
has body: Working demo $(".divMenu").mouseover(function() { $( this ).animate({ fontSize: "50", }, 1000, function() { // Animation complete. }); });
has comment: http://stackoverflow.com/comment/41242850
score: 0
has comment: http://stackoverflow.com/comment/41242545
has comment: http://stackoverflow.com/comment/41239850

http://stackoverflow.com/a/26198621
has comment: http://stackoverflow.com/comment/41082392
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41082376
has body: The way I see SoundCloud works is with AJAX (and yes, you can use jQuery to do that). So you technically remain on the same page. With regards to the "same URL", you can actually manipulate the history and URL of the browser using the History API. So each navigation, your JS should simulate leaving to another page by manipulating history, making the browser think it left the page. Another bit of JS tracks the url, called a router, to know what to do when a certain url pattern is observed. For example, if I am in route /artists/foo, then the page should AJAX in the data for artist "foo".
upvote count: 1
answers question: http://stackoverflow.com/q/26198595
type: Answer

http://stackoverflow.com/comment/41118934
has text: http://msdn.microsoft.com/en-us/library/ie/ms536437(v=vs.85).aspx - IE docs for getElementById - note that it searches both name AND id
comment on: http://stackoverflow.com/q/26218687
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26330973
has comment: http://stackoverflow.com/comment/41346940
answers question: http://stackoverflow.com/q/26330747
score: 1
has comment: http://stackoverflow.com/comment/41337807
downvote count: 0
has comment: http://stackoverflow.com/comment/41331783
has comment: http://stackoverflow.com/comment/41346636
type: Answer
has body: Your fiddle is working as expected, and the animations are queued (they even would be queued if .transit() was called multiple times repeatedly, as the plugin uses jQuery's internal animation queue). The only thing is that 50 milliseconds for a animation on up to 5 pixels are much too fast. I've increased the time and printed the counter in this revision of your fiddle. it seems that while callback is still looping, the codes that come after the callback function are also being executed. There is no "looping callback". The callback is passed to the function which returns before the callback is called - and the code that called .transit() continues (which, in your case, is the closing } brace from the if, the end of the randomTran() call, and the s.transit({x: 0,y: 0}); initialisation. Once this code has finished executing, other code can be executed - asynchronously. The callback that was stored somewhere is now - in the future, 50ms after the transit() call - being called; does start another transition, does schedule another callback, and ends.
upvote count: 1

http://stackoverflow.com/comment/41084298
comment on: http://stackoverflow.com/q/26199948
has text: @StephenMuecke Yes Im pretty sure that my controller is hit because if I'm going to remove the e.preventDefault() on the script it will return the partial view itself and its content, but what I want is to return the partialview within ajaxcom div of the view.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26247840
has body: Try removing this from the end of your jquery.numericScale.js file: var disciplines = $('#survey1').numericScale({ 'responseRange' : 5, 'lowOpinionAnswer' : 'Least like me', 'highOpinionAnswer' : 'Most like me' }); console.dir(disciplines); Add this to your html page after your loaded plugins: &lt;script&gt; $('#survey1').numericScale({ 'responseRange' : 5, 'lowOpinionAnswer' : 'Least like me', 'highOpinionAnswer' : 'Most like me' }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/26247629
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41177544

http://stackoverflow.com/comment/41188484
type: Comment
type: QuestionComment
has text: Look at my answer. You are using a string instead of the numbers needed to create the date.
comment on: http://stackoverflow.com/q/26256349
score: 0

http://stackoverflow.com/comment/41131628
score: 0
type: AnswerComment
type: Comment
has text: I knew about the user-event restriction, but forgot about it. Thanks for reminding me. I'm pretty sure now that's the reason
comment on: http://stackoverflow.com/a/26222855

http://stackoverflow.com/q/26234636
score: 84
possible better answer: http://stackoverflow.com/a/55444882
has title: D3.js prepend (similar to jQuery prepend)
has body: I like the usage of append in D3, and I'm looking for prepend. Does this exist in D3?
has answer: http://stackoverflow.com/a/55444882
has answer: http://stackoverflow.com/a/26235477
type: AnsweredQuestion
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
upvote count: 84
accepted answer: http://stackoverflow.com/a/26235477
favorite count: 0
tagged with: prepend
tagged with: d3.js

http://stackoverflow.com/a/26327212
has comment: http://stackoverflow.com/comment/41322848
upvote count: 2
answers question: http://stackoverflow.com/q/26327010
has body: In this case, go for display:flex or jquery grid layout plugins
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/50896215
comment on: http://stackoverflow.com/a/30021867
type: Comment
type: AnswerComment
has text: I added a note about it. I suppose it's worth mentioning that it's not yet the be all and end all for this *problem*. Who knows though - next week it could be. We're on the bleeding edge! Dun dun duuuun! Alternatively it could be like another `font-stretch`. Wouldn't that be just spiffy? -_-
score: 0

http://stackoverflow.com/comment/41128169
comment on: http://stackoverflow.com/q/26223277
score: 0
has text: If you want one single connection, try using web socket and transfer the chunks
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26246803
possible better answer: http://stackoverflow.com/a/26246976
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/41172191
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26246868
tagged with: c#
type: Question
score: 0
answer count: 2
has title: Why is my backend C# code getting executed when it should not be?
has comment: http://stackoverflow.com/comment/41171977
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41171901
has body: Geniuses, I have this Javascript function in my front end code and I am trying to push more client side validation steps there to relieve by backend from too much validation work. Here is the Javascript function: &lt;script type = "text/javascript" &gt; function watchdelete() { var manufacturer = document.getElementById('&lt;%:drpManufacturer.ClientID%&gt;'); var model = document.getElementById('&lt;%:drpModel.ClientID%&gt;'); var strManufacturer = manufacturer.options[manufacturer.selectedIndex].value; var strModel = model.options[model.selectedItem]; if (strManufacturer) // If there is a selected Manufacturer { if (confirm("Are you Sure you want to delete this Dimension Detail?")) { if (strModel) return true; else { alert("Please select a car model first."); return false; } } } else { alert("Please select a Manufacturer first before deleting"); return false; } } &lt;/script&gt; &lt;asp:ScriptManager ID="scripman1" runat="server" EnablePageMethods="True"&gt; &lt;/asp:ScriptManager&gt; Here is the delete button code in question with the OnclientClick pointing to the Javascript function and the Onclick pointing to the backend function: &lt;asp:Button ID="btnDimensionDel" runat="server" Text="Delete" OnClientClick = "watchdelete();" OnClick="btnDimensionDel_Click" /&gt; I notice that my backend C# code is getting called when it should not be. Is there anything I can do to change this? What am I doing wrong here?
has answer: http://stackoverflow.com/a/26246868
has answer: http://stackoverflow.com/a/26246976

http://stackoverflow.com/comment/41245298
type: AnswerComment
comment on: http://stackoverflow.com/a/26283388
has text: This helped solve the problem, the issue was that two versions of jQuery were being included,
type: Comment
score: 0

http://stackoverflow.com/q/26249002
tagged with: php
has answer: http://stackoverflow.com/a/26249074
has title: Executing a jquery function stored as a variable name
type: AnsweredQuestion
type: Question
has body: I'm struggling with figuring out how to call/execute a function in jQuery. I've done quite a bit of searching and find what looks like it should be the answer, but it doesn't seem to work. I assume it is a scope issue since everything else seems to match examples I've found here, but I'm relatively new to jQuery and can't quite figure it out. Basically, when the "bookmark" button is clicked, it uses ajax to create an entry in the database, and changes the format of the clicked button. This acts as expected. The trick is this requires someone to be logged in. The actual click of the button adds a #bookmarkme anchor to the url - if they aren't logged in (this is where things start getting tricky for me), the log in window pops up and they are prompted to sign up/log in, and the page reloads to set all the log in variables properly. This also works as expected. Where it breaks down is once the user logs in and the page reloads, I can't get the "bookmarkFunction" to run. &lt;script type="text/javascript"&gt; var loggedin = &lt;?php echo $loggedin; ?&gt;; var headerButtonScript = function(){ var bookmarkFunction = $("#bookmark").click(function(){ var directoryName = "&lt;?php echo $directoryName;?&gt;"; if(loggedin == 1 &amp;&amp; $("#bookmark").hasClass("headerButton")){ $.ajax({ type: "POST", url: "../includes/bookmarkProcess.php", data: {directory: directoryName}, success: function(data, status){ if(data == "success"){ $("#bookmark").switchClass("headerButton", "headerButtonDisabled", 1000, "easeInOutQuart"); $("#bookmark").text("Bookmarked"); } } }); } else{ $("#signInContent").toggleClass('hidden'); $("#signInPopUp").toggleClass('hidden'); } }); }; var headerButtonsAfterLoad = function(){ var currentAddress = window.location.href; var hashPosition = currentAddress.indexOf("#"); var targetLocation = currentAddress.substring(hashPosition+1); if(targetLocation == "bookmarkme"){ if(loggedin==1){ //CALL bookmarkFunction HERE; //I know I get to this location when expected…
has comment: http://stackoverflow.com/comment/41175910
possible better answer: http://stackoverflow.com/a/26249128
accepted answer: http://stackoverflow.com/a/26249074
tagged with: javascript
has answer: http://stackoverflow.com/a/26249128
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41175919
has comment: http://stackoverflow.com/comment/41175986
tagged with: jquery
has comment: http://stackoverflow.com/comment/41176312

http://stackoverflow.com/q/26329002
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26329070
tagged with: javascript
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/26329038
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Getting NaN Error and undefined Error
has comment: http://stackoverflow.com/comment/41322297
has comment: http://stackoverflow.com/comment/41322128
score: 0
type: UnansweredQuestion
has body: I have a Problem with my push function in JavaScript. &lt;script type="text/javascript"&gt; var myArr = [] var len = myArr.length $.getJSON('daten.json', function(data) { $.each(data,function(key,value) { for(var i = 0; i &lt;= len; i++){ myArr.push("&lt;p&gt;" + value.Name+i ,"&amp;nbsp;", value.Nachname+i + "&lt;/p&gt;") } }) $('.content').html(myArr.join('')) }) &lt;/script&gt; I need to convert value.Name+i like this = value.Name0, value.Name1 and so on. I got a JSON File and the Keys are Dynamic, so the first entry got Name0 the second Name1 and so on. Now I must print the JSON file on my html page, but how I can write this line: myArr.push("&lt;p&gt;" + value.Name+i ,"&amp;nbsp;", value.Nachname+i + "&lt;/p&gt;") with my var i which increment in the loop, to call the Keys in my JSON file? Like value.Name0. Doing value.Name+i and value.Name.i does not work.
upvote count: 1
downvote count: 1
tagged with: numbers
has answer: http://stackoverflow.com/a/26329136

http://stackoverflow.com/a/26200523
type: Answer
answers question: http://stackoverflow.com/q/26200340
has body: Seperate the url and parameters how the function allows you to, then it makes it much easier to make changes to your parameters. var url="http://example.com/item/data/"; var params = { param:"item", pagesize:199, page:page }; params.page = 2; $.get(url,params,function(data){});
score: 0
has comment: http://stackoverflow.com/comment/41085433

http://stackoverflow.com/q/26353079
type: AnsweredQuestion
type: Question
tagged with: jslint
answer count: 1
tagged with: javascript
has title: How to rewrite a function to avoid jslint return a conditional instead of an assignment warning
has answer: http://stackoverflow.com/a/26353166
accepted answer: http://stackoverflow.com/a/26353166
has body: My code works as intended. How do I re-write return cachedPromise[reqKey] = $http.get(apiUrl) so that jsLint stop throwing warnings. I'd rather not block this error. return cachedPromise[reqKey] = $http.get(apiUrl) .then(function(result){ console.log('http then results', result.data); return result.data; }, function(data, status){ return $q.reject('error in teh gifson' + 'data: ' + data + 'status: ' + status); }) .finally( function(){ delete cachedPromise[reqKey]; });
score: 0

http://stackoverflow.com/comment/41222116
score: 0
type: Comment
type: QuestionComment
has text: handle it in the `onerror` callback
comment on: http://stackoverflow.com/q/26274513

http://stackoverflow.com/a/26341011
has comment: http://stackoverflow.com/comment/41344253
has body: You may have luck with something like this: $scope.update = function() { _update($scope.Profile, $scope.BillingDetails); } function _update(srcObj, destObj) { for (var key in destObj) { if(destObj.hasOwnProperty(key) &amp;&amp; srcObj.hasOwnProperty(key)) { destObj[key] = srcObj[key]; } } } plunker
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41344538
type: Answer
accepted answer of: http://stackoverflow.com/q/26340181
score: 14
answers question: http://stackoverflow.com/q/26340181
upvote count: 14
has comment: http://stackoverflow.com/comment/41346463

http://stackoverflow.com/q/26215169
tagged with: javascript
tagged with: google-oauth
has answer: http://stackoverflow.com/a/26218991
has comment: http://stackoverflow.com/comment/41112211
tagged with: same-origin-policy
answer count: 2
has body: I'm attempting a slight variation of the Google+ web sign-in server side flow as described on the Google Developer's website. Google's gapi code is giving this error message: Uncaught SecurityError: Blocked a frame with origin "http://my-development-system.dev" from accessing a frame with origin "https://accounts.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match. Am I right in saying that my local development system cannot be set up to use the https protocol?
downvote count: 0
possible better answer: http://stackoverflow.com/a/26218991
favorite count: 0
has answer: http://stackoverflow.com/a/26268359
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41112220
type: Question
accepted answer: http://stackoverflow.com/a/26268359
has title: Can I use https for local development?
score: 5
has comment: http://stackoverflow.com/comment/41112257
upvote count: 5

http://stackoverflow.com/q/26209969
type: Question
has answer: http://stackoverflow.com/a/26210031
tagged with: javascript
has title: Javascript - I created a form with multiple values, but only one is calculating?
has answer: http://stackoverflow.com/a/26210040
tagged with: calculated-columns
accepted answer: http://stackoverflow.com/a/26210040
score: 0
has comment: http://stackoverflow.com/comment/41102978
has body: I'm not sure why, but only oranges seems to calculate in the form I created, but the other fruits I specified don't. I have the each .value specified for each fruit. The form for all fruits are logically identical from what I can see, so I don't understand why I'm not getting result from watermelon or pineapple. <?xml version = "1.0"?> Purchase Orange Orange $1.99/lb Watermelon $4.99/lb Pineapple $4.69/lb Total Cost is
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26210045
has comment: http://stackoverflow.com/comment/41102818
possible better answer: http://stackoverflow.com/a/26210031
answer count: 4
has answer: http://stackoverflow.com/a/26210058
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41102892
tagged with: forms

http://stackoverflow.com/q/26329884
possible better answer: http://stackoverflow.com/a/69660397
tagged with: ajax
score: 0
linked to: http://stackoverflow.com/q/57274065
has comment: http://stackoverflow.com/comment/41325423
has title: How to make ajax calls to different MVC controllers
has body: I'm getting error 404 while making ajax calls to my MVC controller Here is the scenario: I have 2 controllers:(PartnerControler,GettingSartedController) While on the getting started page:http://mysite/GettingStarted/ I make the following ajax call: $scope.SubmitRegistration = function() { return $http({ url: '/partner/register', method: 'POST', data: $scope.UserAccount, headers: { 'Content-Type': 'application/json' I get a 404 on the call to the controller. when I add the exact register method to the gettingstarted controller and change the ajax URL to the following it works: url: '/gettingstarted/register', When on web a page that uses a specific controller can you make calls to another controller? How can this be achieved modifying the above script?
accepted answer: http://stackoverflow.com/a/26334539
has answer: http://stackoverflow.com/a/69660397
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26334539
tagged with: asp.net-mvc-3
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/41348481
type: QuestionComment
score: 3
has text: Have you made sure to use selectors for the jQuery? `'#id'` `'.class'`
comment on: http://stackoverflow.com/q/26343363
type: Comment

http://stackoverflow.com/comment/41168693
has text: Keep in mind that the OP *is adding these elements*, that is why he was looking for an answer @BigPino.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26242423
type: AnswerComment

http://stackoverflow.com/comment/41253948
has text: Cool, yes, that's why I said that you shouldn't use the same route for two different things. having /item/all/query doesn't really solve it either, but at this point we're in the "more art than science" realm of debating best URL patterns.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26291342
type: Comment

http://stackoverflow.com/comment/76113168
score: 0
type: Comment
has text: @binarygiant Since asynchronicity is such a big part of every javascript project Jasmine has of course had support for async testing since the start :-) Jasmine 1.0 used `runs`, `waits` and `waitsFor`, while Jasmine 2.0 (introduced in 2013) aligned with Mocha in just using a callback to accomplish the same. See https://jasmine.github.io/2.0/upgrading.html
comment on: http://stackoverflow.com/a/44515768
type: AnswerComment

http://stackoverflow.com/a/26212660
has body: JS Fiddle the issue was the sub sub menu was 20px away so you was hovering on empty space to go to sub menu so i changed the empty space with the padding #navME ul li .container .sub dl dd div.subWrapperLeft { left: 200px; /* changed from 220 to 200*/ top:0; /* changed from top: 10 to 0*/ position: absolute; width: 200px; padding:0 10px; /** added **/ }
accepted answer of: http://stackoverflow.com/q/26212481
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41107772
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26212481

http://stackoverflow.com/a/70153082
type: Answer
answers question: http://stackoverflow.com/q/26236045
has body: Check this github repo, I think it does exactly that: https://github.com/spite/ccapture.js/
score: 5
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/124011782

http://stackoverflow.com/comment/41148618
score: 2
comment on: http://stackoverflow.com/q/26234625
has text: @user3036353 In modern browsers, not really.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41219471
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26253978
type: Comment
has text: Thanks for your reply.After installed Quick time player, this issue is fixed.....

http://stackoverflow.com/q/26336597
has body: I wanted to pass my button value to angular js through a function. I tried passing the function with the ng-model but it's not working in the case of a button. So can anyone help me with this thanks in advance html: Category 1 angular js: $scope.catFn1 = function () { var sel1 = document.getElementById('select1').innerHTML; alert(sel1); sharedService.prepForBroadcast(sel1); //----- making the button value available through out the code return dict1(sel1); } function dict1(sel1) { alert(sel1); $("#dictation1").click(function () { window.location = "#pageeight"; }); } I actually wanted to perform controller communication using factory method I just know to communicate by this method. So I need to pass my value through a function.All the answers are valued.
has answer: http://stackoverflow.com/a/26339239
has title: how to pass the value of a button to angular js
answer count: 3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26336766
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41336179
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26336756
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26336756
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26339239

http://stackoverflow.com/comment/41086152
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26201067
has text: @dimgl glad to have helped you :)
type: AnswerComment

http://stackoverflow.com/comment/41235235
score: 0
type: AnswerComment
type: Comment
has text: Yes, Answer edited. Personally I don't like to declare variables in the window/global scope but that's up to you
comment on: http://stackoverflow.com/a/26281736

http://stackoverflow.com/comment/41316312
comment on: http://stackoverflow.com/q/26313790
score: 0
type: Comment
has text: What's the error you are getting when you try to access the root url?
type: QuestionComment

http://stackoverflow.com/comment/41292911
type: QuestionComment
has text: I can't see a '30' anywhere in the HTML you've shown; are you sure you've posted the correct HTML?
score: 0
comment on: http://stackoverflow.com/q/26313224
type: Comment

http://stackoverflow.com/a/26303477
has body: Use a canvas instead of the image, resize the canvas to the size of the image and draw the image into the canvas. Then you can get the pixel location of the cursor using the canvas.onmousemove event. Canvas may have something in it's api for querying the colour at a location(can't remember at this moment) but otherwise you can use getImageData to get the rgba data for every pixel and do a look up during the event. Ta da!
type: Answer
answers question: http://stackoverflow.com/q/26303101
score: 0

http://stackoverflow.com/comment/41162286
comment on: http://stackoverflow.com/a/26241084
type: AnswerComment
has text: @n1con Worklight has something called Hybrid Apps, basically you write your app in JAVA, HTML, CSS and Javascript. Checkout some of the modules for hybrid apps here. [link](http://www.ibm.com/developerworks/mobile/worklight/getting-started.html) by the way, you can download worklight free of charge. Cordova has similar functionality for hybrid apps
score: 0
type: Comment

http://stackoverflow.com/comment/127844232
type: Comment
has text: Thank you. I'm glad I wasn't actually losing my mind. It seems to have broke starting 4.0.6, so 4.0.5 worked for me.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/57145564

http://stackoverflow.com/q/26258112
answer count: 2
has title: AngularJS throws unknown error
has answer: http://stackoverflow.com/a/26258232
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26258232
tagged with: angularjs
has answer: http://stackoverflow.com/a/26258221
has body: My code is like this {{prdElement.name}} {{prdElement.itemId}} {{prdElement.shipmentId}} {{prdElement.itemCode}} {{prdElement.description}} {{prdElement.handlingUnit}} {{prdElement.weight}} {{prdElement.class}} {{prdElement.lenght}} {{prdElement.width}} {{prdElement.height}} {{prdElement.flag}} Submit (function () { angular.module('myApp', []).controller('MainCtrl', function ($scope) { var counter = 0; $scope.palletElement = [{ name: 'Pallet 1', itemId: '284307', shipmentId: 'eb44f690-c97a-40e3-be2a-0449559e171a', itemCode: '', description: 'Bicycle parts - frame', quantity: '31', handlingUnit: 'CTN', weight: '613.04', class:'', lenght: '102', width: '42', height: '61', flag:'P' }, { name: 'Pallet 2', itemId: '284308', shipmentId: 'eb44f690-c97a-40e3-be2a-0449559e171a', itemCode: '', description: 'Bicycle parts - fork', quantity: '22', handlingUnit: 'CTN', weight: '242.99', class: '', lenght: '75', width: '34', height: '18', flag: 'P' }] $scope.newPrdItem = function (prdElement, $event) { counter++; alert(prdElement.name); prdElement.push({ name: prdElement.name, itemId: prdElement.itemId, shipmentId: prdElement.shipmentId, itemCode: prdElement.itemCode, description: prdElement.description, quantity: prdElement.quantity, handlingUnit: prdElement.handlingUnit, weight: prdElement.weight -10, class: prdElement.class, lenght: prdElement.lenght, width: prdElement.width, height: prdElement.height, flag: prdElement.flag, }); } }); }()); All looks okay to me, But this throws an unknown error at button click TypeError: undefined is not a function at Scope.$scope.newPrdItem Fiddle
possible better answer: http://stackoverflow.com/a/26258221
type: AnsweredQuestion
score: 0
type: Question

http://stackoverflow.com/comment/41272686
type: QuestionComment
has text: How are the peers communicating? That is, are they capable of sending messages to each other? Or can they only communicate with the sever?
type: Comment
comment on: http://stackoverflow.com/q/26287844
score: 0

http://stackoverflow.com/comment/41126417
type: QuestionComment
has text: Yes, I didn't notice that you also forgot `}` before `);` in last line.
comment on: http://stackoverflow.com/q/26222276
score: 0
type: Comment

http://stackoverflow.com/comment/41390177
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26354672
has text: In a related note, when the dynamic segment placeholder is "page_id", does that indicate to Ember to automatically look for the model `page` and the attribute `id`?
score: 0

http://stackoverflow.com/comment/41253736
comment on: http://stackoverflow.com/q/26291593
has text: Can't you just take id of reply button if you have only one reply button??? Instead of taking class?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41348831
type: QuestionComment
comment on: http://stackoverflow.com/q/26343229
has text: Instead of `alert(e.FocusedRowIndex)`, use `console.log(e)` and see the object structure of `e` and use write property.
score: 0
type: Comment

http://stackoverflow.com/comment/41142597
score: 0
comment on: http://stackoverflow.com/q/26223867
type: Comment
type: QuestionComment
has text: Nope. `type` has also been deprecated since HTML5. See this SO question, which was answered *4* years ago: http://stackoverflow.com/questions/4195427/is-the-type-attribute-necessary-for-script-tags

http://stackoverflow.com/q/26253730
linked to: http://stackoverflow.com/q/17089927
has comment: http://stackoverflow.com/comment/41183898
linked to: http://stackoverflow.com/q/17380186
downvote count: 0
score: 1
has body: I'm trying to create a blurred opaque overlay to a load of text content. All the solutions and posts I've come across are for image backgrounds, not just HTML text content. What I want will very much look like the floating overlays on http://www.blurjs.com/ but instead of a background image, it will be HTML text (&lt;p&gt; tags, &lt;h1&gt; tags etc). Here is a Fiddle of roughly what I need, but I want the white opaque background colour of the overlay to be blurred also. Thanks!
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/17380186
has title: Frosted glass effect over HTML text content
type: Question
has comment: http://stackoverflow.com/comment/41183956
has comment: http://stackoverflow.com/comment/41183947
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41184141
tagged with: css
linked to: http://stackoverflow.com/q/17092299
upvote count: 1
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41184285

arrow-functions
tag name: arrow-functions
type: Tag
tags question: http://stackoverflow.com/q/26304963

http://stackoverflow.com/comment/41172445
comment on: http://stackoverflow.com/q/26246969
has text: Performance is unlikely to be an issue until you get to at least 1,000 records. However, you can simply make a list of the cards with a transaction fee then do a search on that.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26359561
type: Answer
has comment: http://stackoverflow.com/comment/41404387
has comment: http://stackoverflow.com/comment/41408933
score: 0
has comment: http://stackoverflow.com/comment/41413516
answers question: http://stackoverflow.com/q/26353690
has comment: http://stackoverflow.com/comment/41452204
has comment: http://stackoverflow.com/comment/41413452
has body: It's quite simple. At some point (normally when the positions of your objects have changed) you need to check for collisions. To do so, you can utilize the given function. DEMO var collision = function (ball, paddle) { if( ((ball.center.y + (ball.size.y / 2)) &lt; (paddle.center.y - (paddle.size.y / 2))) || //ball is under paddle ((ball.center.y - (ball.size.y / 2)) &gt; (paddle.center.y + (paddle.size.y / 2))) || //ball is over paddle ((ball.center.x + (ball.size.x / 2)) &lt; (paddle.center.x - (paddle.size.x / 2))) || //ball is left from the paddle ((ball.center.x - (ball.size.x / 2)) &gt; (paddle.center.x + (paddle.size.x / 2))) //ball is right from the paddle ){ //no collision }else{ alert("collision"); ball.velocity.x = -ball.velocity.x + (-ball.velocity.x * 0.1); } }; Some tips: use proper names (ball is more readable than b1 and paddle more than b2) debug you code (a good way to understand how JS is working and why your code wont do what it should is to use a debugger and check step by step what is wrong. Every browser has some built in functionality for that and in most you can access it by pressing F12.)

http://stackoverflow.com/a/26241160
has comment: http://stackoverflow.com/comment/41161071
downvote count: 0
has comment: http://stackoverflow.com/comment/41161436
answers question: http://stackoverflow.com/q/26241129
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41161084
score: 2
has body: I think you mean this. BTW, name isn't defined. var name = ''; // change the value if(text.indexOf("&lt;b&gt;"+name+"&lt;/b&gt;") &gt; -1) { $(this).addClass("quoteme"); }

http://stackoverflow.com/comment/41258129
type: Comment
type: QuestionComment
has text: Prefetching external pages.
comment on: http://stackoverflow.com/q/26293798
score: 0

http://stackoverflow.com/q/26215225
has title: Running a js function while opened embed frame
answer count: 0
upvote count: 2
has body: I embed video from pornsite with this code and it creates iframe with vide of course. I also have this function in my script $(window).keyup(function(event) { alert('hello'); }); this function works fine, BUT when I maximize the video with the iframe and THEN press any key on keyboard it does nothing, the keyup event doesn't work. Any idea what should I do, to be able to listen pressing a keyboard when video iframe is maximized. Thank you very much for any help.
tagged with: iframe
type: Question
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41102190
has text: Do you have any kind of error in your console?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26209561

http://stackoverflow.com/q/26283619
has comment: http://stackoverflow.com/comment/41239008
has answer: http://stackoverflow.com/a/26283777
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26283777
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26283651
score: 0
has title: Cannot target div using 'this' inside a function inside 'each' function
type: Question
has comment: http://stackoverflow.com/comment/41238899
has body: So I just want these mice to come back up after a random time when you click them. I am trying to use the each function to target each .mouse div, which works fine, however if I put 'this' again in the settimeout function they don't come back. If I target 1 specific mouse like the below example that 1 comes back as expected. Its clearly not taking the 'this' of the each function through into the next function. The code below had '.mouse-1' but this is where I would like 'this' http://thetally.efinancialnews.com/tallyassets/wackamouse/index.html ^ The html is very simple. Absolutely positioned mice on an image. They just need to duck down then come back after a random amount of time $('.mouse').each(function() { $(this).click(function() { $(this).animate({ 'background-position-x': '0', 'background-position-y': '40px' }, 300, function() { var rand = Math.round(Math.random() * (7000 - 2000)) + 500; //between 7secs and 2.5 secs setTimeout(function(){ $('.mouse-1').animate({ 'background-position-x': '0', 'background-position-y': '0'}); }, rand); }); }); }); Also, on a side note, I'd like the mouse divs to be unclickable when they go down Thanks alot
has answer: http://stackoverflow.com/a/26283855
tagged with: javascript
has comment: http://stackoverflow.com/comment/41239470
answer count: 3
tagged with: this
tagged with: jquery
has answer: http://stackoverflow.com/a/26283651
linked to: http://stackoverflow.com/q/10766407

http://stackoverflow.com/comment/41122702
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26220137
score: 0
has text: I just downloaded a snipped from Google, this is a assignment by school we need to make a application for mobile use. You guys are right i was shocked at first to maybe if i got time left i change the long codes by arrays and loops.

http://stackoverflow.com/q/26348936
has title: Datepicker hiding on mouseover
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
tagged with: datepicker
has answer: http://stackoverflow.com/a/26349100
has comment: http://stackoverflow.com/comment/41360721
has body: I need to hide a datepicker when a user moves their mouse away from an input where the datepicker is active. While it works, it works a bit too well. It also hides the datepicker when I try to mouse over it. Resizing the div isn't the best idea either as this is a dynamically generated data entry form. And only date fields are being generated with the .herd-evt-date class. I need to know what to do to have jquery check if I'm mousing away from the textbox but not the datepicker. How does one do this? $('#herd-evt-entry-tbl').on('focus','.herd-evt-date',function() { $(this).datepicker({ onSelect: function() {this.focus();}, onClose: function() {this.focus();}, dateFormat: 'dd-mm-yy' }); }); $('#herd-evt-entry-tbl').on('mouseleave','.herd-evt-date',function() { $(this).datepicker('hide'); }); HTML: Mating Event <-Back Column Info Upload File Save Valid X Update X Stig Tattoo Ident Herdstat State Day Sex Gen Level Transponder French Ident
has comment: http://stackoverflow.com/comment/41359531
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/41383545
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26349100
tagged with: javascript
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26343299
has answer: http://stackoverflow.com/a/26344525
downvote count: 2
type: Question
possible better answer: http://stackoverflow.com/a/26344525
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26343364
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Loop through years in a dropdown
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41348368
has comment: http://stackoverflow.com/comment/41348355
has answer: http://stackoverflow.com/a/26343364
type: AnsweredQuestion
has body: I would like to display the current year and 10 years before that year. Is it any way to do that through JavaScript or jQuery? Currently, I am manually inputting values. HTML: Year: 2014 2013 And so on.... I know how to get the current year in JavaScript Here's what I have currently var d = new Date(); var y = d.getFullYear();

http://stackoverflow.com/comment/41210614
has text: Update the functions to take the selector as an argument instead of hard-coding it? (Also, unrelated to your question, cache your jQuery objects, don't keep re-selecting the same elements within the same function.)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26267949
score: 2

http://stackoverflow.com/comment/41202286
score: 0
type: QuestionComment
type: Comment
has text: You can send a longer description without any problems, just make sure you `encodeURIComponent()` the values. If it really gets too long (hard to imagine for a point description...), you can POST instead of GET. About the maximum length: http://stackoverflow.com/questions/2659952/maximum-length-of-http-get-request
comment on: http://stackoverflow.com/q/26263576

jqbootstrapvalidation
type: Tag
tags question: http://stackoverflow.com/q/26315260
tag name: jqbootstrapvalidation

http://stackoverflow.com/comment/41164088
comment on: http://stackoverflow.com/a/26242671
type: AnswerComment
has text: Ah, is this always the case even if that function is nested inside another function?
score: 0
type: Comment

http://stackoverflow.com/q/26339024
tagged with: click
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8110934
duplicate of: http://stackoverflow.com/q/203198
has body: I have two buttons on a form. Both the buttons and the form are created dynamically: container.html(........ ........ &lt;input type='button' value='Send' id='btSend' /&gt;"+ " &lt;input type='button' value='Save' id='btSave' /&gt;"+ ................ ...............) And here the two functions should collect keystrokes: $("#btSend").click(function(){ .......... ............ } $("#btSave").click(function(){ .......... ............ }
has comment: http://stackoverflow.com/comment/41340401
type: Question
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/41340374
has answer: http://stackoverflow.com/a/26339067
has comment: http://stackoverflow.com/comment/41340382
tagged with: javascript
has title: How I can capture the click of a button dynamically created? JQuery
score: 0
answer count: 1
tagged with: button
tagged with: jquery

http://stackoverflow.com/comment/41331574
has text: Note that the if statements are _pointless_ in this case, as every browser that supports `addEventListener` also supports `preventDefault` and `stopPropagation`. If the events were being attached in a cross-browser manner, it would make sense.
score: 0
comment on: http://stackoverflow.com/q/26334108
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41229724
score: 0
type: AnswerComment
type: Comment
has text: I am not sure where is the error from, I tried to emulate an express server in my own environment and I do not get such issue. Did you send back the response? I am thinking this might've been an old error and the requests you are sending are still pending. My script for reference: http://jsfiddle.net/ukaom13p/
comment on: http://stackoverflow.com/a/26278280

http://stackoverflow.com/comment/41285818
type: QuestionComment
comment on: http://stackoverflow.com/q/26308815
score: 0
has text: Could you show us how you tried replacing the link with the file path? Also for clarification, is this image file on your local machine?
type: Comment

http://stackoverflow.com/q/26278550
has comment: http://stackoverflow.com/comment/41229318
tagged with: javascript
has comment: http://stackoverflow.com/comment/41229451
possible better answer: http://stackoverflow.com/a/26278684
score: 0
answer count: 2
has title: What's an effective way to debug uncaught syntaxerrors?
tagged with: syntax-error
has body: Recently I got stuck on uncaught syntaxerrors, and I don't have any clue on how you can effectively debug them. I'm using Chrome and I can't see what's happening when there are uncaught syntax errors, because the debugging of Chrome only seems to debug your own written code, but not the code that is being progressed, as far as my knowledge goes on debugging (which is beginnerlevel anyway). So I got this code right here: http://jsfiddle.net/0e5ue9k7/2/ The problem is an unexpected '}' when I call function userTurn(attack) { .... } at line 283, which is called by function combat { .... } at line 259 after pressing a button. I know that the problem is the button onclick event, but I'm not sure what's wrong, what's going on and how I should change it, because the syntax error is uncaught. What's the best way to deal with this problem? Any help would be very appreciated! If there's anything unclear let me know.
has answer: http://stackoverflow.com/a/26278684
has answer: http://stackoverflow.com/a/26278746
has comment: http://stackoverflow.com/comment/41229481
accepted answer: http://stackoverflow.com/a/26278746
has comment: http://stackoverflow.com/comment/41229618
has comment: http://stackoverflow.com/comment/41229328
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41230026
has comment: http://stackoverflow.com/comment/41229407
type: Question
tagged with: debugging
has comment: http://stackoverflow.com/comment/41229246

http://stackoverflow.com/comment/41251092
has text: Thanks....with my second question i can achieve controller inheritance in angularjs by child controller(childCtrl) inheriting abstract constructor function(BaseCtrl) instead can we use base controller instead of abstract constructor function and child controller inherit from base controller??
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26249017

http://stackoverflow.com/comment/41195000
comment on: http://stackoverflow.com/a/26259905
score: 0
type: AnswerComment
type: Comment
has text: The thinktecture javascript implicit example uses angular, I'm actually using knockout. The demo passes the access_token, but I would also like to pass the whole OAuth2 token so I can validate the id_token as well, How do I create the header to pass that info?

http://stackoverflow.com/q/26271176
score: 0
answer count: 3
tagged with: contains
tagged with: arrays
has answer: http://stackoverflow.com/a/26271738
possible better answer: http://stackoverflow.com/a/26271288
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26271288
type: Question
has title: array.contains(array) in JavaScript
accepted answer: http://stackoverflow.com/a/26271738
has answer: http://stackoverflow.com/a/26271307
has body: Is there an easy way of knowing if and array contains all elements of another array? Example: var myarray = [1,2,3]; var searchinarray = [1,2,3,4,5]; searchinarray contains all elements of myarray, so this should return true. Regards
tagged with: javascript

http://stackoverflow.com/comment/41303900
type: Comment
type: QuestionComment
has text: Nope, see comment below.
score: 0
comment on: http://stackoverflow.com/q/26319170

http://stackoverflow.com/comment/41098156
has text: @HashemQolami centered horizontally.
comment on: http://stackoverflow.com/q/26207279
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/77583962
upvote count: 1
has body: This is a very old question, but it is closest to the problem I was having. Maybe this will help someone else out in the future. TL;DR: If you're wanting to execute a dataLayer.push for a GTM event (or any JS, for that matter) in a Form Block post submission, you'll need an element with an onload property in the Post-Submit html. Here's what I ended up with The data and style properties of this object aren't important, I just did it to ensure the object would load. It's a stupid work around, but it does seem to work. The alternative would be to change the forms Post-Submit to a Redirect that would take the user to a "Thank you for your submission" page that would run the JS for a dataLayer push on page load. Background: Some time early 2023, the Form Block was updated to outright ignore script tags (here's a forum post surrounding that). This means if you wanted to do a dataLayer.push in the Post-Submit html -- something as simple as this: The Post-Submit will ignore it. What it seemingly won't ignore (for now ) is an onload script, hence the above solution.
answers question: http://stackoverflow.com/q/26349317
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41311062
comment on: http://stackoverflow.com/q/26322858
score: 0
type: QuestionComment
has text: Not sure where you're getting half a meg of libraries. A minified jQuery download is like 90k and even smaller if gzipped. You shouldn't need jQuery UI for what you're doing.
type: Comment

http://stackoverflow.com/comment/41312875
comment on: http://stackoverflow.com/q/26323948
has text: can you provide your code in jsfiddle ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41206771
type: Comment
score: 0
has text: Sure, that works fine and is more succinct, but seeing as the asker was showing an incomplete knowledge of the sort function I figured I'd be verbose.
comment on: http://stackoverflow.com/a/26265884
type: AnswerComment

http://stackoverflow.com/comment/41353751
type: Comment
comment on: http://stackoverflow.com/a/26345524
score: 0
has text: Sorry to double up, but for some reason SO isn't letting me edit the comment even though it's only been 4 minutes: FYI - the first link I posted explains how to create a unique instance of Mammal.offspring for each Cat at the time that the constructor is run.
type: AnswerComment

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/26213333
type: Tag
tags question: http://stackoverflow.com/q/26263288

http://stackoverflow.com/q/26202990
accepted answer: http://stackoverflow.com/a/26203223
has title: How to get URL's Title?
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26203223
has comment: http://stackoverflow.com/comment/41089637
tagged with: php
has body: if ($link == true) { // Links $link_search = '/\[a\](.*?)\[\/a\]/i'; if (preg_match_all($link_search, $text, $matches)) { foreach ($matches[1] as $match) { $match_decode = urldecode($match); $match_url = $match_decode; if (!preg_match("/http\:\/\//", $match_decode)) { $match_url = 'http://' . $match_url; } $text = str_replace('[a]' . $match . '[/a]', '&lt;a href="' . strip_tags($match_url) . '" target="_blank" rel="nofollow"&gt;' . $match_decode . '&lt;/a&gt;', $text); } } } The above code displays the link posted and when clicked redirects to the link. What I want is to show the of the destination link. For ex. Stackoverflow is shown in the post and when clicked takes user to http://stackoverflow.com
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41089546
type: Question
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26292757
score: 0
answers question: http://stackoverflow.com/q/26292591
has comment: http://stackoverflow.com/comment/41255561
has comment: http://stackoverflow.com/comment/41256538
has body: try it. setTimeout(function(){document.location.href="http://www.google.com";}, 3000);
type: Answer
has comment: http://stackoverflow.com/comment/41255660

http://stackoverflow.com/q/26320713
type: Question
tagged with: jquery-masonry
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26320820
has answer: http://stackoverflow.com/a/26320820
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26321026
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26321026
has body: So apparently my images are not stacking up on top of each other. They are all in straight horizontal rows. Not sure what is wrong. I want the images to be stacked up on top of each other in a fitted Pinterest-like/Masonry grid. Here's the shortcode I use in my index file: echo do_shortcode('[nggallery id="1"]'); Here's the code found in my Masonry gallery template file: <?php /** Template Page for the gallery overview Follow variables are useable : $gallery : Contain all about the gallery $images : Contain all images, path, title $pagination : Contain the pagination content You can check the content when you insert the tag <?php var_dump($variable) ?> If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?> **/ ?> <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?> <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>"> <?php $i = 0; ?> <?php foreach ( $images as $image ) : ?> <a class="thickbox" href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> <?php } ?> <?php if ( $image->hidden ) continue; ?> <?php if ($gallery->columns > 0): ?> <?php if ((($i + 1) % $gallery->columns) == 0 ): ?> <?php endif; ?> <?php endif; ?> <?php $i++; ?> <?php endforeach; ?> <?php echo $pagination ?> <?php endif; ?> This is what my gallery looks like on the actual page: http://steppic.com/original/896e07bdf2f759709b9ccc5f9eea9e28.png
has title: Images not stacking up in Masonry template?

http://stackoverflow.com/comment/41170347
has text: No if your product have white (or any other color) on the actual image background
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26245788
type: Comment

http://stackoverflow.com/comment/41226227
comment on: http://stackoverflow.com/q/26276913
score: 0
has text: you need to call "attr". $(this).attr('href')
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26205116
linked to: http://stackoverflow.com/q/21772424
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/34148464
tagged with: javascript
has comment: http://stackoverflow.com/comment/41093778
has comment: http://stackoverflow.com/comment/41113497
has title: Highcharts: how to specify file name in window.location.href exporting image to local disk
tagged with: highcharts
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: This jsfiddle shows how to export a Highcharts chart to a png file, however doesn't show how to specify the file name. Something like var image = canvas.toDataURL("image/png") .replace("image/png", "image/octet-stream"); image.filename = "file.png"; &lt;=== this doesn't work // Save locally window.location.href = image; Any ideas?
linked to: http://stackoverflow.com/q/15811897

http://stackoverflow.com/comment/41205812
score: 0
has text: No. Nothing you do on your page can get the size of a page in a cross-domain frame. Threads have nothing to do with it.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26246296

http://stackoverflow.com/a/26224405
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26224349
has body: The HTML Attributes width or height for an &lt;img&gt; element take the value in pixels, e.g. width=100. There are no other allowed values like % or em, so you don't need and actually must not add px to your values. Change board +="&lt;td class=\"" + "td1\"&gt;" + "&lt;img src=\"white bishop.png\" width=12px height=12px&gt;" to board +="&lt;td class=\"" + "td1\"&gt;" + "&lt;img src=\"white bishop.png\" width=12 height=12&gt;" and give it a try.

http://stackoverflow.com/comment/41305989
comment on: http://stackoverflow.com/q/26320386
has text: Jonathan, I just added the ' marks, and still: nothing is being displayed.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41238258
score: 0
type: QuestionComment
has text: Alright @PatrickFerreira. I will wait for that solution as well.
type: Comment
comment on: http://stackoverflow.com/q/26283026

http://stackoverflow.com/comment/41133596
type: AnswerComment
has text: I just noticed i had a type (a dot after the word "fruits"). I removed the dot and if you also put it, remove it now. Do you have your console open, what does it say when you reload the page?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26225899

http://stackoverflow.com/comment/41142083
type: Comment
type: QuestionComment
has text: @cpk here is an example on someone using the ng-show to do what you want although it is not optimal. http://stackoverflow.com/a/20858450/746817 The answer below this one is more brilliant: http://stackoverflow.com/a/20858583/746817
score: 0
comment on: http://stackoverflow.com/q/26219485

http://stackoverflow.com/q/26206847
has comment: http://stackoverflow.com/comment/41096858
type: AnsweredQuestion
has body: I am trying do a simple drop menu to show when mouseover, this script shows another div with the links. It all works fine but when I try to select one link the other div hides. jQuery(document).ready(function() { jQuery("#menu_link").mouseover(function() { jQuery(".1").show(); }); jQuery("#menu_link").mouseout(function() { jQuery(".1").hide(); }); }); http://jsfiddle.net/sx8o1tbh/1/ If you go and put the cursor over the word "Inicio" you see it shows the other div with links but when I try go to this new div it hides, I think something is wrong in the jQuery code. Thanks for the help.
possible better answer: http://stackoverflow.com/a/26206950
has answer: http://stackoverflow.com/a/26206950
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41096921
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26206911
has title: Drop menu with jQuery doesn't work on mouseover
accepted answer: http://stackoverflow.com/a/26206911

http://stackoverflow.com/a/37074597
score: 3
answers question: http://stackoverflow.com/q/26271034
downvote count: 1
has body: Some browsers(IE and safari) will be use a default size to SVG if you don't put a certain height and width. That what is happening here. You are right, the "intrinsic aspect ration" is requiring another Dom and css and will be nice if we can overcame this. There is a solution to this, you can calculate and put the right height to padding-bottom and this will give the right "unknown height" you want. You can see a full solution here: http://codepen.io/tomkarachristos/pen/GZPbgZ <!-- xMidYMin: Align the midpoint X value of the element's viewBox with the midpoint X value of the viewport. slice : the entire viewport is covered by the viewBox and the viewBox is scaled down as much as possible, height: if you dont set >= 1px some browsers will not render anything. --> hello Age and javascript: /* Here we do the hack. With the math type: percent * height/width we are adjust the total height of an element who is depend in width using the padding-bottom. You can put an inline padding-bottom if you want in html. */ $(function() { $('svg').each(function() { var svg = $(this); var text = svg.find('text'); var bbox = text.get(0).getBBox(); //the hack var calcString = "calc(100% * " + bbox.height/bbox.width + ")"; svg.css("padding-bottom",calcString); svg.get(0).setAttribute('viewBox', [bbox.x, bbox.y, bbox.width, bbox.height].join(' ')); }); });
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41215987
type: Comment
comment on: http://stackoverflow.com/a/26251020
has text: @clintgh I must admit I ran out of ideas :( What’s evident for me, the value in the database is now correct, the ajax sends the correct value and the CSV writer _receives_ the correct value. Hence, it’s a CSV writer now who corrupts it. Would you mind to try another CSV writer?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26214184
answers question: http://stackoverflow.com/q/26213819
has comment: http://stackoverflow.com/comment/41113741
has comment: http://stackoverflow.com/comment/41112729
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41579084
score: 2
downvote count: 0
has body: Try to configure you Server just with ByteArrayMessageConverter: @Configuration @EnableWebSocketMessageBroker public class MyWebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public boolean configureMessageConverters(List&lt;MessageConverter&gt; messageConverters) { messageConverters.add(new ByteArrayMessageConverter()); return false; } } UPDATE Ah! I see that. Thanks: public TextMessage(byte[] payload) { super(new String(payload, UTF_8)); this.bytes = payload; } From other side from STOMP spec: The body of a STOMP message must be a String. If you want to send and receive JSON objects, ... According to the ArrayBuffer: Getting an array buffer from existing data From a Base64 string From a local file So, I think you don't have a chioce rather than provide you some custom MessageConverter, which converts your byte[] to Base64 String and send it. On the JavaScript side you should decode that string to the ArrayBuffer somehow.

http://stackoverflow.com/q/26255696
has answer: http://stackoverflow.com/a/26355306
tagged with: javascript
tagged with: fabricjs
score: 0
answer count: 1
type: UnansweredQuestion
has title: javascript for loop doesn't loop through the end
has body: I have an Array of Objects which should be placed on a FabricJS Canvas. I iterate over the Array, look at what Canvas the Object should be placed on, create the canvas if it doesn't exist and place the object there. It works fine with text and geometrical shapes but Images it places on the last Slide. When I debug it breaks on the Line "fabric.Image.fromURL(src, function(oImg){" and goes to the next iteration. function dataIsLoaded(){ for (var i=0; i&lt;myObj.objects.length; i++){ var slideIndex= myObj.objects[i].canvas; try{ var canvas = document.getElementById('slide_'+slideIndex).fabric; } catch(e){ createCanvas(slideIndex); var canvas = document.getElementById('slide_'+slideIndex).fabric; } var type= myObj.objects[i].type; if(type =="image"){ var src = myObj.objects[i].src; var top = myObj.objects[i].top; var left = myObj.objects[i].left; var angle = myObj.objects[i].angle; var scaleX = myObj.objects[i].scaleX; var scaleY = myObj.objects[i].scaleY; fabric.Image.fromURL(src, function(oImg){ oImg.set({ left: left, top: top, angle: angle, scaleX: scaleX, scaleY:scaleY }); canvas.add(oImg); }); } } } And myObj looks like: var myObj ={ 'objects': [ { 'type': 'image', 'canvas': '0', 'src': 'file:///D:/Flyingblocks/designer/4.png', 'top': 0, 'left': 0, 'angle': 0, 'originX': 'left', 'originY': 'top', 'scaleX': 1.50195, 'scaleY': 1.50195 },{ 'type': 'text', 'text': 'Hallo', 'canvas': '1', 'top': 221, 'left': 162, 'angle': 0, 'scaleX': 1, 'scaleY': 1, 'originX': 'left', 'originY': 'top', 'fill': 'rgba(0,0,0,1.0)', 'fontFamily': 'Aharoni', 'fontSize': 40 } ] }
type: Question
has comment: http://stackoverflow.com/comment/41187242

http://stackoverflow.com/q/26226454
upvote count: 7
answer count: 1
linked to: http://stackoverflow.com/q/21321302
favorite count: 0
linked to: http://stackoverflow.com/q/26836103
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26237949
downvote count: 0
score: 7
has body: Using TinyMCE 4.1.5 under JS (w/ JQuery 1.11.1 and several JQuery plugins like form and ui). The TinyMCE version I'm using is not the one with embedded JQuery. The editor comes up fine and I can type directly in it without issue. Using only the tinymce-provided plugins, all functions that use buttons or non-text field controls work fine. However, the text fields in the plugins (such as in link or insert video) won't let me type into the fields or select other text fields (so it seems like a focus issue). There's a fiddle at http://fiddle.tinymce.com/bzeaab/16, and here's a more specific init code from in the application: var _clear_css_cache; _clear_css_cache = '/javascripts/canonical/tinymce/skins/lightgray/' + 'content.min.css?' + new Date().getTime(); var _toolbar_1, _toolbar_2; _toolbar_1 = 'formatselect, |, ' + 'bold, italic, underline, strikethrough, ' + 'subscript, superscript, |,' + 'outdent, indent, blockquote, |,' + 'alignleft, aligncenter, alignright, alignjustify'; _toolbar_2 = 'bullist, numlist, table, charmap, emoticons |,' + 'link, unlink, |,' + 'image, media, |,' + 'code, preview |,' + 'pasteword, print |,' + 'undo, redo,'; var _contextmenu; _contextmenu = 'link image inserttable | ' + 'cell row column deletetable'; tinymce.init({ selector: 'textarea.tinymce', toolbar: [_toolbar_1, _toolbar_2], plugins: [ 'advlist autolink autosave code charmap contextmenu emoticons image', 'lists link media paste preview print table' ], contextmenu: _contextmenu, theme: 'modern', content_css: _clear_css_cache, menubar: false, statusbar: false, convert_urls: false, relative_urls: false, invalid_elements: 'script' }); And to insert into target div (with a child of 'textarea.tinymce'), I use a pretty standard call: function do_wysiwyg(_div) { tinymce.execCommand('mceAddEditor', true, $(_div).attr('id')); }); I've tried several browsers local and in BrowserStack and none of the plugin text fields work in any of them, even though the editor does. See also using tinymce w…
tagged with: tinymce-4
type: Question
tagged with: javascript
tagged with: jquery
tagged with: tinymce
has title: TinyMCE 4 can't type in provided plugin text fields

http://stackoverflow.com/q/26307203
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26307778
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26307269
tagged with: css
has title: Default styling for a Bootstrap Grid
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
linked to: http://stackoverflow.com/q/18614171
type: Question
has comment: http://stackoverflow.com/comment/41282239
duplicate of: http://stackoverflow.com/q/18614171
tagged with: javascript
score: 0
has body: First I was using a table to layout some elements in my page, with the &lt;table&gt; &lt;thead&gt; etc... tags. Then I found that bootstrap has a grid system, and I want to use it for laying out my elements. This went ok for the layout, with &lt;div class="row"&gt; for each &lt;tr&gt; tag and &lt;div class="col-md-12"&gt; for each &lt;td&gt; tag. However I would like to use some styling provided by bootstrap, such as available for the table at this first example. Is this possible or available? Right now I just get the layout, but no separation (e.g. borders) between rows like with the table example. Am I going at this the wrong way, or is there actually a way to style this grid in a table like fashion, and how would I do this?
answer count: 3
has answer: http://stackoverflow.com/a/26307260

http://stackoverflow.com/q/26298186
type: Question
has answer: http://stackoverflow.com/a/26298479
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26298361
possible better answer: http://stackoverflow.com/a/26298236
score: 0
has answer: http://stackoverflow.com/a/26298236
answer count: 3
has body: I am trying to assign the following to a PHP variable: [Add New Item] I have tried this: $add_button = "[Add New Item]"; But I am getting the error message: Error: syntax error, unexpected ''javascript:pop_booking_item_a' (T_CONSTANT_ENCAPSED_STRING) I think I need to escape the quotes but I'm not sure how to?
tagged with: http://stackoverflow.com/tag/html
tagged with: variable-assignment
tagged with: php
has title: Assign Javascript popup HTML link to PHP variable
has answer: http://stackoverflow.com/a/26298361
tagged with: escaping
type: AnsweredQuestion

http://stackoverflow.com/q/26301033
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26301079
has title: Center a dynamic on screen
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I'm trying to create a gallery-page as a list of thumbnails. When a thumbnail is clicked, the related picture opens in a "popup"-div showing the full size of the image. What I'm having problems with is centering that div on the screen. Each picture has different dimensions. How to do this with javascript / jQuery? JSFiddle: http://jsfiddle.net/29bo2k9q/ HTML: CSS: #gallery { text-align: center; width: 100%; } #gallery ul{ display: block; padding: 0; list-style: none; overflow: hidden; } #gallery ul li { display: inline-block; vertical-align: top; background-position: center; background-size: cover; background-repeat: no-repeat; width: 250px; height: 250px; margin: 2.5%; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; /* future proofing */ -khtml-border-radius: 5px; /* for old Konqueror browsers */ cursor: pointer; .black_overlay{ cursor: pointer; display: none; position: fixed; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { position: absolute; top: 50%; left: 50%; display: none; margin: 0 auto; border: 8px solid orange; background-color: #eee; z-index:1002; } .gallerylink{ display: block; height: 100%; width: 100%; text-decoration: none; }
type: Question
accepted answer: http://stackoverflow.com/a/26301079
downvote count: 0

http://stackoverflow.com/comment/41327494
type: QuestionComment
comment on: http://stackoverflow.com/q/26331870
score: 1
has text: just use `if` ...assuming your code worked it would change it to maximum right away
type: Comment

http://stackoverflow.com/q/26293366
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26293744
has comment: http://stackoverflow.com/comment/41257131
has comment: http://stackoverflow.com/comment/41257321
has title: How to use JavaScript or jQuery to wrap a range (from selection) in a web page into a specific tag?
upvote count: 0
score: -1
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41256600
tagged with: jquery
has body: So I need to find a way to wrap some range into a specific tag using javascript or jQuery. for example: hey how are you? I am good! then use a javascript code in the console to get: hey how are you? I am good! I know how to get a range from a selection, but I need to find a way to wrap this range. Thank You!

http://stackoverflow.com/comment/41166890
comment on: http://stackoverflow.com/a/26244010
type: AnswerComment
score: 0
type: Comment
has text: Thanks for the advice but it still doesn't work and if I call an alert(data) on the JSON it fails to even give me a response so I assume the $http never succeeds with the [ ] braces. Any other ideas?

http://stackoverflow.com/comment/41111142
score: 0
has text: @torazaburo Nevermind. I figured out a way to get all html as long as the html is written correctly (and doesn't include self ending tags) See my edit for the change.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26213686

http://stackoverflow.com/comment/41300044
comment on: http://stackoverflow.com/q/26317050
score: 0
has text: I don't know what do you mean when said about icon. If it's the icon as the icon which display in windows/mac 's folder, I think you cannot do it. But you could do it by mapping icon. example, `var prefix = file.name.match(/[^\.][\w\d]*$/); file.icon = iconList[prefix]`, build an array with `iconList = [ { 'exe' : 'exe.png'} , 'pdf' : 'pdf.png'} ]`
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26254810
accepted answer of: http://stackoverflow.com/q/26253958
answers question: http://stackoverflow.com/q/26253958
score: 9
upvote count: 9
type: AcceptedAnswer
downvote count: 0
has body: You only need to include the goog/base.js header when you are compiling with :optimizations :none. The reason that :optimizations :none produces multiple files is that the Google Closure compiler is not run at all with this setting. Instead the ClojureScript compiler simply writes the compiled JavaScript directly to file rather than passing it through the Closure compiler. Therefore the JavaScript produced is neither optimized nor multiple files concatenated into a single JavaScript file. There is also a discussion regarding this compilation mode available on page 21 of ClojureScript: Up and Running (free sample including page 21 is available here) I personally rarely use :optimizations :none and rather use :simple during development and :advanced for production. Both :simple and :advanced produce only a single JavaScript file as output which then only requires a single script tag, e.g. &lt;script src="/js/myapp.js" type="text/javascript"&gt;&lt;/script&gt; I have provided a sample cljsbuild configuration below: :cljsbuild {:builds [{:id "dev" :source-paths ["src"] :compiler {:output-to "resources/static/js-dev/myapp.js" :output-dir "resources/static/js-dev" :optimizations :simple :preamble ["react/react.min.js"] :externs ["react/externs/react.js"] :source-map "resources/static/js-dev/myapp.js.map" :pretty-print true}} {:id "live" :source-paths ["src"] :compiler {:output-to "resources/static/js-live/myapp.js" :output-dir "resources/static/js-live" :optimizations :advanced :pretty-print false :preamble ["react/react.min.js"] :externs ["react/externs/react.js"]}}]}
has comment: http://stackoverflow.com/comment/41186640
type: Answer

http://stackoverflow.com/q/26334917
tagged with: angularjs-scope
has body: How to navigate between states defined by $stateProvider on click of &lt;a&gt; &lt;/a&gt; tag Here's is my state.. $stateProvider //region page States .state('page1', { url: "/pg1", templateUrl: 'page1.html', controller: 'page1Ctrl' }) .state('page2', { url: '/pg2', templateUrl: 'page2.html', controller: 'page2Ctrl' }) .state('page3', { url: '/pg3', templateUrl: 'page3.html', controller: 'page3Ctrl' })
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26335056
upvote count: 1
answer count: 1
has title: Navigate between states with tag on click
tagged with: angular-ui-router
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26335056

http://stackoverflow.com/q/26208470
tagged with: javascript
has comment: http://stackoverflow.com/comment/41099861
has answer: http://stackoverflow.com/a/26208556
answer count: 1
has body: I'm trying out classes in javascript also using extend.js to create them. I am having some trouble with classes and am not really sure if I need them, but I think this one will be useful. It's a class to just get some database table data. var TableData = Class.extend(function(){ this.rowId; this.action; this.returnWhat; this.tableType; this.php; this.query = function(){ if (this.returnWhat) this.action += '_' + this.returnWhat; var postData = { func : this.action }; if (this.rowId) $.extend(postData, { rowId : this.rowId }); $.post(this.php, postData, function(data){ if(data){this.data = data;} }); return this.data; }; }); I will have only tables that I know of, so I just store them as vars/options, but I don't know how to set the class vars up properly. This for example does not work but maybe demonstrates what I'm trying to do. var options = { rowId : '*', action : 'get', returnWhat : 'all' } var league = function (options){ this.tableType = 'league'; this.rowId = options.rowId; this.action = options.action; this.returnWhat = options.returnWhat; this.php = 'php/' + options.tableType + '.php'; } var tableData = new TableData(assoc_league);
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26208556
has comment: http://stackoverflow.com/comment/41099869
has comment: http://stackoverflow.com/comment/41099845
score: 0
has title: How to feed a class a list of options through a function?
type: Question

http://stackoverflow.com/comment/111711657
comment on: http://stackoverflow.com/a/26344334
has text: XSS attacks solution: https://stackoverflow.com/questions/4072762/how-do-i-write-unencoded-json-to-my-view-using-razor
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26257024
tagged with: javascript
score: 6
possible better answer: http://stackoverflow.com/a/26257060
has answer: http://stackoverflow.com/a/26257060
type: Question
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
favorite count: 0
accepted answer: http://stackoverflow.com/a/26257070
has body: I'm trying to mouseover an image which is behind an another image. Is there any way to render the front image like it is not there, so I can mouseover the other image behind it? Example can be seen here: I can't mouseover the characters which are behind the logo boundingbox.
answer count: 2
tagged with: onmouseover
has answer: http://stackoverflow.com/a/26257070
type: AnsweredQuestion
has title: How to MouseOver behind an object?
downvote count: 0

http://stackoverflow.com/comment/41201981
comment on: http://stackoverflow.com/q/26263182
type: Comment
type: QuestionComment
has text: You may be right I will tell my superiors what I have discovered here.
score: 0

http://stackoverflow.com/a/26289062
has comment: http://stackoverflow.com/comment/94791909
upvote count: 2
has comment: http://stackoverflow.com/comment/41249522
type: Answer
has body: You could just add your script tag before your close body tag, and also, use it in a valida javascript scope. .. all html page &lt;script&gt; $(document).ready(function() { // show when page load toastr.info('Hey - it works!'); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; You also have other methods, // for success - green box toastr.success('Success messages'); // for errors - red box toastr.error('errors messages'); // for warning - orange box toastr.warning('warning messages'); // for info - blue box toastr.info('info messages');
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26289041

http://stackoverflow.com/comment/41131767
comment on: http://stackoverflow.com/q/26224988
has text: @Roamer-1888 browser table or new instance of the browser.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41283407
has text: Maybe I'm missing something but couldn't you just keep a 2 dimensional array representing your currently applied colors and then count the colors in that array?
comment on: http://stackoverflow.com/q/26307429
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26195570
type: Answer
answers question: http://stackoverflow.com/q/26195518
upvote count: 0
has body: Simplest solution of this case could be var data = " 1 cell cell cell "; $('#table').html( data + $('#table').html());
score: -2
has comment: http://stackoverflow.com/comment/41076428
downvote count: 2

http://stackoverflow.com/q/26302151
has comment: http://stackoverflow.com/comment/41273095
has comment: http://stackoverflow.com/comment/41272935
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41273043
has comment: http://stackoverflow.com/comment/41272943
type: Question
has body: I want to make an input, in which you type words or letters to sort some kind of elements. For example: there are divs with different words in them, and when you type something in the input immediately sort the divs which have the same letters as in the input... dogs cats dogs dogs cats cats dogs
tagged with: javascript
tagged with: jquery
has title: Detect words and letters typed in input and sort other elements (text in div) with same letters
has answer: http://stackoverflow.com/a/26302364
accepted answer: http://stackoverflow.com/a/26302364
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41272890
has comment: http://stackoverflow.com/comment/41272984

http://stackoverflow.com/a/26314928
answers question: http://stackoverflow.com/q/26314799
upvote count: 1
type: AcceptedAnswer
has body: You need quotes on the href attribute: if (json["type"] == "story") { $(".title").append(" " + json["title"] + " " + json["id"] + " "); } http://jsfiddle.net/pjammox5/1/ To see why, look at the difference in URLs: http://www.vanityfair.com/business/2014/11/satya-nadella-bill-gates-steve-ballmer-microsoft.print https://firstlook.org/theintercept/2014/10/10/core-secrets/ Note the end of the second, -secrets/, combines with the to be self-closing: <--Closes the tag
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26314799

http://stackoverflow.com/comment/41269059
type: AnswerComment
type: Comment
has text: must be two distinct elements texts (one for numbers and one for 'R$') because each will have a different style (like image).
comment on: http://stackoverflow.com/a/26299779
score: 0

http://stackoverflow.com/comment/41282124
has text: When I use the demos on jquery UI's site, I can't get back up to the 'j'.
type: QuestionComment
comment on: http://stackoverflow.com/q/26307129
type: Comment
score: 0

http://stackoverflow.com/a/26241873
answers question: http://stackoverflow.com/q/26241815
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: The reason why your alert doesn't show is you are outputting that value as a constant instead of a valid String within javascript. You really need to wrap it in quotes and you should also encode the string value for use with javascript. For example: var str = '${pInstance.stringval?.encodeAsJavaScript()}'; alert(str);
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26241815

http://stackoverflow.com/q/26197129
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26197242
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26197242
has answer: http://stackoverflow.com/a/26197249
has comment: http://stackoverflow.com/comment/41079249
has comment: http://stackoverflow.com/comment/41079252
type: AnsweredQuestion
has title: Javascript - Find middle value of user inputted numbers
accepted answer: http://stackoverflow.com/a/26197249
has body: I'm having trouble figuring this out, and I think there's probably an easy solution but I'm just not wording it correct. I know how to find the max value of 3 inputted numbers. largest = Math.max(number1, number2, number3); // this code finds largest number I know how to find smallest number smallest = Math.min(number1, number2, number3); //smallest number What I can't figure out is how to find the middle number So when the user puts in 3 numbers, say 9, 6, 12 (in that order) number1= 9 //first number user entered number2 = 6 // second number user entered number3 = 12 // third number user entered Right now I have code to find the smallest and the largest, 6 and 12. But I don't know how to call the middle. Is there a Math.middle function I can call. I'm not looking for the middle element in an array, I just want the middle value of the 3 numbers I input. Hopefully that makes sense.
has answer: http://stackoverflow.com/a/26197224
type: Question
tagged with: min
tagged with: max

http://stackoverflow.com/q/26348693
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has body: I am currently working on a settings page for a planning poker app I am developing. What I would like to have happen is to have the rest of the settings only visible if "become scrum master is checked". Ive looked at ng-show and am not quite sure how it works, here is my attempt but it doesnt work as everything is still visible Create Game Project Become Scrum Master Card Options Fibonacci (1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) Modified Fibonacci (.5, 1, 2, 3, 5, 8, 13, 20, 40, 100) Point Suggestion Method Take average if all votes are within three cards Take the card selected most often by players Take average of all votes Do not suggest story points Allow Cards To Be Reselected Join Game
type: Question
has answer: http://stackoverflow.com/a/26348795
tagged with: javascript
has title: Ng show for settings page

http://stackoverflow.com/q/26202870
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/41089300
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41093394
has body: Is there a way for a svg element to be rotating infinitely? Snap offers a way to rotate by a certain amount, but how can I make to rotate infinitely?
has comment: http://stackoverflow.com/comment/41089310
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26205028
score: 0
has title: Infinite rotation with snap.svg

http://stackoverflow.com/comment/49233463
type: Comment
comment on: http://stackoverflow.com/a/28740710
has text: @netik this answer should be marked as correct. And thanks @user1096907!
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41107636
comment on: http://stackoverflow.com/a/26212450
score: 0
type: AnswerComment
has text: Hi, I did that but what I want is a loop which will let me control the amount of "+" signs it displays. Right now it displays a "+" sign every time a button is pressed but I want to control that so when I press the button again it doesn't display the plus sign unless I change the condition of the loop.
type: Comment

http://stackoverflow.com/comment/41117847
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26218129
has text: Why is this downvoted? It looks correct to me. He's the only one to notice that merely correcting the `if` condition will cause a *ReferenceError*.
type: AnswerComment

http://stackoverflow.com/q/26278110
score: 1
has comment: http://stackoverflow.com/comment/41228795
type: Question
has comment: http://stackoverflow.com/comment/41228618
tagged with: javascript
has title: Use Percentages instead of Vote Counts for Jquery Voting Plugin
tagged with: jquery
has comment: http://stackoverflow.com/comment/41232392
upvote count: 1
has body: I'm creating a voting system similar to stackoverflow, but instead of vote counts of 0, 1, -1. I want to change it to Not Rated, 0%, and 100%. How can I accomplish this? This is the tutorial i'm following: http://janosgyerik.github.io/jquery-upvote/ And this is my html: And my javascript: function gen(target, cssClass, params) { var obj = $('#templates .upvote').clone(); obj.addClass(cssClass); $(target).append(obj); return obj.upvote(params); } $(function() { function gen_examples(params) { gen('#examples', '', params); } function gen_unix(params) { gen('#unix', 'upvote-unix', params); } function gen_programmers(params) { gen('#programmers', 'upvote-programmers', params); } function gen_serverfault(params) { gen('#serverfault', 'upvote-serverfault', params); } var functions = [gen_examples, gen_unix, gen_programmers, gen_serverfault]; for (var i in functions) { var fun = functions[i]; fun(); } }); ;(function($) { "use strict"; var namespace = 'upvote'; var dot_namespace = '.' + namespace; var upvote_css = 'upvote'; var dot_upvote_css = '.' + upvote_css; var upvoted_css = 'upvote-on'; var dot_upvoted_css = '.' + upvoted_css; var downvote_css = 'downvote'; var dot_downvote_css = '.' + downvote_css; var downvoted_css = 'downvote-on'; var dot_downvoted_css = '.' + downvoted_css; var star_css = 'star'; var dot_star_css = '.' + star_css; var starred_css = 'star-on'; var dot_starred_css = '.' + starred_css; var count_css = 'count'; var dot_count_css = '.' + count_css; var enabled_css = 'upvote-enabled'; function init(dom, options) { return dom.each(function() { var jqdom = $(this); methods.destroy(jqdom); var count = parseInt(jqdom.find(dot_count_css).text(), 10); count = isNaN(count) ? 0 : count; var initial = { id: jqdom.attr('data-id'), count: count, upvoted: jqdom.find(dot_upvoted_css).size(), downvoted: jqdom.find(dot_downvoted_css).size(), starred: jqdom.find(dot_starred_css).size(), callback: function() {} }; var data = $.extend(initial, options); if (data.upvoted …
has comment: http://stackoverflow.com/comment/41232097
downvote count: 0
has comment: http://stackoverflow.com/comment/41233300
favorite count: 0
has comment: http://stackoverflow.com/comment/41228499
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41228340
has comment: http://stackoverflow.com/comment/41235513
has comment: http://stackoverflow.com/comment/41228675
answer count: 0

http://stackoverflow.com/q/26323933
answer count: 1
accepted answer: http://stackoverflow.com/a/26324000
tagged with: jquery
tagged with: http://stackoverflow.com/tag/csv
has title: expected ; when parsing csv file
has body: I'm trying to parse with javascript and papaparse. Problem is, that I'm getting an error that I don't understand. My csv delimiter is semicolon ;, and that's fine, but for some reason, when parsing my csv I get an error saying: Uncaught SyntaxError: Unexpected token ILLEGAL Please check it out yourself at http://itpsychology.net/test/ and notice the error in your console.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41312486
tagged with: excel
has answer: http://stackoverflow.com/a/26324000
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/55888813
score: 0
comment on: http://stackoverflow.com/a/34067493
type: AnswerComment
has text: Any hint on a solution?
type: Comment

http://stackoverflow.com/q/26242788
downvote count: 0
tagged with: javascript
tagged with: interactive
has comment: http://stackoverflow.com/comment/41165832
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41165607
favorite count: 0
has answer: http://stackoverflow.com/a/26245600
tagged with: http://stackoverflow.com/tag/svg
possible better answer: http://stackoverflow.com/a/26243297
upvote count: 2
has comment: http://stackoverflow.com/comment/41167122
has body: So I am creating an interactive map of the US, where upon clicking on a state, my site will take you to a static page for that state (this example, Alaska). My question is how do I wrap an anchor tag around this? Here is an example of one of the states I have. all the other states follow the same pattern/structure. I've never had to deal with this before as this is my first time working with SVG so any advice / pointers would be great! &lt;g id="states"&gt; &lt;g&gt; &lt;!-- Alaska --&gt; &lt;path id="map_1" fill="#EBECED" stroke="#FFFFFF" stroke-width="1" d="M336.6,199.5l-0.199,0.4l0.5,1.1l-3.301,32.399l0.9,17.5c1.6-0.399,2.4-0.699,2.4-1 c-0.301-0.6-0.4-1.1-0.301-1.5c0.101-1.5,0.5-1.899,1.101-1.3c0.6,0.5,1,1.4,1.399,2.7c0.301,1.3,0.801,1.9,1.5,1.6 c0.301-0.199,1-0.5,1.9-0.8c0.6-0.8,0.8-1.399,0.6-1.8c-0.3-0.5-0.3-1.1,0-1.7c0.301-0.7,0-1.2-0.8-1.5 c-0.899-0.399-1.2-1.2-0.6-2.3h22.5c-0.4-1.6-0.601-2.7-0.3-3.3c0.199-0.7,0.199-2-0.301-3.8c-0.199-0.801-0.199-1.2-0.3-1.301 c0-0.1,0.101-0.6,0.3-1.6c0.101-0.6,0.4-1.2,0.9-2c0.4-0.5,0.6-1.1,0.4-1.8c-0.101-0.7-0.5-1.5-0.9-2.4 c-0.5-0.899-0.8-1.7-0.9-2.2l-3.8-25.399H336.6z"/&gt; &lt;/g&gt;
has comment: http://stackoverflow.com/comment/41165392
has answer: http://stackoverflow.com/a/26243297
accepted answer: http://stackoverflow.com/a/26245600
has comment: http://stackoverflow.com/comment/41165421
has title: how to make clickable link with SVG map shapes
type: AnsweredQuestion
score: 2
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41168101

http://stackoverflow.com/comment/87381505
type: Comment
comment on: http://stackoverflow.com/q/26213255
type: QuestionComment
has text: breaking changed since hapi v.17 please check my answer.
score: 0

http://stackoverflow.com/q/26351601
has title: Off-page Sliding Navigation
upvote count: 1
has comment: http://stackoverflow.com/comment/41363922
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26356681
accepted answer: http://stackoverflow.com/a/26356681
has comment: http://stackoverflow.com/comment/41363384
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I am trying to create a simple off-page sliding navigation however I am stack on some codes mostly CSS. I am trying to create a 3D effect instead of a simple slide effect which hides and unhide the menu on the sidebar. Here's my current JSFIDDLE work: http://jsfiddle.net/je9fa6zc/ What I want is to create a 3D slide in effect that looks like this: http://jsfiddle.net/f9bdm1te/2/ So I tried to copy some CSS from this JSFIDDLE however I did not get what I want. See my updated CSS after copying some codes on the 3D slide in effect JSFIDDLE. #site-wrapper { position: relative; overflow: hidden; width: 100%; height: 5000px; /* Temp: Simulates a tall page. */ -webkit-perspective: 1500px; perspective: 1500px; -webkit-perspective-origin: 0% 50%; perspective-origin: 0% 50%; } #site-canvas { width: 100%; height: 100%; position: relative; -webkit-transform: translateX(0); transform: translateX(0); -webkit-transition: .3s ease all; transition: .3s ease all; padding: 5% 0; /* Temp: Just spacing. */ } #site-menu { width: 300px; height: 100%; position: absolute; top: 0; left: -300px; background: #428bca; padding: 15px; -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg); transform: translate3d(-100%, 0, 0) rotateY(-90deg); -webkit-transform-origin: 100% 50%; transform-origin: 100% 50%; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } #site-wrapper.show-nav #site-canvas { -webkit-transform: translateX(300px); transform: translateX(300px); visibility: visible; -webkit-transition: -webkit-transform 0.5s; transition: transform 0.5s; -webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg); transform: translate3d(-100%, 0, 0) rotateY(0deg); } Would you mind checking where did i went wrong? If also you could update my JSFIDDLE so that I can visualize it?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/26294345
type: AnsweredQuestion
has title: in kinetic js fill element(shape) with image
has answer: http://stackoverflow.com/a/26295462
type: Question
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26295462
tagged with: kineticjs
has body: I am making different shapes inside canvas using Kinetic js. I inserted image into shape but not able to resize image inside shape. User will give input x,y,height and width of image. Then image of given size will be inserted into shape. I can not insert images here because of less reputation. You will understand my question easily by viewing js fiidle Here is my code sample $(img).load(function() { blueCircle.fillPatternImage(img); blueCircle.fillPatternOffset({x:100, y:105}); layer.draw(); }); img.src = ""; img.src = "http://www.fusemobile.com.au/wp-content/uploads/2011/11/mobile-social-network-300x225.jpg";

http://stackoverflow.com/comment/41177720
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26249976
has text: @USer22999299: [mdn CSS `left` property](https://developer.mozilla.org/en-US/docs/Web/CSS/left)
type: Comment

http://stackoverflow.com/comment/41114156
comment on: http://stackoverflow.com/a/26215926
type: AnswerComment
score: 0
type: Comment
has text: @Shomz Thanks, I was actually using *document.getElementById* inside loop which seems wasteful compared to yours. Also thnx for removeAttribute...

http://stackoverflow.com/comment/41225699
comment on: http://stackoverflow.com/q/26276409
has text: thanks dominic, removing the center div fixed the clickability ;) let me rewrite a sec ;) ill se if it works ;) wow i gotta take a break this is a mess -.-
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26303966
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41277087
has answer: http://stackoverflow.com/a/26304024
tagged with: node.js
type: UnansweredQuestion
upvote count: 1
has body: I was wondering if I can call nodejs as script src="nodeapp.js" and render for example an image or a piece of another javascript retrieved by node app?
downvote count: 3
has title: Nodejs as javascript src?
type: Question
has comment: http://stackoverflow.com/comment/41276508
score: -2
answer count: 1

http://stackoverflow.com/q/26275186
favorite count: 0
has comment: http://stackoverflow.com/comment/41224558
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47995193
has title: SVG animated spinner not working in IE or Firefox
has comment: http://stackoverflow.com/comment/41223842
score: 2
linked to: http://stackoverflow.com/q/24203492
type: Question
upvote count: 2
tagged with: firefox
tagged with: javascript
has body: I've been trying to implement this spinner, built by Fran Pérez: http://codepen.io/mrrocks/pen/EiplA It works great in Safari and Chrome, but doesn't work at all in Firefox or IE. Has anyone got any suggestions on a fix? HTML &lt;svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"&gt; &lt;circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"&gt;&lt;/circle&gt; &lt;/svg&gt; SCSS // This is just to center the spinner html, body { height: 100%; } body { display: flex; align-items: center; justify-content: center; } // Here is where the magic happens $offset: 187; $duration: 1.4s; .spinner { animation: rotator $duration linear infinite; } @keyframes rotator { 0% { transform: rotate(0deg); } 100% { transform: rotate(270deg); } } .path { stroke-dasharray: $offset; stroke-dashoffset: 0; transform-origin: center; animation: dash $duration ease-in-out infinite, colors ($duration*4) ease-in-out infinite; } @keyframes colors { 0% { stroke: #4285F4; } 25% { stroke: #DE3E35; } 50% { stroke: #F7C223; } 75% { stroke: #1B9A59; } 100% { stroke: #4285F4; } } @keyframes dash { 0% { stroke-dashoffset: $offset; } 50% { stroke-dashoffset: $offset/4; transform:rotate(135deg); } 100% { stroke-dashoffset: $offset; transform:rotate(450deg); } }
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41223974
tagged with: css

chai
tags question: http://stackoverflow.com/q/26348632
tags question: http://stackoverflow.com/q/26282167
tag name: chai
type: Tag

http://stackoverflow.com/comment/41122788
type: QuestionComment
score: 5
comment on: http://stackoverflow.com/q/26220472
type: Comment
has text: You have a syntax error. The `;` before `2000` should be `,`. http://jsfiddle.net/barmar/u4e1tv21/16/

cors
type: Tag
tags question: http://stackoverflow.com/q/26245723
tag name: cors
tags question: http://stackoverflow.com/q/26279691
tags question: http://stackoverflow.com/q/26306080
tags question: http://stackoverflow.com/q/26244059

http://stackoverflow.com/comment/41213745
type: Comment
has text: now it works please hold
comment on: http://stackoverflow.com/q/26268780
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41326402
has text: What if I combine the `parentNode` of your solution, with a solution in the link @FelixKling suggested, something like: `var thisDiv = document.currentScript.parentNode;`. Would that work?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26330167

http://stackoverflow.com/comment/41280358
comment on: http://stackoverflow.com/q/26305282
has text: @Moogs added jsfiddle
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26340269
upvote count: 1
type: Question
has body: I have been creating an application which allows user to upload images first and then load it in canvas. And I looked through various SO posts and online examples which allows the user to read the uploaded image and load it in canvas, and all the examples were using HTML5 FileApi which IE9 doesn't support. Yes there are Shims available, which can replicate the FileApi functionality provided by the FileApi, but most of them depend upon Flash or Silverlight. So, is there any alternative for the process, I mean not only an alternative for FileApi, but can the whole process of uploading and loading images in canvas can be done without using the FileAPI??
has title: Upload image and load in canvas, IE9, no FileApi support
tagged with: javascript
has answer: http://stackoverflow.com/a/29880201
tagged with: canvas
answer count: 1
downvote count: 0
tagged with: file-upload
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1

http://stackoverflow.com/a/26344969
score: 2
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26344923
has body: I am not sure which ones you are referring to... but you should use on click listeners Check out the link below: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener The whole idea is that you bind a listener to certain events and when they occur, you fire off some other method. So, if you have a div with some data in it, you can have it reposition to the point of the click, take in some input data and appear. Once the click is lifted or leaves an area (also a listener ;) you can hide the div again.

http://stackoverflow.com/a/28358161
type: Answer
answers question: http://stackoverflow.com/q/26225685
score: 1
upvote count: 1
downvote count: 0
has body: Try putting newColl=new Meteor.Collection("newColl"); into both client side and server side and see if it works? Also try console.log(newColl.find().fetch()) in your browser console and see if it returns any data. If yes then it may be because the data is not ready yet when you print out the newColl.find().fetch().

http://stackoverflow.com/a/26223120
answers question: http://stackoverflow.com/q/26223073
has comment: http://stackoverflow.com/comment/41127863
score: 0
has comment: http://stackoverflow.com/comment/41127793
has body: you can do that with native javascript. console.log(v.outerHTML);
type: Answer

http://stackoverflow.com/comment/41192885
type: QuestionComment
comment on: http://stackoverflow.com/q/26258714
has text: @Granga Try Notepad++ with regular expression search/replace.
score: 0
type: Comment

http://stackoverflow.com/comment/41326935
type: Comment
type: QuestionComment
has text: at least the quick fix here is replace `&` with `||` (or logical). The first character should not be a letter, so you can check the first letter and bypass or return false... The same rule is applied to the last character.
score: 1
comment on: http://stackoverflow.com/q/26331548

http://stackoverflow.com/a/26326348
has comment: http://stackoverflow.com/comment/41319640
type: Answer
has comment: http://stackoverflow.com/comment/55737703
has body: The idea with flux is that you set your React component's internal state (or part of it) to an object or value from a store every time that store changes. So for example something like this (not real code, but to give you an idea): var Component = react.createClass({ getInitialState: function() { return { items: Flux.getStore("ItemStore").getItems() } }, componentDidMount: function() { this.store = Flux.getStore("ItemStore"); this.store.addChangeListener(this.onStoreChange) }, componentWillUnmount: function() { this.store.removeChangeListener(this.onStoreChange); }, onStoreChange: function() { this.setState({ items: this.store.getItems() }); }, render: function() { var items = []; for (var i = 0; i &lt; this.state.items; i++) { items.push( &lt;li key={i}&gt;{this.state.items[i]}&lt;/li&gt; ); } return ( &lt;ul&gt;{items}&lt;/ul&gt; ); } }); What this example component does is render a list of this.state.items that reside in a store called ItemStore and are accessed by ItemStore.getItems(). So take a look at the componentDidMount which gets the store, binds a callback to whenever the store is changed onStoreChange and then sets the current component state of items to the items array provided by store.getItems(). As a result when the component is first mounted it gets the current items from the store and displays them, whenever the store changes it will execute onStoreChange which gets the items again from the store and sets them again via this.setState(). Naturally we want to be clean so this component also removes the onStoreChange binding when the component is being unmounted. Note: Remember that calling this.setState() inside componentDidMount does not cause a component re-render :) More on this in the facebook-flux documentation here: http://facebook.github.io/flux/docs/todo-list.html#listening-to-changes-with-a-controller-view
has comment: http://stackoverflow.com/comment/41322298
score: 5
accepted answer of: http://stackoverflow.com/q/26325675
upvote count: 5
has comment: http://stackoverflow.com/comment/41321661
answers question: http://stackoverflow.com/q/26325675
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41398248
score: 0
type: Comment
type: QuestionComment
has text: @RichardHermanson, yeah
comment on: http://stackoverflow.com/q/26329060

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/26261946
type: Tag

http://stackoverflow.com/comment/41166664
type: Comment
has text: Yes use [] instead of {} for the first set of braces. Do you have any control over how the JSON is outputted?
score: 1
comment on: http://stackoverflow.com/q/26243745
type: QuestionComment

http://stackoverflow.com/q/26276840
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26276871
answer count: 3
has title: JQuery - how to store each data received
possible better answer: http://stackoverflow.com/a/26276901
has answer: http://stackoverflow.com/a/26276891
favorite count: 0
has answer: http://stackoverflow.com/a/26276901
upvote count: 2
downvote count: 1
accepted answer: http://stackoverflow.com/a/26276871
type: AnsweredQuestion
has body: how to store data received from below Jquery for further use. $('#div').find('a').each(function() { console.log($(this).attr('href')); }); http://jsfiddle.net/mvm6o208/ you can find my code here.
score: 1
type: Question
tagged with: arrays

http://stackoverflow.com/comment/41201178
comment on: http://stackoverflow.com/q/26263080
score: 1
type: Comment
type: QuestionComment
has text: @HowardRenollet I'd upvote that.

http://stackoverflow.com/comment/41223543
type: QuestionComment
has text: Add a tag like and place your message in there.
comment on: http://stackoverflow.com/q/26275309
score: 0
type: Comment

http://stackoverflow.com/comment/41268942
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26299992
score: 0
has text: Could you add the definition of the `submit_javascript` function?

http://stackoverflow.com/a/26273831
score: 1
downvote count: 1
upvote count: 2
has body: var commission_1 = 2000, commission_2 = 4000; var name = 'commission_1'; console.log(window[name]);
has comment: http://stackoverflow.com/comment/41220917
type: Answer
answers question: http://stackoverflow.com/q/26273710

http://stackoverflow.com/a/26322193
downvote count: 0
type: Answer
has body: Your issue is with this line: var findiv = $(this).closest('table').find('div[class="divrep"]'); The value of this in an ajax success handler is the ajax object, not your dom element. You have several options: Save the value you want in a local variable before the ajax call as in var self = this; and reference self. Set the context argument for the jQuery ajax call to cause this to be set as desired in the success handler. Use a more complete selector that doesn't need this. Because you have nested ajax calls, probably the simplest thing to do is to put: var self = this; at the beginning of your event handler and then you can reference self in either of your ajax success handlers to get the click on DOM object.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26322165

http://stackoverflow.com/q/26335061
has answer: http://stackoverflow.com/a/26335112
score: 0
has title: Dynamically set, unset and clear Global Variables
has answer: http://stackoverflow.com/a/26335296
linked to: http://stackoverflow.com/q/14220321
favorite count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41334092
has body: My need is to set a global variable after a ajax call. The global variable depends on the ajax's success data and I want to access the global variable in some other function. The global variable should get cleared on a certain click event. If the ajax call made once again I want to set the global variable with a new value. I tried with declaring var outside the function like var globalvariable and set the global variable value after ajax call like: window.globalvariable = data; but I am getting only empty results. What is the proper way to achieve this?
tagged with: global-variables
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41333402
tagged with: javascript

http://stackoverflow.com/q/26250441
answer count: 1
tagged with: ruby-on-rails
has title: how to monitor instance variable from ruby controller pass to view html using AJAX
type: AnsweredQuestion
score: 0
has body: Hi I want to create a page where it monitors(view) or render the value of the variable inside the controller dynamically as the iteration of variable goes by. view.html.erb Run And here's my controller where i iterate the value of x, results.rb x=0 5.times do x++ sleep(1) #HOW TO RETURN THE VALUE OF VAR X EVERY UPDATE? #render :json => x, :status => :ok #do i need to have a loop in js? end Many Thanks.
has answer: http://stackoverflow.com/a/26250809
type: Question
accepted answer: http://stackoverflow.com/a/26250809
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/26226112
answers question: http://stackoverflow.com/q/26226013
has body: Yes. The corporate network can block everything it wants, and it might be the case that an over-restrictive firewall strips the CORS headers (aka "everything it doesn't know") from the HTTP request/response.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/26226013

http://stackoverflow.com/a/26307989
has body: Did you add your css? UPDATED with background colors - jsFiddle .dark { background: #333; } .light { background: #fff; } .container { overflow: hidden; position: relative; min-height: 500px; padding: 1em; } .default { position: fixed; } .moveable { position: absolute; }
score: 0
answers question: http://stackoverflow.com/q/26307130
type: Answer

http://stackoverflow.com/comment/41320578
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26328261
has text: @KidDiamond: Place this JS *below* the element. The element has to exist before the JS is called
score: 0

http://stackoverflow.com/comment/41131369
type: AnswerComment
has text: FYI only; InDesign is correct in refusing this. A well-formed XML tree has "a single "root" element that contains all other elements": see [the Offical Definition of well-formednessness](http://www.w3.org/TR/REC-xml/#sec-well-formed) under *Document*, item 2.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26218384

http://stackoverflow.com/comment/41116662
type: Comment
has text: @SangramBarge - I made an edit, you were missing the `id` parameter on your `input`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26217492

http://stackoverflow.com/comment/41232474
comment on: http://stackoverflow.com/a/26256977
score: 0
type: Comment
has text: Yes.. Thnx.. But Parent page is HTML page from which I can not connect to database therefore I can not get number of records on html page
type: AnswerComment

http://stackoverflow.com/a/26290184
has comment: http://stackoverflow.com/comment/41261765
has comment: http://stackoverflow.com/comment/41261809
accepted answer of: http://stackoverflow.com/q/26285567
score: 0
answers question: http://stackoverflow.com/q/26285567
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41265367
has comment: http://stackoverflow.com/comment/41266696
has comment: http://stackoverflow.com/comment/41255186
has comment: http://stackoverflow.com/comment/41265347
has comment: http://stackoverflow.com/comment/41260527
type: Answer
has comment: http://stackoverflow.com/comment/41255194
has body: Your IsSelected need to be an observable in order for the screen to update. I've also added self.selectedIds to track the ids that are selected. var Location = function(location) { var self = this; self.Id = location.Id; self.Label = location.Name; self.IsSelected = ko.observable(location.IsSelected); } self.selectedIds = []; self.allItemsSelected = ko.computed({ read: function () { var allSelected = true; self.selectedIds = []; ko.utils.arrayForEach(self.Locations(), function (item) { if (!item.IsSelected()) { allSelected = false; } else { self.selectedIds.push(item.Id); } }); console.debug('selectedIds: ' + self.selectedIds); return allSelected; //to trigger the browser default bahaviour }, write: function (value) { ko.utils.arrayForEach(self.Locations(), function (item) { item.IsSelected(value); }); } }); You are getting the error "boolean is not a function" because you aren't using new Location(location) for each location in your javascript locations. var mappedLocations = $.map(locations, function(location) { return new Location(location) }); self.Locations = ko.observableArray(locations); http://jsfiddle.net/Wk7dr/9/
has comment: http://stackoverflow.com/comment/41266283
has comment: http://stackoverflow.com/comment/41265578
has comment: http://stackoverflow.com/comment/41260472
has comment: http://stackoverflow.com/comment/41255125
has comment: http://stackoverflow.com/comment/41294003
has comment: http://stackoverflow.com/comment/41266418

modal-dialog
tag name: modal-dialog
type: Tag
tags question: http://stackoverflow.com/q/26327323
tags question: http://stackoverflow.com/q/26271938
tags question: http://stackoverflow.com/q/26305619
tags question: http://stackoverflow.com/q/26218641
tags question: http://stackoverflow.com/q/26333124
tags question: http://stackoverflow.com/q/26199642

http://stackoverflow.com/a/26271988
has comment: http://stackoverflow.com/comment/41218147
accepted answer of: http://stackoverflow.com/q/26271868
type: Answer
has comment: http://stackoverflow.com/comment/41249828
score: 17
upvote count: 17
downvote count: 0
type: AcceptedAnswer
has body: You could do something like... var probability = function(n) { return !!n &amp;&amp; Math.random() &lt;= n; }; Then call it with probability(.7). It works because Math.random() returns a number between and inclusive of 0 and 1 (see comment). If you must use 70, simply divide it over 100 in the body of your function.
has comment: http://stackoverflow.com/comment/41249925
answers question: http://stackoverflow.com/q/26271868

http://stackoverflow.com/q/26291880
has answer: http://stackoverflow.com/a/26291911
score: 0
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26292268
has title: Submit form using PHP
has comment: http://stackoverflow.com/comment/41255044
tagged with: forms
type: Question
answer count: 2
has body: please forgive me for my ignorance but I am completely new to PHP. I downloaded a website template and it has a form that I want to send to my email address when someone clicks the submit button. How do I do that? The existing code is copied below: function rsvpFormSubmit() { // this is the id of the form var formID = $("#js-form"); // submits form with ajax method formID.on("submit", function() { $.ajax({ url: "mailer.php", type: "POST", data: formID.serialize(), // serializes the form's elements. success: function(data) { $(".js-display") .addClass("message-panel") .html(data); // show response from the php script. } }); return true; // avoid to execute the actual submit of the form. }); // Show/Hide RSVP Menu selection on accept/decline $(".decline").on("click", function(){ $(".rsvp-meal-choice").fadeOut(); }); $(".accept").on("click", function(){ $(".rsvp-meal-choice").fadeIn(); }); } rsvpFormSubmit(); Here is the form HTML code: Rsvp Kindly respond by March 14, 2014. We look forward to celebrating with you! First Name First Name is required. Last Name Last Name is required. Email Valid Email is required. Phone Will you be attending? Accepts with Pleasure! Declines with Regret. Please select your meal choices Main None Chicken Beef Vegetarian Dessert None Chocolate Cake Lemon Cheesecake Key Lime Pie Send
has comment: http://stackoverflow.com/comment/41254147
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/26334539
has comment: http://stackoverflow.com/comment/41366155
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41362270
upvote count: 2
has body: If you have separate js files, you can use workaround like below &lt;input type="hidden" id="registerurl" data-register-url="@Url.Action("register", "partner")"/&gt; and use this element's attribute as url to be used in your http call var urlRegisterPartner = $('#registerurl').data('register-url');
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26329884
downvote count: 0
answers question: http://stackoverflow.com/q/26329884

http://stackoverflow.com/comment/41280471
score: 0
comment on: http://stackoverflow.com/a/26306222
type: Comment
has text: I don't think there is anything that in your case would work. You could setup a server and do long-polling but that would be too overkill.
type: AnswerComment

http://stackoverflow.com/a/26286034
answers question: http://stackoverflow.com/q/26285839
accepted answer of: http://stackoverflow.com/q/26285839
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: You said that your pages are: xyz.site.com/myCode.html mylocal/page2.html The localStorage object is bound to the local domain, so xyz.site.com will have a totally different localStorage than mylocal. Hence, if you set a property in the first page and then redirect to another site, the localStorage will not be the same anymore, and you'll not have access to your property. To work around this you should either: Put both pages on the same domain or call the second page passing some query string in the url or implement an XMLHttpRequest from the second to the first page.
downvote count: 0
score: 1

http://stackoverflow.com/a/26205122
accepted answer of: http://stackoverflow.com/q/26202736
has body: Here's @Pointy's good idea put to code: Illustrating with just 1 of your color wheel wedges. You can expand this starting point to include all wedges in your color wheel. Example code and a Demo: http://jsfiddle.net/m1erickson/9pc4orw8/ Click to select color:
answers question: http://stackoverflow.com/q/26202736
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41355152
type: Comment
has text: Here is a jsfiddle: http://jsfiddle.net/dt6f3zrz/ though I am unsure why the slideshow effect is not showing. It should be just like the one that you visit on that webpage located above.
type: QuestionComment
comment on: http://stackoverflow.com/q/26343505
score: 0

http://stackoverflow.com/comment/41296009
type: AnswerComment
has text: I just gave the main idea, I did not tested this code. but note that the window.location.href is the full address. Try to use pathname instead: window.location.pathname = "/buyonline.htm";
comment on: http://stackoverflow.com/a/26314976
score: 0
type: Comment

http://stackoverflow.com/comment/41342392
comment on: http://stackoverflow.com/q/26337101
score: 0
type: Comment
type: QuestionComment
has text: I do not use codeAddress Function. It was already there in Google API sample. please guide